aboutsummaryrefslogtreecommitdiff
path: root/src/processor
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-11-06 19:34:19 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-11-06 19:34:19 +0000
commit80866e79454cefc5570b01dbb0a723185eae653c (patch)
treeb7aaf22c6d808a23a66756fc99d50d3fab44a695 /src/processor
parentFix minor naming inconsistency (#67). r=mmentovai (diff)
downloadbreakpad-80866e79454cefc5570b01dbb0a723185eae653c.tar.xz
Symbol file should contain module GUID at beginning (#66). r=bryner
- The dumped symbol format now begins with a MODULE line identifying the uuid, age, and name of the source pdb file. - The processor ignores MODULE lines, but they are useful in figuring out how to index symbol files in a symbol store. - dump_syms and symupload now both accept either a pdb or exe/dll and will read the pdb regardless. - Figured out that MSSS always represents a module's age in pathnames in hexadecimal, and updated SimpleSymbolSupplier to match. http://groups.google.com/group/airbag-dev/browse_thread/thread/572108d6567edd58 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@59 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor')
-rw-r--r--src/processor/simple_symbol_supplier.cc2
-rw-r--r--src/processor/simple_symbol_supplier.h7
-rw-r--r--src/processor/source_line_resolver.cc7
-rw-r--r--src/processor/testdata/module1.out1
-rw-r--r--src/processor/testdata/module2.out1
-rw-r--r--src/processor/testdata/module3_bad.out1
-rw-r--r--src/processor/testdata/symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym1
-rw-r--r--src/processor/testdata/symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1/test_app.sym1
8 files changed, 15 insertions, 6 deletions
diff --git a/src/processor/simple_symbol_supplier.cc b/src/processor/simple_symbol_supplier.cc
index 7e1b2766..6c4c9a3d 100644
--- a/src/processor/simple_symbol_supplier.cc
+++ b/src/processor/simple_symbol_supplier.cc
@@ -67,7 +67,7 @@ string SimpleSymbolSupplier::GetSymbolFile(MinidumpModule *module) {
path.append("/");
char uuid_age_string[43];
snprintf(uuid_age_string, sizeof(uuid_age_string),
- "%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X%d",
+ "%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X%X",
cv_record->signature.data1, cv_record->signature.data2,
cv_record->signature.data3,
cv_record->signature.data4[0], cv_record->signature.data4[1],
diff --git a/src/processor/simple_symbol_supplier.h b/src/processor/simple_symbol_supplier.h
index 16d95057..4db8810c 100644
--- a/src/processor/simple_symbol_supplier.h
+++ b/src/processor/simple_symbol_supplier.h
@@ -36,8 +36,8 @@
// directory with a name identical to the corresponding pdb file. Within
// each of these directories, there are subdirectories named for the uuid and
// age of each pdb file. The uuid is presented in hexadecimal form, with
-// uppercase characters and no dashes. The age is appended to it in decimal
-// form, without any separators. Within that subdirectory,
+// uppercase characters and no dashes. The age is appended to it in
+// hexadecimal form, without any separators. Within that subdirectory,
// SimpleSymbolSupplier expects to find the symbol file, which is named
// identically to the pdb file, but with a .sym extension. This sample
// hierarchy is rooted at the "symbols" base directory:
@@ -59,9 +59,6 @@
// SimpleSymbolServer, provided that the pdb files are transformed to dumped
// format using a tool such as dump_syms, and given a .sym extension.
//
-// TODO(mmentovai): verify that MSSS stores the age as presented as decimal
-// and not hexadecimal or something else. Adjust here to match if necessary.
-//
// SimpleSymbolSupplier presently only supports symbol files that have
// the MSVC 7.0 CodeView record format. See MDCVInfoPDB70 in
// minidump_format.h.
diff --git a/src/processor/source_line_resolver.cc b/src/processor/source_line_resolver.cc
index 2d83e2ea..c89c9498 100644
--- a/src/processor/source_line_resolver.cc
+++ b/src/processor/source_line_resolver.cc
@@ -249,6 +249,13 @@ bool SourceLineResolver::Module::LoadMap(const string &map_file) {
if (!ParsePublicSymbol(buffer)) {
return false;
}
+ } else if (strncmp(buffer, "MODULE ", 7) == 0) {
+ // Ignore these. They're not of any use to SourceLineResolver, which
+ // is fed modules by a SymbolSupplier. These lines are present to
+ // aid other tools in properly placing symbol files so that they can
+ // be accessed by a SymbolSupplier.
+ //
+ // MODULE <guid> <age> <filename>
} else {
if (!cur_func) {
return false;
diff --git a/src/processor/testdata/module1.out b/src/processor/testdata/module1.out
index 2d96eaf7..3f290daf 100644
--- a/src/processor/testdata/module1.out
+++ b/src/processor/testdata/module1.out
@@ -1,3 +1,4 @@
+MODULE 11111111-1111-1111-1111-111111111111 1 module1.pdb
FILE 1 file1_1.cc
FILE 2 file1_2.cc
FILE 3 file1_3.cc
diff --git a/src/processor/testdata/module2.out b/src/processor/testdata/module2.out
index 6c1cb378..c8671c8c 100644
--- a/src/processor/testdata/module2.out
+++ b/src/processor/testdata/module2.out
@@ -1,3 +1,4 @@
+MODULE 22222222-2222-2222-2222-222222222222 2 module2.pdb
FILE 1 file2_1.cc
FILE 2 file2_2.cc
FILE 3 file2_3.cc
diff --git a/src/processor/testdata/module3_bad.out b/src/processor/testdata/module3_bad.out
index 1b3f8e62..1b092e41 100644
--- a/src/processor/testdata/module3_bad.out
+++ b/src/processor/testdata/module3_bad.out
@@ -1,2 +1,3 @@
+MODULE 33333333-3333-3333-3333-333333333333 3 module3.pdb
FILE 1 file1.cc
FUNC 1000
diff --git a/src/processor/testdata/symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym b/src/processor/testdata/symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym
index 0a9d6fcc..0c23d478 100644
--- a/src/processor/testdata/symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym
+++ b/src/processor/testdata/symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym
@@ -1,3 +1,4 @@
+MODULE bce8785c-57b4-4245-a669-896b6a19b954 2 kernel32.pdb
PUBLIC b5ae c BaseDllInitialize
PUBLIC 9b47 4 CloseHandle
PUBLIC 17826 0 BaseDllInitializeMemoryManager
diff --git a/src/processor/testdata/symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1/test_app.sym b/src/processor/testdata/symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1/test_app.sym
index 0286c89b..a5ac9fb9 100644
--- a/src/processor/testdata/symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1/test_app.sym
+++ b/src/processor/testdata/symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1/test_app.sym
@@ -1,3 +1,4 @@
+MODULE 63fe4780-728d-4937-9b9d-7bb6460cb42a 1 test_app.pdb
FILE 1 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winsock.h
FILE 2 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winuser.h
FILE 3 c:\program files\microsoft visual studio 8\vc\platformsdk\include\wincon.h