aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/handler/minidump_generator.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix pointer style to match the style guideMike Frysinger2020-07-151-92/+92
| | | | | | | | | | 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>
* ios: build for arm64eJoshua Peraza2020-01-031-2/+2
| | | | | | | | | | | | | | When __DARWIN_OPAQUE_ARM_THREAD_STATE64 is set (by default when building for arm64e), fp, lr, sp, pc, and flags (but not x or cpsr) in thread state are prepended with "__opaque" and intended to be accessed via supplied getters which may also authenticate pointers. We don't want to authenticate those pointers (since we expect they may be invalid and want to recover those invalid values) so access them directly. Bug: b/140375065 Change-Id: Ibe6c1dbfb5d68a9d350614445fa06d48873f8549 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1986868 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Rename MDRawContextARM64 and its context flagsJoshua Peraza2018-08-011-4/+4
| | | | | | | | | | This makes way for the addition of a struct matching Microsoft's layout for ARM64. Change-Id: I115f25290863e7438852691d1ec3c9324a42f7a5 Reviewed-on: https://chromium-review.googlesource.com/1152158 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Fix usage of deprecated function CFPropertyListCreateFromXMLData.Sylvain Defresne2016-02-081-3/+3
| | | | | | | | | | | | The function CFPropertyListCreateFromXMLData is deprecated in favor of the function CFPropertyListCreateWithData that is available since the 10.6 OS X SDK and 4.0 iOS SDK. BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=675 BUG=569158 R=mark@chromium.org Review URL: https://codereview.chromium.org/1678063002 .
* Remove use of deprecated CFURLCreateDataAndPropertiesFromResource function.Ivan Penkov2016-01-311-6/+19
| | | | | | | | | | | | | Original change (https://codereview.chromium.org/1527363003/) was failing in CFReadStreamGetBuffer() call, so changed to CFReadStreamRead() to be more conservative. Patch provided by Scott Hancher. BUG= R=mark@chromium.org Review URL: https://codereview.chromium.org/1637433003 .
* Revert "Fix deprecatation warning when building for recent SDKs on iOS/OS X."Olivier Robin2016-01-211-3/+3
| | | | | | | | | | | | | | | | | | | | This reverts CL https://codereview.chromium.org/1563223004/ This reverts commit 7cc0d8562bf8b20b88cc941ba72593cb7230ecf6. CL 1563223004 introduces two bugs on iOS. - Encoding the minidump name with extra percent causing crash server to fail processing the file. - Using a released pointer causing random crashes on upload. The data, resp, err pointers returned in the NSURLSession completion handler is released at the end of the block. When used later (to get the crash ID), it causes a crash. BUG=569158 R=blundell@chromium.org, mark@chromium.org Review URL: https://codereview.chromium.org/1619603002 . Patch from Olivier Robin <olivierrobin@chromium.org>.
* Fix deprecatation warning when building for recent SDKs on iOS/OS X.Sylvain Defresne2016-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fixes the following compilation warning when using recent version of the iOS or OS X SDK by using the recommended new API: ../../breakpad/src/common/mac/HTTPMultipartUpload.m:56:10: error: 'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid. [-Werror,-Wdeprecated-declarations] [key stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; ^ CFURLCreateStringByAddingPercentEscapes ../../breakpad/src/common/mac/HTTPMultipartUpload.m:207:29: error: 'sendSynchronousRequest:returningResponse:error:' is deprecated: first deprecated in iOS 9.0 - Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h [-Werror,-Wdeprecated-declarations] data = [NSURLConnection sendSynchronousRequest:req ^ ../../breakpad/src/client/mac/handler/minidump_generator.cc:158:6: error: 'CFPropertyListCreateFromXMLData' is deprecated: first deprecated in iOS 8.0 - Use CFPropertyListCreateWithData instead. [-Werror,-Wdeprecated-declarations] (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, ^ BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=675 BUG=569158 R=mark@chromium.org Review URL: https://codereview.chromium.org/1563223004 .
* Remove use of deprecated CFURLCreateDataAndPropertiesFromResource function.Ivan Penkov2015-12-181-12/+19
| | | | | | | | | Patch by Scott Hancher BUG= R=mark@chromium.org Review URL: https://codereview.chromium.org/1527363003 .
* Fixing compiler warnings:ivan.penkov@gmail.com2014-02-281-3/+3
| | | | | | | | | | | | - Building Breakpad in Xcode with arm64 architecture. - iOS Patches provided by: Ian Hickson and Greg Vance. R=mark@chromium.org Review URL: https://breakpad.appspot.com/1184003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1286 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Update GTM and enable -Wundef and strict C++11 flags.dmaclach2014-02-261-7/+14
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1283 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix up ~14 warnings about 'Implicit conversion loses integer precision' on iOS.dmaclach2014-02-181-16/+18
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1281 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Generate minidumps for 64-bit ARM apps on iOS.mark@chromium.org2013-11-211-6/+111
| | | | | | | | | | | | | | | Adds an ARM64-specific definition of MDRawContext and support for writing out a minidump when running on ARM64. Additionally, extends the iOS minidump generator for NSExceptions to work on ARM64 as well as ARM. Patch by Colin Blundell <blundell@chromium.org> BUG=542 Review URL: https://breakpad.appspot.com/664002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1235 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Enable the SIGABRT handler on desktop OS Xted.mielczarek@gmail.com2013-08-141-0/+13
| | | | | | R=mark at https://breakpad.appspot.com/618002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1205 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Use stdint types everywhereted.mielczarek@gmail.com2013-03-061-19/+19
| | | | | | R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Update dump_syms to correctly filter on cpu subtype.qsr@chromium.org2012-10-041-3/+5
| | | | | | | 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-12/+19
| | | | | | | | | | | | | | | 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
* Getting context information from the kernel when catching a SIGABRT on iOS.qsr@chromium.org2012-08-201-4/+20
| | | | | | | | | Until now, the context information was the current one when receiving a SIGABRT. This is mainly wrong because the signal handler start in a new context. This instead use the context passed to the signal handler. Review URL: https://breakpad.appspot.com/435002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1015 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Correct various compilation warnings.qsr@chromium.org2012-03-071-4/+5
| | | | | | | | | | - Cast result of _dyld_image_count to prevent compilation warning: The 2 int in both side of the ? operator should have the same type. - Remove unused variable for return values. - Remove unused NSUserDefaults. Review URL: https://breakpad.appspot.com/354001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@929 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix several error-case leaks on the Mac found by clang analysisstuartmorgan2011-11-141-2/+7
| | | | | | | Review URL: http://breakpad.appspot.com/325001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@884 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Do not use mach_vm.h on iOS.qsr@chromium.org2011-10-241-14/+5
| | | | | | | | | | mach_vm.h has been removed from iOS5. Use #define to use vm_ replacement of mach_vm_ functions on iOS. Do not use mach_vm_allocate -> use a stack variable instead. Review URL: http://breakpad.appspot.com/321001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@879 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-5/+23
| | | | | | | | 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
* Handle ios dump.qsr@chromium.org2011-10-111-0/+4
| | | | | | | | | | This change add a flag for ios minidumps and allow handler to recognize it. It doesn't recognize arm specific exceptions that will be logged as unknown type. Review URL: http://breakpad.appspot.com/311002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@855 4c0a9323-5329-0410-9bdc-e9ce6186880e
* #ifdef cpu specific code.qsr@chromium.org2011-10-071-1/+100
| | | | | | Review URL: http://breakpad.appspot.com/307002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@848 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add missing (parentehses.)mark@chromium.org2011-08-261-1/+1
| | | | | | | | BUG=247, chromium:94107 TEST=Minidump file sizes should be manageable Review URL: http://breakpad.appspot.com/300002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@827 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix CalculateStackSize to behave properly when the main thread's stack ismark@chromium.org2011-08-251-24/+32
| | | | | | | | | | | | | | | | | | split up into multiple regions. An older workaround relyied on known fixed stack locations and only filled in the initial page of the stack if it was in a distinct region. The new approach looks upwards for additional regions that appear to be part of the same stack. With PIE on Lion, the stack no longer begins at a fixed address, so the older workaround became ineffective. BUG=247, chromium:94107 TEST=Stacks should run through to _main/start and then stop when examining Chrome on Lion with PIE and "slid" stacks. Review URL: http://breakpad.appspot.com/300001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@826 4c0a9323-5329-0410-9bdc-e9ce6186880e
* The process_id field is unsigned, so we need this cast in c++0x.mark@chromium.org2011-08-111-1/+2
| | | | | | | | | Patch by Rafael Ávila de Espí­ndola <respindola@mozilla.com> https://bugzilla.mozilla.org/show_bug.cgi?id=677644 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@825 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix clang warnings.mark@chromium.org2011-08-111-2/+2
| | | | | | Review URL: http://breakpad.appspot.com/298002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@823 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a typo in r817ted.mielczarek2011-07-271-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@820 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix compilation using the OS X 10.7 SDK by #ifdefing out PPC support when ↵ted.mielczarek@gmail.com2011-07-261-1/+16
| | | | | | | | targeting 10.7, as PPC support has been removed from the 10.7 SDK A=Rafael Ávila de Espíndola <respindola@mozilla.com>, R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=673789 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@817 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix MinidumpGenerator::WriteExceptionStream for writing cross-architecture dumpsted.mielczarek@gmail.com2010-12-161-5/+2
| | | | | | R=mark at http://breakpad.appspot.com/244001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@747 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow out-of-process minidump generation to work on processes of a different ↵ted.mielczarek@gmail.com2010-12-151-93/+253
| | | | | | | | CPU architecture R=mark at http://breakpad.appspot.com/241001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@746 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix WriteMemoryListStream to remove an extraneous loop index variable increment.ted.mielczarek2010-11-301-1/+1
| | | | | | | Patch by timeless <timeless@mozdev.org>, R=me, unittest by me. See https://bugzilla.mozilla.org/show_bug.cgi?id=615534 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@735 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Write a window of memory around the instruction pointer from the crashing ↵ted.mielczarek2010-09-231-2/+120
| | | | | | | | thread to the minidump on OS X. R=nealsid at http://breakpad.appspot.com/200001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@699 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow dumping live processes on OS Xted.mielczarek@gmail.com2010-08-131-1/+4
| | | | | | R=mark at http://breakpad.appspot.com/148001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@647 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Review: http://breakpad.appspot.com/136001dmaclach2010-07-281-7/+10
| | | | 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-12/+19
| | | | | | | | | | | 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
* issue 372 - fix Mac OS X minidump generation code to handle x86-64 properly. ↵ted.mielczarek2010-04-291-4/+23
| | | | | | r=mark at http://breakpad.appspot.com/103001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@578 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Mozilla bug 532713 - OS X client code doesn't decoded extended family ids in ↵ted.mielczarek2009-12-141-0/+15
| | | | | | CPU info. Patch by Jeff Muizelaar <jmuizelaar@mozilla.com>, r=me git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@440 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix compilation of OS X handler on PPC with 10.5 SDK. r=nealsid at ↵ted.mielczarek2009-09-301-17/+4
| | | | | | http://breakpad.appspot.com/30001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@404 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 323 - OS X exception handler / minidump generator should set exception ↵ted.mielczarek2009-06-121-1/+6
| | | | | | address correctly for EXC_BAD_ACCESS . r=nealsid at http://breakpad.appspot.com/15002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@350 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Patch from Jeremy to have better error reporting, and workaround a Cocoa bug ↵nealsid2009-05-151-1/+2
| | | | | | | | | | in different locales R=nealsid A=jeremy git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@339 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Patch from Jeremy Moskovich to build with 10.5 SDK correctly. Also removed ↵nealsid2009-04-211-8/+6
| | | | | | | | | | | externals directory. A=jeremy R=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@328 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Added some sanity checks when iterating over threads in a crashed process. ↵nealsid2008-11-191-22/+47
| | | | | | | | | | In same cases the ESP could be 0. In other cases it would be borked completely(i.e. pointing to an invalid range). R=Jeremy Moskovich git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@295 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 181: Add version info for Mac OS X modules. Found by iterating over ↵nealsid2008-10-221-0/+20
| | | | | | load commands until I found LC_ID_DYLIB. Also modified crash_report to generate version number. Also added suspend/resume capability to exception handler, necessary because exception handling can behave strangely across fork() calls. Also added fix for filtering out functions with no line number information, and for filtering out some multiple inheritance glue the compiler generates. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@291 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Bug fix for issue 263: mach_vm_region_recurse calls have invalid parameter ↵nealsid2008-05-071-3/+2
| | | | | | | | | specified, which succeeds on Leopard but fails on Tiger Reviewer: Chris Rogers(ladderbreaker) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@269 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Updated code to be compliant with style guidelinesnealsid2008-04-291-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@264 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 258: Added test cases for ReadTaskMemory, reorganized project file, ↵nealsid2008-04-251-1/+8
| | | | | | renamed filenames inside comments git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@263 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 254: The problem is that nlist() is compiled out of libc innealsid2008-04-121-1/+1
| | | | | | | | | | | 64-bit builds of Leopard. I ported the code over myself and will check it into the Breakpad tree until we decide there's a better longer-term solution. If you want to diff the changes, the Apple source is in libc/gen/nlist.c(I used 498 from 10.5.2). git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@259 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 246: Dynamic_images.* needs to be 64-bit ready. Created types that are ↵nealsid2008-04-041-86/+192
| | | | | | typedefed to the appropriate types depending on 32/64-bit compilation and modified dynamic_images to use these new types. Tested 32-bit minidump-generation. Also did some code cleanup along the way. Removed all blank lines that had spaces. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@253 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 167: reviewed by Benjamin Smedbergladderbreaker2007-05-221-32/+96
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@174 4c0a9323-5329-0410-9bdc-e9ce6186880e