Created
July 9, 2015 00:53
-
-
Save natemcmaster/fef1d9e66ae48cfd8baf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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