Bug 906860: Ignore segfaults handled by AsmJSFaultHandler in gdb; r=jimb,gps

This commit is contained in:
Benjamin Bouvier 2013-08-22 15:54:12 -07:00
parent 4e5093e6fa
commit 354c49842b
2 changed files with 22 additions and 0 deletions

View File

@ -50,6 +50,10 @@ INSTALL_TARGETS += SHELL_INSTALL_AUTOLOAD
SHELL_INSTALL_AUTOLOAD_FILES := $(CURDIR)/js-gdb.py
SHELL_INSTALL_AUTOLOAD_DEST := $(DIST)/bin
INSTALL_TARGETS += SHELL_INSTALL_AUTOLOAD_SCRIPT
SHELL_INSTALL_AUTOLOAD_SCRIPT_FILES := js-gdb.gdb
SHELL_INSTALL_AUTOLOAD_SCRIPT_DEST := $(CURDIR)
include $(topsrcdir)/config/rules.mk
# People expect the js shell to wind up in the top-level JS dir.

18
js/src/shell/js-gdb.gdb Normal file
View File

@ -0,0 +1,18 @@
define hookpost-run
if ($sigaction)
call free($sigaction)
set $sigaction = 0
end
end
catch signal SIGSEGV
commands
if !$sigaction
set $sigaction = malloc(sizeof(sigaction))
end
set $ignored = __GI___sigaction(11, 0, $sigaction)
set $handler = ((struct sigaction *)$sigaction)->__sigaction_handler.sa_handler
if $handler == AsmJSFaultHandler
continue
end
end