mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
Bug 818903 - Temporarily add some info about binaries and debug info files. r=ted
This commit is contained in:
parent
484bdd3e62
commit
ac1a8d47ce
@ -611,17 +611,21 @@ class Dumper_Linux(Dumper):
|
||||
return False
|
||||
|
||||
def CopyDebug(self, file, debug_file, guid):
|
||||
import zlib, struct, hashlib
|
||||
# We want to strip out the debug info, and add a
|
||||
# .gnu_debuglink section to the object, so the debugger can
|
||||
# actually load our debug info later.
|
||||
file_dbg = file + ".dbg"
|
||||
if subprocess.call([self.objcopy, '--only-keep-debug', file, file_dbg]) == 0 and \
|
||||
subprocess.call([self.objcopy, '--add-gnu-debuglink=%s' % file_dbg, file]) == 0:
|
||||
if subprocess.call([self.objcopy, '--only-keep-debug', file, file_dbg], stdout=sys.stderr) == 0 and \
|
||||
subprocess.call([self.objcopy, '--add-gnu-debuglink=%s' % file_dbg, file], stdout=sys.stderr) == 0:
|
||||
rel_path = os.path.join(debug_file,
|
||||
guid,
|
||||
debug_file + ".dbg")
|
||||
full_path = os.path.normpath(os.path.join(self.symbol_path,
|
||||
rel_path))
|
||||
# Temporary debug information
|
||||
print >>sys.stderr, read_output('objdump', '-j', '.gnu_debuglink', '-s', file)
|
||||
print >>sys.stderr, "%s crc: %08x" % (file_dbg, 0xffffffff & zlib.crc32(open(file_dbg).read()))
|
||||
shutil.move(file_dbg, full_path)
|
||||
# gzip the shipped debug files
|
||||
os.system("gzip %s" % full_path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user