Bugzilla – Bug 318589
[monodis] marshal info for methods not output correctly
Last modified: 2007-09-15 21:24:57 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".