Bug 677897 - Use objcopy from the NDK in symbolstore.py. r=ted

This commit is contained in:
Mike Hommey 2011-10-06 09:08:14 +02:00
parent 6018215dc9
commit 14966259b2
4 changed files with 10 additions and 2 deletions

View File

@ -172,6 +172,7 @@ endif
$(RM) -r $(DIST)/crashreporter-symbols
$(RM) "$(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip"
$(NSINSTALL) -D $(DIST)/crashreporter-symbols
OBJCOPY="$(OBJCOPY)" \
$(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
$(MAKE_SYM_STORE_ARGS) \
$(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir)) \

View File

@ -416,6 +416,7 @@ GMAKE = @GMAKE@
PERL = @PERL@
PYTHON = @PYTHON@
RANLIB = @RANLIB@
OBJCOPY = @OBJCOPY@
UNZIP = @UNZIP@
ZIP = @ZIP@
XARGS = @XARGS@

View File

@ -371,6 +371,7 @@ case "$target" in
AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
OBJCOPY="$android_toolchain"/bin/"$android_tool_prefix"-objcopy
case "${target_cpu}" in
arm*)
@ -443,6 +444,9 @@ case "$target" in
MOZ_CHROME_FILE_FORMAT=omni
ZLIB_DIR=yes
;;
*-linux*)
AC_PATH_PROG(OBJCOPY,objcopy)
;;
esac
AC_SUBST(ANDROID_NDK)
@ -451,6 +455,7 @@ AC_SUBST(ANDROID_PLATFORM)
AC_SUBST(ANDROID_SDK)
AC_SUBST(ANDROID_PLATFORM_TOOLS)
AC_SUBST(ANDROID_PACKAGE_NAME)
AC_SUBST(OBJCOPY)
dnl ========================================================
dnl Checks for compilers.

View File

@ -634,6 +634,7 @@ class Dumper_Win32(Dumper):
return result
class Dumper_Linux(Dumper):
objcopy = os.environ['OBJCOPY'] if 'OBJCOPY' in os.environ else 'objcopy'
def ShouldProcess(self, file):
"""This function will allow processing of files that are
executable, or end with the .so extension, and additionally
@ -648,8 +649,8 @@ class Dumper_Linux(Dumper):
# .gnu_debuglink section to the object, so the debugger can
# actually load our debug info later.
file_dbg = file + ".dbg"
if call(['objcopy', '--only-keep-debug', file, file_dbg]) == 0 and \
call(['objcopy', '--add-gnu-debuglink=%s' % file_dbg, file]) == 0:
if call([self.objcopy, '--only-keep-debug', file, file_dbg]) == 0 and \
call([self.objcopy, '--add-gnu-debuglink=%s' % file_dbg, file]) == 0:
rel_path = os.path.join(debug_file,
guid,
debug_file + ".dbg")