Skip to content

Instantly share code, notes, and snippets.

@natemcmaster
Created July 9, 2015 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natemcmaster/fef1d9e66ae48cfd8baf to your computer and use it in GitHub Desktop.
Save natemcmaster/fef1d9e66ae48cfd8baf to your computer and use it in GitHub Desktop.
handle SIGXCPU SIG33 SIG35 SIGPWR nostop noprint
define mono_backtrace
select-frame 0
set $i = 0
while ($i < $arg0)
set $foo = (char*) mono_pmip ($pc)
if ($foo)
printf "#%d %p in %s\n", $i, $pc, $foo
else
frame
end
up-silently
set $i = $i + 1
end
end
define mono_stack
set $mono_thread = mono_thread_current ()
if ($mono_thread == 0x00)
printf "No mono thread associated with this thread\n"
else
set $ucp = malloc (sizeof (ucontext_t))
call (void) getcontext ($ucp)
call (void) mono_print_thread_dump ($ucp)
call (void) free ($ucp)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment