Skip to content

Commit

Permalink
Break on MONO_VERBOSE_METHOD compilation if a debugger is attached.
Browse files Browse the repository at this point in the history
Ideally, we'd be able to automatically disassemble the method, but this
prevents an assertion failure and can be used to set a breakpoint on
the method.
  • Loading branch information
Vincent Povirk committed Oct 23, 2017
1 parent 6741621 commit de4ceea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mono/mini/helpers.c
Expand Up @@ -135,6 +135,11 @@ mono_blockset_print (MonoCompile *cfg, MonoBitSet *set, const char *name, guint
void
mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id)
{
#if HOST_WIN32
/* Wine Mono: We can't really access objdump, so just break if there's a debugger. */
if (IsDebuggerPresent())
DebugBreak();
#else
#ifndef DISABLE_LOGGING
GHashTable *offset_to_bb_hash = NULL;
int i, cindex, bb_num;
Expand Down Expand Up @@ -302,6 +307,7 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id)
g_free (o_file);
g_free (as_file);
#endif
#endif
}

#else /* DISABLE_JIT */
Expand Down

0 comments on commit de4ceea

Please sign in to comment.