aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac/macho_walker.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix pointer style to match the style guideMike Frysinger2020-07-151-10/+10
| | | | | | | | | | 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 Mac Breakpad host tools to build in Linux cross-compileTed Mielczarek2015-09-161-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 .
* Initialize file descriptors to -1, not 0, in MachoWalker.mark@chromium.org2014-02-261-2/+2
| | | | | | | | R=ivan.penkov@gmail.com Review URL: https://breakpad.appspot.com/1174002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1284 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Update dump_syms to correctly filter on cpu subtype.qsr@chromium.org2012-10-041-17/+20
| | | | | | | Right now, if an archive contain multiple executable for the same CPU but with different subtype, there is no way to dump any but the first one. Review URL: https://breakpad.appspot.com/476002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1061 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Turn on more warnings in ios / mac projects.qsr@chromium.org2012-09-211-1/+1
| | | | | | | | | | | | | | | Make casts explicit. This makes casts that loose precision explicit, from here on we will get warnings. The changes in this commit are made without evaluating each cast, asuming the original casts were intentional. Patch by: jakerr@google.com Review: https://breakpad.appspot.com/453002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1046 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Correct compilation warning.qsr@chromium.org2011-11-231-1/+3
| | | | | | | | | 1) Modify src/common/mac/macho_walker.cc to remove a signed vs unsigned comparison. 2) Replace mktemp in test using AutoTmpDir that has been moved from client/mac/tests to common/tests. Review URL: http://breakpad.appspot.com/328001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@888 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Correct incorrect bounds checking.qsr@chromium.org2011-10-201-2/+2
| | | | | | Review URL: http://breakpad.appspot.com/319002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@874 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow to retrieve id of a module from memory instead of going to disk for iOS.qsr@chromium.org2011-10-201-1/+27
| | | | | | | | Allow macho_id and macho_walker to read data from memory. Wire up this when reading module on iOS. Review URL: http://breakpad.appspot.com/319001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@873 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Review: http://breakpad.appspot.com/136001dmaclach2010-07-281-6/+6
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@633 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Clean up build for 64 bit.dmaclach2010-07-191-1/+5
| | | | | | | | | | | Fix up some broken mac projects. Consolidate project settings in xcconfig files. http://breakpad.appspot.com/130001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@627 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Mac symbol dumper: Unify with Linux dumper; support DWARF CFI.ted.mielczarek2010-06-251-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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: Fix compilation warnings on OS X 10.6jimblandy2010-05-051-1/+2
| | | | | | | | | | | | | | | | | Breakpad's Macintosh symbol dumper uses deprecated functions for dealing with mixed-endianness code. This patch provides an overloaded function, ByteSwap, that automatically chooses the OSSwap* functions from <libkern/OSByteOrder.h> appropriate for its argument's size. This patch does *not* address warnings in src/common/mac/dump_syms.mm, because that code is about to be replaced entirely; there's no reason to bother reviewing a big, detailed patch against it. a=jimblandy, r=mark git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@589 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 372 - fix Mac OS X minidump generation code to handle x86-64 properly. ↵ted.mielczarek2010-04-291-1/+3
| | | | | | r=mark at http://breakpad.appspot.com/103001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@578 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 197: reviewed by Waylonisladderbreaker2007-08-161-7/+9
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@200 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 152 - Patch by Dave Camp, Reviewer Chris Rogersted.mielczarek2007-05-031-1/+2
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@152 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 147 - reviewer Waylonisladderbreaker2007-04-031-0/+3
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@138 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Rename Airbag to Breakpad.mmentovai2007-02-141-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@122 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix bug with mach-o walker not properly walking universal binary (Issue #125)waylonis2007-02-071-3/+36
| | | | | | | | | Fix exception handler so that it will properly forward exceptions (Issue #126) r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@119 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Changes to support patch #108:waylonis2007-01-231-4/+1
| | | | | | | | | | | - Calculate unique file id for mach-o files - Add file id support to dump_syms and symupload tools - Fix return values of tools to indicate success or failure - Change dump_syms class to be Objective-C++ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@109 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add classes to: walk mach-o files, look for identifiers, and return a 16 ↵waylonis2007-01-111-0/+207
byte unique identifier. Fixes #106. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@102 4c0a9323-5329-0410-9bdc-e9ce6186880e