aboutsummaryrefslogtreecommitdiff
path: root/src/tools/mac/dump_syms/dump_syms_tool.mm
Commit message (Collapse)AuthorAgeFilesLines
* Fix Mac Breakpad host tools to build in Linux cross-compileTed Mielczarek2015-09-161-257/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're working on building our Firefox Mac builds as a Linux cross-compile (https://bugzilla.mozilla.org/show_bug.cgi?id=921040) and we need symbol dumping to work. This change ports the Mac dump_syms tool to build and work on Linux. I've tested it and it produces identical output to running the tool on Mac. The bulk of the work here was converting src/common/mac/dump_syms.mm and src/tools/mac/dump_syms/dump_syms_tool.mm from ObjC++ to C++ and removing their use of Foundation classes in favor of standard C/C++. This won't compile out-of-the-box on Linux, it requires some Mac system headers that are not included in this patch. I have those tentatively in a separate patch to land in Gecko (http://hg.mozilla.org/users/tmielczarek_mozilla.com/mc/rev/5fb8da23c83c), but I wasn't sure if you'd be interested in having them in the Breakpad tree. We could almost certainly pare down the set of headers included there, I didn't spend too much time trying to minimize them (we primarily just need the Mach-O structs and a few associated bits). I just realized that this patch is missing updating the XCode project files (ugh). I'll fix that up in a bit. R=mark@chromium.org BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=543111 Review URL: https://codereview.chromium.org/1340543002 .
* Support object files larger than 2**32.erikchen@chromium.org2015-04-221-2/+2
| | | | | | | Reviewed at https://breakpad.appspot.com/7834002/#ps340001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1453 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix UMR and potential crash in Mac dump_syms.mark@chromium.org2014-11-051-1/+2
| | | | | | | | | | | | Patch by Robert Sesek <rsesek@chromium.org> BUG=https://code.google.com/p/google-breakpad/issues/detail?id=614 R=mark@chromium.org Review URL: https://breakpad.appspot.com/9724002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1401 4c0a9323-5329-0410-9bdc-e9ce6186880e
* In Mac dump_syms, allow reading debug data out of both the Mach-O file and ↵rsesek@chromium.org2014-07-251-9/+103
| | | | | | | | | | | | | | | | | | | | | | | the dSYM. This adds a new |-g <dSYM path>| flag to dump_syms, to specify the dSYM path for the target Mach-O argument. The UUIDs and architectures of the two paths must match in order to dump symbols for this "split module." This reason for this is that for x86_64 binaries on OS X, the CFI data is stored in the __TEXT,__eh_frame segment of the Mach-O file, and the data is not copied into the dSYM by dsymutil. Therefore, just dumping the dSYM doesn't yield CFI data for x86_64 files, and both the dSYM and the Mach-O file must be dumped in order to produce a complete Breakpad symbol file. For i386 binaries, the CFI data is stored in the __DWARF,__debug_frame segment, which is part of the dSYM, so this isn't necessary. BUG=https://code.google.com/p/chromium/issues/detail?id=393594 R=mark@chromium.org Review URL: https://breakpad.appspot.com/6704002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1359 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix mac dump_syms after r1163.thestig@chromium.org2013-05-081-3/+9
| | | | | | | | R=mark@chromium.org Review URL: https://breakpad.appspot.com/592002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1175 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow reading just CFI data when reading symbolsted.mielczarek@gmail.com2013-03-061-2/+2
| | | | | | R=thestig at https://breakpad.appspot.com/517002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1124 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add custom implementation of NXGetArchInfoXXX to allow adding new arch.qsr@chromium.org2012-10-031-2/+5
| | | | | | | | | NXGetArchInfoXXX depends on the OS knowledge of architecture. This CL adds a custom implementation of those methods to be able to handle newer CPU before they are handled by the OS. It also add handling for armv7s architecture. Review URL: https://breakpad.appspot.com/475002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1057 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux/Mac: Add option to omit the CFI section in dump_syms.thestig@chromium.org2011-09-141-8/+13
| | | | | | Review URL: http://breakpad.appspot.com/304001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@835 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Switch mac DumpSymbols::WriteSymbolFile to take an ostream instead of a ↵ted.mielczarek2011-07-261-1/+2
| | | | | | | | FILE* to match the changes to Module::Write R=mark at http://breakpad.appspot.com/294001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@818 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Mac symbol dumper: Unify with Linux dumper; support DWARF CFI.ted.mielczarek2010-06-251-18/+36
| | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the Mac symbol dumper to use the same set of classes the Linux dumper does for reading debugging information from various sources, consolidating them into a single table, and writing that out as a Breakpad symbol file. In the process, it also adds support for dumping DWARF call frame information and .eh_frame exception-handling information as Breakpad 'STACK CFI' records. This allows the Breakpad processor to generate stack traces from code compiled with -fomit-frame-pointer. The patch also replaces the DumpSymbols Objective C++ class with google_breakpad::DumpSymbols, a plain C++ class. The code still uses some Objective C++ to use the Foundation facilities for dealing with file names in a file-system-independent fashion, and for examining the contents of .dSYM bundles. Since the code has been entirely rewritten, I have changed the author lines. A=jimb R=mark git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@614 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Mac dumper: Change the dumper to be more C++-ish.ted.mielczarek2010-06-251-45/+32
| | | | | | | | | | | | | | | | | | Instead of using bzero in main, use constructors to initialize the Options structure. Use C++ bool, not Objective-C BOOL. Use a const NXArchInfo * to represent the architecture name, so that we can use the NXGetLocalArchInfo, NXGetArchInfoFromName, etc. to handle things. Delete the 'uuidStr' member; it is unused. Leave Options::srcPath as an NSString, so that we can continue to use the filesystem path abstraction methods provided by the Foundation framework. A=jimb R=mark git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@611 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Added DWARF support to Breakpad client. Thanks to Google for open sourcing ↵nealsid2008-10-081-0/+142
their DWARF code! Modified dump_syms to detect dSYM bundles or a binary with DWARF data appropriately, and convert data from DWARF reader to dump_syms native structures R=danny.berlin (original writer of DWARF code) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@286 4c0a9323-5329-0410-9bdc-e9ce6186880e