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
Родитель e4d85c190a
Коммит 65a4bba62e
2 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -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
Просмотреть файл

@ -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