diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 23:04:37 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 23:04:37 +0000 |
commit | 81786c24645daed3a0151791ca38c319c25b1b14 (patch) | |
tree | b55f71aa812bf2d2f2762654ff5a19a83ae3ef8e /build | |
parent | 53574b2f511c1df87ce9a1f8fa835cb064b71542 (diff) | |
download | chromium_src-81786c24645daed3a0151791ca38c319c25b1b14.zip chromium_src-81786c24645daed3a0151791ca38c319c25b1b14.tar.gz chromium_src-81786c24645daed3a0151791ca38c319c25b1b14.tar.bz2 |
Update dump_symbols to match new file_id code.
The way that breakpad calculates module ids has changed so we need to change
our tools to match.
(Note. The original change accidently landed with another change in r43662 so
this is just the review changes.)
http://codereview.chromium.org/1508019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43672 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/linux/dump_signature.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/build/linux/dump_signature.py b/build/linux/dump_signature.py index 63180d0..37e50f4 100755 --- a/build/linux/dump_signature.py +++ b/build/linux/dump_signature.py @@ -1,14 +1,14 @@ #!/usr/bin/python # -# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # This generates symbol signatures with the same algorithm as # src/breakpad/src/common/linux/file_id.cc@461 -import sys import struct +import sys import subprocess if len(sys.argv) != 2: @@ -22,12 +22,17 @@ if objdump.returncode != 0: sys.stderr.write('Failed to run objdump to find .text section.\n') sys.exit(1) -text_section = [x for x in sections.split('\n') if '.text' in x] +text_section = [x for x in sections.splitlines() if '.text' in x] if len(text_section) == 0: sys.stderr.write('objdump failed to find a .text section.\n') sys.exit(1) text_section = text_section[0] -file_offset = int(text_section.split()[5], 16) +try: + file_offset = int(text_section.split()[5], 16) +except ValueError: + sys.stderr.write("Failed to parse objdump output. Here is the failing line:\n"); + sys.stderr.write(text_section) + sys.exit(1) bin = open(sys.argv[1]) bin.seek(file_offset) |