mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 845888: Have GDB load JavaScript value pretty-printers when debugging libxul.so, or anything that links against it. r=glandium
This commit is contained in:
parent
ee424c2018
commit
3c82b32762
@ -1,5 +1,8 @@
|
||||
# mozilla/autoload.py: Autoload SpiderMonkey pretty-printers.
|
||||
|
||||
print "Loading JavaScript value pretty-printers; see js/src/gdb/README."
|
||||
print "If they cause trouble, type: disable pretty-printer .* SpiderMonkey"
|
||||
|
||||
import gdb.printing
|
||||
import mozilla.prettyprinters
|
||||
|
||||
|
@ -649,6 +649,17 @@ ifdef MOZ_GSTREAMER
|
||||
EXTRA_DSO_LDOPTS += $(GSTREAMER_LIBS)
|
||||
endif
|
||||
|
||||
# Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is
|
||||
# too old to support Python pretty-printers; if this changes, we could make
|
||||
# this 'ifdef GNU_CC'.
|
||||
ifeq (Linux,$(OS_ARCH))
|
||||
# Create a GDB Python auto-load file alongside the libxul shared library in
|
||||
# the build directory.
|
||||
PP_TARGETS += LIBXUL_AUTOLOAD
|
||||
LIBXUL_AUTOLOAD = libxul.so-gdb.py.in
|
||||
LIBXUL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir))
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS)
|
||||
|
8
toolkit/library/libxul.so-gdb.py.in
Normal file
8
toolkit/library/libxul.so-gdb.py.in
Normal file
@ -0,0 +1,8 @@
|
||||
""" GDB Python customization auto-loader for libxul """
|
||||
#filter substitution
|
||||
|
||||
import os.path
|
||||
sys.path[0:0] = [os.path.join('@topsrcdir@', 'js', 'src', 'gdb')]
|
||||
|
||||
import mozilla.autoload
|
||||
mozilla.autoload.register(gdb.current_objfile())
|
Loading…
Reference in New Issue
Block a user