Skip to content

Commit

Permalink
* get.c (dis_stringify_method_signature): Rename to ..
Browse files Browse the repository at this point in the history
(dis_stringify_method_signature_full): .. this. Add 'with_marshal_info'
param.
* get.h (dis_stringify_method_signature_full): Add new function.
* main.c (dis_property_methods): Update to use
dis_stringify_method_signature_full.
(dis_event_methods): Likewise.

svn path=/trunk/mono/; revision=60575


Commit migrated from mono/mono@9ec9d1b
  • Loading branch information
radical committed May 11, 2006
1 parent eb83ad8 commit 53e36fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
13 changes: 10 additions & 3 deletions src/mono/mono/dis/get.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,13 @@ get_generic_param (MonoImage *m, MonoGenericContainer *container)
return retval;
}

char*
dis_stringify_method_signature (MonoImage *m, MonoMethodSignature *method, int methoddef_row,
MonoGenericContext *context, gboolean fully_qualified)
{
return dis_stringify_method_signature_full (m, method, methoddef_row, context, fully_qualified, TRUE);
}

/*
* @m: metadata context
* @method: MonoMethodSignature to dis-stringify
Expand All @@ -839,8 +846,8 @@ get_generic_param (MonoImage *m, MonoGenericContainer *container)
* Returns: Allocated stringified method signature
*/
char*
dis_stringify_method_signature (MonoImage *m, MonoMethodSignature *method, int methoddef_row,
MonoGenericContext *context, gboolean fully_qualified)
dis_stringify_method_signature_full (MonoImage *m, MonoMethodSignature *method, int methoddef_row,
MonoGenericContext *context, gboolean fully_qualified, gboolean with_marshal_info)
{
guint32 cols [MONO_METHOD_SIZE];
guint32 pcols [MONO_PARAM_SIZE];
Expand Down Expand Up @@ -910,7 +917,7 @@ dis_stringify_method_signature (MonoImage *m, MonoMethodSignature *method, int m
if (i)
name = mono_metadata_string_heap (m, pcols [MONO_PARAM_NAME]);

if (pcols [MONO_PARAM_FLAGS] & PARAM_ATTRIBUTE_HAS_FIELD_MARSHAL) {
if (with_marshal_info && (pcols [MONO_PARAM_FLAGS] & PARAM_ATTRIBUTE_HAS_FIELD_MARSHAL)) {
const char *tp;
MonoMarshalSpec *spec;
tp = mono_metadata_get_marshal_info (m, param_index - 1, FALSE);
Expand Down
2 changes: 2 additions & 0 deletions src/mono/mono/dis/get.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ char *dis_stringify_token (MonoImage *m, guint32 token);
char *dis_stringify_array (MonoImage *m, MonoArrayType *array, gboolean is_def);
char *dis_stringify_modifiers (MonoImage *m, int n, MonoCustomMod *mod);
char *dis_stringify_param (MonoImage *m, MonoType *param);
char *dis_stringify_method_signature_full (MonoImage *m, MonoMethodSignature *method, int methoddef_row,
MonoGenericContext *context, gboolean fully_qualified, gboolean with_marshal_info);
char *dis_stringify_method_signature (MonoImage *m, MonoMethodSignature *method, int methoddef_row,
MonoGenericContext *context, gboolean fully_qualified);
char *dis_stringify_function_ptr (MonoImage *m, MonoMethodSignature *method);
Expand Down
4 changes: 2 additions & 2 deletions src/mono/mono/dis/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ dis_property_methods (MonoImage *m, guint32 prop, MonoGenericContext *context)
mono_metadata_decode_row (msemt, start, cols, MONO_METHOD_SEMA_SIZE);
if (!should_include_method (cols [MONO_METHOD_SEMA_METHOD]))
continue;
sig = dis_stringify_method_signature (m, NULL, cols [MONO_METHOD_SEMA_METHOD], context, TRUE);
sig = dis_stringify_method_signature_full (m, NULL, cols [MONO_METHOD_SEMA_METHOD], context, TRUE, FALSE);
fprintf (output, "\t\t%s %s\n", type [cols [MONO_METHOD_SEMA_SEMANTICS]], sig);
g_free (sig);
}
Expand Down Expand Up @@ -1058,7 +1058,7 @@ dis_event_methods (MonoImage *m, guint32 event, MonoGenericContext *context)
mono_metadata_decode_row (msemt, start, cols, MONO_METHOD_SEMA_SIZE);
if (!should_include_method (cols [MONO_METHOD_SEMA_METHOD]))
continue;
sig = dis_stringify_method_signature (m, NULL, cols [MONO_METHOD_SEMA_METHOD], context, TRUE);
sig = dis_stringify_method_signature_full (m, NULL, cols [MONO_METHOD_SEMA_METHOD], context, TRUE, FALSE);
switch (cols [MONO_METHOD_SEMA_SEMANTICS]) {
case METHOD_SEMANTIC_OTHER:
type = ".other"; break;
Expand Down

0 comments on commit 53e36fe

Please sign in to comment.