Bug 318589 (MONO75643) - [monodis] marshal info for methods not output correctly
Summary: [monodis] marshal info for methods not output correctly
Status: RESOLVED FIXED
Alias: MONO75643
Product: Mono: Tools
Classification: Mono
Component: tools (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-27 09:55 UTC by Jain Ankit
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Testcase: mt.cs (283 bytes, text/plain)
2005-07-27 09:58 UTC, Thomas Wiest
Details
proposed patch (3.68 KB, patch)
2005-07-27 09:59 UTC, Thomas Wiest
Details | Diff
Proposed patch: marshal3.patch (5.39 KB, patch)
2005-07-27 19:40 UTC, Thomas Wiest
Details | Diff
Updated patch (5.14 KB, patch)
2005-07-28 17:10 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:25:53 UTC


---- Reported by jankit@novell.com 2005-07-27 02:55:16 MST ----

Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:

monodis doesnt output marshal info for method parameters correctly.

Attached is the proposed patch, and a testcase.

The test case has:
                [return: MarshalAs(UnmanagedType.Interface)]
                object abc (test assembly,
[MarshalAs(UnmanagedType.Bool)]string typeLibName, string flags, int
notifySink)
                {

Actual results:
monodis gives:

    .method private hidebysig
           instance default object abc (class test  marshal (interface),
string 'assembly' marshal (interface), string typeLibName marshal (bool),
int32 flags marshal (bool))  cil managed

Expected results:
ms.net gives:

  .method private hidebysig instance object
          marshal( interface)
          abc(class test 'assembly',
              string  marshal( bool) typeLibName,
              string flags,
              int32 notifySink) cil managed
  {


--------
1. monodis is not showing any marshal info for the return type, instead
shows that info for all method params!



---- Additional Comments From jankit@novell.com 2005-07-27 02:58:01 MST ----

Created an attachment (id=168274)
Testcase: mt.cs




---- Additional Comments From jankit@novell.com 2005-07-27 02:59:34 MST ----

Created an attachment (id=168275)
proposed patch




---- Additional Comments From jankit@novell.com 2005-07-27 12:39:24 MST ----

Ignore the earlier patch. After discussing with hari we realized that
the handling of method parameters in dis_stringify_method_signature is
incorrect as it assumes that the PARAM table will have entries for ALL
the parameters, but according to the spec, the table can have gaps in
the param list. The only way to determine the end of param list for a
method is to check with the row_id for the next method's start of
param list (or end of table ofcourse).

When a param entry is missing in the PARAM table, the patch just
prints the type of the param obtained from the method signature. (This
was not there in the spec)

Also, the patch fixes the handling of marshal info for the return val
as well as the parameters.



---- Additional Comments From jankit@novell.com 2005-07-27 12:40:12 MST ----

Created an attachment (id=168276)
Proposed patch: marshal3.patch




---- Additional Comments From jankit@novell.com 2005-07-28 10:10:35 MST ----

Created an attachment (id=168277)
Updated patch




---- Additional Comments From jankit@novell.com 2005-07-28 10:47:21 MST ----

Fixed in SVN.

Imported an attachment (id=168274)
Imported an attachment (id=168275)
Imported an attachment (id=168276)
Imported an attachment (id=168277)

Unknown operating system unknown. Setting to default OS "Other".