aboutsummaryrefslogtreecommitdiff
path: root/src/tools/windows/dump_syms
Commit message (Collapse)AuthorAgeFilesLines
* fix pointer style to match the style guideMike Frysinger2020-07-153-6/+6
| | | | | | | | | | We do this in a lot of places, but we're inconsistent. Normalize the code to the Google C++ style guide. Change-Id: Ic2aceab661ce8f6b993dda21b1cdf5d2198dcbbf Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2262932 Reviewed-by: Sterling Augustine <saugustine@google.com> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix dump_syms clang Windows build.Nelson Billing2019-06-251-1/+1
| | | | | | | | | - Put FileHeaderMachineToCpuString definition in header. - Remove extra semi-colon. Change-Id: I726ad0f73c57908576414fd828052dff09f5c51f Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1673142 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix 'debug_file' in PESourceLineWriter.Nelson Billing2019-06-191-1/+1
| | | | | | | | | | | - Add a #define to testing.gyp to avoid warnings about TR1 deprecation. - PESourceLineWriter now reads debug_file from CodeView record instead of using code_file value. - Updated PE-only MD reading unit test. Change-Id: Ib4e6201df3e3fd651e160f310584b5a67b16c842 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1668347 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Enable PE-only metadata dumping for 64bit (aka. PE32+ format) PEs files.Nelson Billing2019-06-124-26/+290
| | | | | | | | | | | | | | | | | - Implement in common_windows_lib-- added class "PESourceLineWriter". - Add command-line switch to tell dump_syms to use PESourceLineWriter. Symbol data created this way will contain information to correlate the module with ones found in minidumps, along with frame info that allows much higher quality stack-walking in those minidumps. - Significant refactor of PDBSourceLineWriter-- all code concerned with extracting metadata from PE files has been moved into utility functions. This is to allow sharing of this functionality with newly- added PESourceLineWriter. - Added a unit test to dump_syms for the PE-only scenario. Change-Id: If0855f05d424d32d23f484995be5f34232179a37 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1525325 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Fix dump_syms unit tests on Windows.Nelson Billing2019-03-186-317/+317
| | | | | | | | | | | | | | | - Baselines appeared to be stale. dump_syms now prints FUNC entries with the full function signature, whereas the baselines only contained the function name. The current state of the symbol file docs (https://chromium.googlesource.com/breakpad/breakpad/+/refs/heads/master/docs/symbol_files.md) seem to agree with the new FUNC entries rather than the old ones. Example of a name given in current docs: "nsQueryInterfaceWithError::operator()(nsID const&, void**) const". Change-Id: I9e01354cd82b7184b7cba31d132603e949a657ac Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1529133 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Write field indicating multiple symbols at an address in dump_symsMike Wittman2017-12-116-18/+8
| | | | | | | | | | | Updates dump_syms to write the optional 'm' first field in FUNCTION and PUBLIC records to indicate that the address corresponds to more than one symbol. Bug: google-breakpad:751 Change-Id: I850b0122324ed5f9ec747aa92ba354a3126a7ef9 Reviewed-on: https://chromium-review.googlesource.com/820711 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Add optional field indicating multiple symbols at an addressMike Wittman2017-11-292-4/+15
| | | | | | | | | | | | | | | | | | 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>
* Update test data for identical-code-folded symbol changesMike Wittman2017-11-286-6/+6
| | | | | | | Bug: google-breakpad:749 Change-Id: I2e56c8414c98c95372bd73811581cf1e98efe88e Reviewed-on: https://chromium-review.googlesource.com/791914 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix issues with Windows dump_syms_unittestJon Turney2017-03-177-2954/+2961
| | | | | | | | | | | | | | | | | | | | | | | | | | * Turn DumpSymsRegressionTest into a parameterized test so it's easier to see which test file is failing * Convert dump_syms_regtest.sym to DOS line endings, being careful to preserve the required spaces at the end of 'STACK WIN' lines * In test #4 (omap_reorder_bbs), since the .exe corresponding to the .pdb is not present, no INFO line is generated in the .sym file. Update .sym file. * Stop collecting stderr from dump_syms. Future work: perhaps it's worth collecting stderr to compare with a different file to verify that "Couldn't locate EXE or DLL file" is output when expected? * Regenerate testdata for test #5 (dump_syms_regtest64), which currently does not pass, seemingly due a mis-match in the PDB age between the .pdb file and the .sym file. Also add the .exe corresponding to the .pdb present, to provide CFI BUG= Change-Id: I54fab866437c9e1bad3a5534cef4fe4b6ae47cd2 Reviewed-on: https://chromium-review.googlesource.com/453178 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* windows: update gtest/gmock pathsMike Frysinger2017-02-111-3/+2
| | | | | | | | | The Windows build has rotted a bit with the gtest/gmock updates. Update all of the paths to fix things up again. Change-Id: Id67ce76abfd331c0543aa4bd1138e9cc13a18c75 Reviewed-on: https://chromium-review.googlesource.com/441584 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Change PrintFunctions to print functions in address order and not print ↵wfh@chromium.org2014-04-236-14714/+13774
| | | | | | | | | | | duplicate public functions. BUG=427 R=mark@chromium.org Review URL: https://breakpad.appspot.com/1634002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1319 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Change the way function and public symbols are obtained to use the ↵wfh@chromium.org2014-04-166-13615/+14558
| | | | | | | | | | | | | | findChildren DIA function. This has a substantial performance improvement over using the getSymbolsByAddr iterator, especially on certain 64bit DLLS. e.g. Time to process chrome_child.dll drops from 51 minutes to 21 secs. Note: new test data looks different because the ordering of lines is no longer by memory address. This does not affect processing. The test data has been manually compared to old data and matches (except additional PUBLIC symbols). Also, INFO lines are omitted because the source executable files are not checked in, so they are unavailable. R=ivanpe@chromium.org, mark@chromium.org Review URL: https://breakpad.appspot.com/1574002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1316 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Moving directory 'build' one level up as it collides with a file named ↵ivan.penkov@gmail.com2014-04-101-1/+1
| | | | | | | | | | 'BUILD' which happens to be in that same location in the Google source depot. R=chrisha@chromium.org, mark@chromium.org Review URL: https://breakpad.appspot.com/1504002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1308 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Move build configuration to root of repository.chrisha@chromium.org2014-04-031-2/+2
| | | | | | | | | | | This is in preparation for creating GYP build files for each platform. BUG=https://code.google.com/p/google-breakpad/issues/detail?id=575 R=mark@chromium.org Review URL: https://breakpad.appspot.com/1414002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1304 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add support for Win64 stack unwind data as STACK CFIwfh@chromium.org2014-03-244-0/+4568
| | | | | | | | | | | | | | | | This is a copy of https://breakpad.appspot.com/1264002/ where code review took place. See https://bugzilla.mozilla.org/show_bug.cgi?id=548035 and https://code.google.com/p/chromium/issues/detail?id=115922 Credit to Mikhail I. Izmestev <izmmishao5@gmail.com> for original patch in https://breakpad.appspot.com/345002/ BUG=572 TEST=Run dump_syms_unittest after compiling dump_syms_regtest.cc with x64 toolchain R=mark@chromium.org Review URL: https://breakpad.appspot.com/1274002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1290 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add explicit OMAP support to dump_syms.chrisha@chromium.org2013-05-0114-14100/+18463
| | | | | | | | | | | | | | This CL adds new utilities to common/windows for handling OMAP information in PDB files. It then augments PdbSourceLineWriter with explicit OMAP knowledge so that symbolization will proceed more cleanly for images whose PDB files contain OMAP information. This makes breakpad handle OMAPped symbol files as cleanly as WinDbg. Review URL: https://breakpad.appspot.com/570002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1167 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make dump_syms output an INFO CODE_ID line that includes the code file and ↵ted.mielczarek2010-10-051-2/+2
| | | | | | | | code identifier. (Currently disabled to give Breakpad users time to update their processor code.) R=mark at http://breakpad.appspot.com/180001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@710 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix newlines (#253). rs=ted.mielczarekmmentovai2008-04-071-222/+222
| | | | | | | http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/7e62a299ce3fa222 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@255 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Rename Airbag to Breakpad.mmentovai2007-02-146-1589/+14164
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@122 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Test data update following PDBSourceLineWriter change (#91). r=brynermmentovai2006-12-071-1/+1
| | | | | | | http://groups.google.com/group/airbag-dev/browse_thread/thread/d713d3e73aa1a0dd git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@78 4c0a9323-5329-0410-9bdc-e9ce6186880e
* symupload parameters don't match processor expectations (#91). r=brynermmentovai2006-12-061-0/+4
| | | | | | | | | | | | | | | | | - Interface change: the "guid" and "age" parameters supplied to a symbol server by symupload have been merged into "debug_identifier". Some other parameters have had their names changed. Additional code_file, os, and cpu parameters have been added. - Interface change: the format of the MODULE line at the top of dumped .sym files has changed slightly. The fields used for uuid and age have merged into a debug_identifier-type field. - debug_identifier is formatted the same way as CodeModule::debug_identifier for ease of server-side processing. http://groups.google.com/group/airbag-dev/browse_thread/thread/8022f504cf01f994 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@77 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Support GUID-less PDBs (#77). r=brynermmentovai2006-11-212-11/+2
| | | | | | | | | | | | - Handle MDCVInfoPDB20-based PDBs by outputting a signature instead of a guid in the MODULE line. - Identify the OS and CPU in the MODULE line. - Suppress multiple subsequent identical STACK WIN lines. http://groups.google.com/group/airbag-dev/browse_thread/thread/0f54e2c33ed5d82d git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@70 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Airbag client libraries should compile under MSVC .NET 2003/7.1 (#64).mmentovai2006-11-152-9/+7
| | | | | | | | | r=bryner http://groups.google.com/group/airbag-dev/browse_thread/thread/b838faeb50f71818 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@64 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Symbol file should contain module GUID at beginning (#66). r=brynermmentovai2006-11-063-1598/+1614
| | | | | | | | | | | | | | | | - 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
* Support building with WIN32_LEAN_AND_MEAN (#60)mmentovai2006-10-262-2/+12
| | | | | | | | | | | | | - All Windows code now builds with WIN32_LEAN_AND_MEAN by default. - Header inclusion is adjusted as needed. Remove use of UuidToString (#39) - Also breaks dependency on RpcStringFree and therefore rpcrt4.lib. r=bryner http://groups.google.com/group/airbag-dev/browse_thread/thread/30f844cfc7ccd37f git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@51 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Handle frame pointer omission, (#21), part 4 (final part!): FPO stackwalker.mmentovai2006-10-201-93/+93
| | | | | | | | | | | | | r=bryner - This change allows Airbag to properly walk win32 stacks produced by code built with MSVC's frame pointer omission optimization (/Oy). This optimization is enabled at /O1 and /O2. - There too many interface and file format changes to list here. http://groups.google.com/group/airbag-dev/browse_thread/thread/85ce85bfa8457ece git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@42 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Implement a tool to upload symbols on Windows, given an exe or dll file withbryner2006-10-164-618/+210
| | | | | | | | debugging info. Refactor common code into HTTPUpload so that the multipart POST request code can be shared with CrashReportSender. #47 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@39 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Handle frame pointer omission (#21), part 3: SourceLineResolver and ↵mmentovai2006-09-283-1/+144
| | | | | | | | | | | | | | | | | | | PDBSourceLineWriter changes. r=bryner. - PDBSourceLineWriter (dump_syms) outputs stack frame debugging information - SourceLineResolver reads the new information and puts it into a new StackFrameInfo structure, which is stored in a ContainedRangeMap. FillSourceLineInfo passes the StackFrameInfo back to the caller. - The base Stackwalker makes StackFrameInfo data available to subclasses during stackwalking, but does not use this information directly itself. Stackwalkers may access stack_frame_info_ for enhanced stackwalking (this will be part 4). - New test data for the updated dumped-symbol format http://groups.google.com/group/airbag-dev/browse_thread/thread/735f191c9a1a1de4 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@38 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Relicense to BSD (#29). r=brynermmentovai2006-09-207-30/+105
| | | | | | | http://groups.google.com/group/airbag-dev/browse_thread/thread/5f19f13fc172c4e0 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@31 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make SourceLineResolver use RangeMap (#13). r=brynermmentovai2006-09-083-354/+360
| | | | | | | | | | | | | | | - Eliminate MemAddrMap from source_line_resolver.cc and adapt it to use RangeMap, also used by minidump.cc. - RangeMap operates on both a base address and a size, where MemAddrMap only used a base address, so the dumped symbol file format is modified to include size information. dump_syms produces these files and SourceLineResolver consumes them. - Provide updated test data conforming to the new dumped symbol format. http://groups.google.com/group/airbag-dev/browse_thread/thread/e9403cf3ad6336a1 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@21 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Initial import, which includes the Windows client-side dump_syms tool, andbryner2006-08-257-0/+2088
part of the server-side dump processor. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@4 4c0a9323-5329-0410-9bdc-e9ce6186880e