diff options
author | Mike Wittman <wittman@chromium.org> | 2017-11-29 13:29:37 -0800 |
---|---|---|
committer | Mark Mentovai <mark@chromium.org> | 2017-11-29 21:33:23 +0000 |
commit | b1226959a25b6a5311801d6f204b088c706e7c25 (patch) | |
tree | 3dfc65dab8bb0dcd929748873de179ce259030f5 /src/tools/windows | |
parent | Update test data for identical-code-folded symbol changes (diff) | |
download | breakpad-b1226959a25b6a5311801d6f204b088c706e7c25.tar.xz |
Add optional field indicating multiple symbols at an address
Adds an optional 'm' as the first field in FUNCTION and PUBLIC records
to indicate that the address corresponds to more than one symbol.
Controls this by a command line flag for now to give symbol file users
a chance to update.
Also reduces the number of IDiaSymbols retained in memory to one per
address. This reduces memory consumption by 8% when processing
chrome.dll.pdb.
Updates the processor to parse the new optional field.
Bug: google-breakpad:751
Change-Id: I6503edaf057312d21a1d63d9c84e5a4fa019dc46
Reviewed-on: https://chromium-review.googlesource.com/773418
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/tools/windows')
-rw-r--r-- | src/tools/windows/binaries/dump_syms.exe | bin | 130048 -> 142336 bytes | |||
-rw-r--r-- | src/tools/windows/binaries/symupload.exe | bin | 195072 -> 243712 bytes | |||
-rw-r--r-- | src/tools/windows/dump_syms/dump_syms.cc | 17 | ||||
-rw-r--r-- | src/tools/windows/dump_syms/testdata/dump_syms_regtest64.sym | 2 |
4 files changed, 15 insertions, 4 deletions
diff --git a/src/tools/windows/binaries/dump_syms.exe b/src/tools/windows/binaries/dump_syms.exe Binary files differindex ca4676f5..f27f3ece 100644 --- a/src/tools/windows/binaries/dump_syms.exe +++ b/src/tools/windows/binaries/dump_syms.exe diff --git a/src/tools/windows/binaries/symupload.exe b/src/tools/windows/binaries/symupload.exe Binary files differindex ba319b26..cdfee745 100644 --- a/src/tools/windows/binaries/symupload.exe +++ b/src/tools/windows/binaries/symupload.exe diff --git a/src/tools/windows/dump_syms/dump_syms.cc b/src/tools/windows/dump_syms/dump_syms.cc index 3e8827b6..dcbe39ae 100644 --- a/src/tools/windows/dump_syms/dump_syms.cc +++ b/src/tools/windows/dump_syms/dump_syms.cc @@ -31,6 +31,7 @@ // a text-based format that we can use from the minidump processor. #include <stdio.h> +#include <wchar.h> #include <string> @@ -41,12 +42,22 @@ using google_breakpad::PDBSourceLineWriter; int wmain(int argc, wchar_t **argv) { if (argc < 2) { - fprintf(stderr, "Usage: %ws <file.[pdb|exe|dll]>\n", argv[0]); + fprintf(stderr, + "Usage: %ws [--enable_multiple_field] <file.[pdb|exe|dll]>\n", + argv[0]); return 1; } - PDBSourceLineWriter writer; - if (!writer.Open(wstring(argv[1]), PDBSourceLineWriter::ANY_FILE)) { + // This is a temporary option to enable writing the optional 'm' field on FUNC + // and PUBLIC, denoting multiple symbols for the address. This option will be + // removed, with the behavior enabled by default, after all symbol file + // readers have had a chance to update. + bool enable_multiple_field = + (argc >= 3 && wcscmp(L"--enable_multiple_field", argv[1]) == 0); + + PDBSourceLineWriter writer(enable_multiple_field); + if (!writer.Open(wstring(argv[enable_multiple_field ? 2 : 1]), + PDBSourceLineWriter::ANY_FILE)) { fprintf(stderr, "Open failed\n"); return 1; } diff --git a/src/tools/windows/dump_syms/testdata/dump_syms_regtest64.sym b/src/tools/windows/dump_syms/testdata/dump_syms_regtest64.sym index a43d3aec..39815245 100644 --- a/src/tools/windows/dump_syms/testdata/dump_syms_regtest64.sym +++ b/src/tools/windows/dump_syms/testdata/dump_syms_regtest64.sym @@ -1262,7 +1262,7 @@ FUNC 3320 18 0 NLG_Notify 332a 5 107 69
332f 7 108 69
3336 a 109 69
-FUNC 3340 1 0 _NLG_Dispatch
+FUNC 3340 1 0 _NLG_Dispatch2
3340 0 113 69
3340 10 114 69
FUNC 3350 1 0 _NLG_Return2
|