Bug 775789: Install .gdbinit correctly in $(DIST)/bin. r=glandium
authorJim Blandy <jimb@mozilla.com>
Sat, 01 Dec 2012 21:25:16 -0800
changeset 114733 8868ca2865721befa6042f31b0bdb415fc6ca0d8
parent 114732 93f966c9168fa79fafd1bceadedd695f1780ca9f
child 114734 483a8a9702a6772635490c84e00a3e13143c08a7
push id23929
push userryanvm@gmail.com
push dateSun, 02 Dec 2012 19:03:37 +0000
treeherderautoland@253009438c5b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs775789
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 775789: Install .gdbinit correctly in $(DIST)/bin. r=glandium
.gdbinit
Makefile.in
build/.gdbinit
build/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -207,20 +207,16 @@ else
 maybe_clobber_profiledbuild:
 endif
 else
 maybe_clobber_profiledbuild:
 	$(RM) $(DIST)/bin/*.pgc
 	find $(DIST)/$(MOZ_APP_NAME) -name "*.pgc" -exec mv {} $(DIST)/bin \;
 endif
 
-# put in our default gdbinit so that the gdb debugging experience is happier.
-libs:: .gdbinit
-	$(INSTALL) $< $(DIST)/bin
-
 .PHONY: maybe_clobber_profiledbuild
 
 # Look for R_386_PC32 relocations in shared libs, these
 # break x86_64 builds and SELinux users.
 ifeq ($(OS_TARGET)_$(TARGET_XPCOM_ABI),Linux_x86-gcc3)
 scheck::
 	@relcount=`find $(DIST)/bin -name "*.so" | xargs objdump -R | grep R_386_PC32 | wc -l` && if test $$relcount -gt 0; then echo "FAILED: R_386_PC32 relocations detected in a shared library.  Did you use a system header without adding it to config/system-headers?"; exit 1; else echo "PASSED"; fi
 endif
rename from .gdbinit
rename to build/.gdbinit
--- a/.gdbinit
+++ b/build/.gdbinit
@@ -1,10 +1,16 @@
 # .gdbinit file for debugging Mozilla
 
+# You may need to put an 'add-auto-load-safe-path' command in your
+# $HOME/.gdbinit file to get GDB to trust this file. If your builds are
+# generally in $HOME/moz, then you can say:
+#
+#  add-auto-load-safe-path ~/moz
+
 # Don't stop for the SIG32/33/etc signals that Flash produces
 handle SIG32 noprint nostop pass
 handle SIG33 noprint nostop pass
 handle SIGPIPE noprint nostop pass
 
 # Show the concrete types behind nsIFoo
 set print object on
 
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -92,16 +92,22 @@ DEFINES += -DMOZ_PROFILE_MIGRATOR
 endif
 
 ifdef MOZ_EXTENSION_MANAGER
 DEFINES += -DMOZ_EXTENSION_MANAGER
 endif
 
 endif
 
+# Put a useful .gdbinit in the bin directory, to be picked up automatically
+# by GDB when we debug executables there.
+GDBINIT_FILES := .gdbinit
+GDBINIT_DEST = $(FINAL_TARGET)
+INSTALL_TARGETS += GDBINIT
+
 include $(topsrcdir)/config/rules.mk
 
 # we install to _leaktest/
 TARGET_DEPTH = ..
 include $(srcdir)/automation-build.mk
 
 _LEAKTEST_DIR = $(DEPTH)/_leaktest
 GARBAGE_DIRS += $(_LEAKTEST_DIR)