X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fhelpers.c;h=7f681b23bb5ba355da140cd5fb52c4b0fac81acb;hb=f704d56c378b28e252572db4730a6e13edc14aa0;hp=493dbc85a70b677bcf498cf3218b579892dc9528;hpb=b21767e01caefe05ad063ddc28afecd0b5b78b04;p=mono.git diff --git a/mono/mini/helpers.c b/mono/mini/helpers.c index 493dbc85a70..7f681b23bb5 100644 --- a/mono/mini/helpers.c +++ b/mono/mini/helpers.c @@ -1,5 +1,6 @@ -/* - * helpers.c: Assorted routines +/** + * \file + * Assorted routines * * (C) 2003 Ximian, Inc. */ @@ -125,10 +126,9 @@ mono_blockset_print (MonoCompile *cfg, MonoBitSet *set, const char *name, guint } /** - * mono_disassemble_code: - * @cfg: compilation context - * @code: a pointer to the code - * @size: the code size in bytes + * \param cfg compilation context + * \param code a pointer to the code + * \param size the code size in bytes * * Disassemble to code to stdout. */ @@ -145,7 +145,7 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id) #ifdef HOST_WIN32 const char *tmp = g_get_tmp_dir (); #endif - const char *objdump_args = g_getenv ("MONO_OBJDUMP_ARGS"); + char *objdump_args = g_getenv ("MONO_OBJDUMP_ARGS"); char *as_file; char *o_file; char *cmd; @@ -276,7 +276,7 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id) unused = system (cmd); g_free (cmd); if (!objdump_args) - objdump_args = ""; + objdump_args = g_strdup (""); fflush (stdout); @@ -293,6 +293,7 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id) cmd = g_strdup_printf (ARCH_PREFIX DIS_CMD " %s %s", objdump_args, o_file); unused = system (cmd); g_free (cmd); + g_free (objdump_args); #else g_assert_not_reached (); #endif /* HAVE_SYSTEM */