aboutsummaryrefslogtreecommitdiff
path: root/src/client
Commit message (Collapse)AuthorAgeFilesLines
* Minor cleanup in src/client/linux/minidump_writer/minidump_writer_unittest.cc.thestig@chromium.org2012-11-081-18/+18
| | | | | | Review URL: https://breakpad.appspot.com/486002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1078 4c0a9323-5329-0410-9bdc-e9ce6186880e
* SuspendThread returns a DWORD value, so checking the return value with ">= 0"ivan.penkov@gmail.com2012-11-011-3/+6
| | | | | | | | | | | doesn't work. On failure, the return value is (DWORD) -1 (which is 0xFFFFFFFF). http://breakpad.appspot.com/491002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1075 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fixing Windows client unit tests. They were broken in r1034 due to gMock andivan.penkov@gmail.com2012-10-198-16/+449
| | | | | | | | | | | | gTest upgrade. While fixing the broken tests I also used the opportunity to add a few more tests that cover filter and callback execution, and nesting of exception handlers. https://breakpad.appspot.com/489002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1073 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some compiler errors in exception_handler_unittest by casting like crazyted.mielczarek@gmail.com2012-10-151-2/+4
| | | | | | R=digit at https://breakpad.appspot.com/483002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1072 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make Linux signal handler more robust.digit@chromium.org2012-10-092-0/+60
| | | | | | | | | | | | | | | | | | | | | | Breakpad can be used on processes where a mistaken library saves then restores one of our signal handlers with 'signal' instead of 'sigaction'. This loses the SA_SIGINFO flag associated with the Breakpad handler, and in some cases (e.g. Android/ARM kernels), the values of the 'info' and 'uc' parameters that ExceptionHandler::SignalHandler() receives will be completely bogus, leading to a crash when the function is executed (and of course, no minidump generation). To work-around this, have SignalHandler() check the state of the flag. If it is incorrectly unset, re-register with 'sigaction' and the correct flag, then return. The signal will be re-thrown, and this time the function will be called with the correct values. Review URL: https://breakpad.appspot.com/481002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1067 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix the Android unit tests.digit@chromium.org2012-10-091-4/+0
| | | | | | | | | | | | | | | | | | | - One of the unit test binaries refused to link due to missing linker flags. - The WriteDSODebug() function now works on Android, so do not special-case it anymore. - Ensure android/run-checks.sh will complain properly if the client unit test suite fails on Android. It used to consider that such failures were acceptable. Note that it still considers failures when running the tools and processor test suite on the device normal (fixing this is a lot harder, and these parts of Breakpad typically never run on a device, but on the host). Review URL: https://breakpad.appspot.com/482002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1066 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Don't bail if a thread's stack pointer is invalidmkrebs@chromium.org2012-10-087-36/+137
| | | | | | | | | | | | | | Currently, if a thread's stack pointer is not within a valid memory page, the minidump writing will fail with an error. This change allows an invalid stack pointer by simply setting the memory size to zero in the minidump. The processing code already checks for the size being zero, although it currently just gives an error (see https://breakpad.appspot.com/413002/). BUG=google-breakpad:499, chromium-os:34880 TEST=make check, manually ran minidump-2-core and core2md Review URL: https://breakpad.appspot.com/478002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1065 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
* Fix an analyzer warning due to value assigned but not used.kenbongort@gmail.com2012-10-031-2/+0
| | | | | | | http://breakpad.appspot.com/473002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1058 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add custom implementation of NXGetArchInfoXXX to allow adding new arch.qsr@chromium.org2012-10-031-0/+12
| | | | | | | | | 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
* Fix merge error from r1055ted.mielczarek@gmail.com2012-10-021-1/+0
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1056 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix linux compile errors for some systems.qsr@chromium.org2012-10-022-10/+11
| | | | | | | | Codereview: https://breakpad.appspot.com/460002/ Patch by: jakerr@google.com git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1055 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix the Linux build with clang.thestig@chromium.org2012-09-261-0/+1
| | | | | | Review URL: https://breakpad.appspot.com/470002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1052 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a bunch of small nits.thestig@chromium.org2012-09-261-52/+50
| | | | | | Review URL: https://breakpad.appspot.com/463004 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1051 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a parsing error in the Linux dump writer.thestig@chromium.org2012-09-261-7/+11
| | | | | | Review URL: https://breakpad.appspot.com/464002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1050 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a really stupid bug in WriteMinidumpForChildProcessted.mielczarek@gmail.com2012-09-241-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1047 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Turn on more warnings in ios / mac projects.qsr@chromium.org2012-09-216-21/+44
| | | | | | | | | | | | | | | 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
* Minidumps never contain MD_LINUX_DSO_DEBUG info when breakpad is in a shared ↵ted.mielczarek@gmail.com2012-09-195-100/+107
| | | | | | | | | library A=Mike Hommey <mh@glandium.org> R=ted at http://breakpad.appspot.com/422002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1044 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow generating minidumps from live process on Linux via ExceptionHandlerted.mielczarek@gmail.com2012-09-187-7/+168
| | | | | | | Original patch by Chris Jones <jones.chris.g@gmail.com> at https://bugzilla.mozilla.org/show_bug.cgi?id=544936 and https://bugzilla.mozilla.org/show_bug.cgi?id=555309 R=mark at https://breakpad.appspot.com/449003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1043 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow generating minidumps from live processes on Windows.ted.mielczarek@gmail.com2012-09-182-110/+215
| | | | | | R=mark at https://breakpad.appspot.com/115002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1042 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow adding extra memory regions to minidump on linux/windowsted.mielczarek@gmail.com2012-09-189-36/+443
| | | | | | | A=Bill McCloskey <wmccloskey@mozilla.com>, ted, original patch from https://bugzilla.mozilla.org/show_bug.cgi?id=662646 R=mark at https://breakpad.appspot.com/450002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1041 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add a GetInstructionPointer method to MinidumpExceptionted.mielczarek@gmail.com2012-09-173-117/+9
| | | | | | R=mark at https://breakpad.appspot.com/444003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1039 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make my_str_len/my_itos take uintmax_tted.mielczarek@gmail.com2012-09-171-2/+2
| | | | | | R=digit at https://breakpad.appspot.com/452004/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1038 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Allow setting a new MinidumpDescriptor on ExceptionHandler, also expose ↵ted.mielczarek@gmail.com2012-09-174-3/+29
| | | | | | | | directory from MinidumpDescriptor R=digit at https://breakpad.appspot.com/452003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1037 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix compilation of crash_generation_server.cc, and add it to the client ↵ted.mielczarek@gmail.com2012-09-171-1/+1
| | | | | | | | library sources so it actually gets built. R=mark at https://breakpad.appspot.com/446003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1036 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix of a race condition during Crash Generation Server startupivan.penkov@gmail.com2012-09-071-3/+6
| | | | | | | | https://breakpad.appspot.com/445002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1031 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix the Linux build on Ubuntu 12.04 LTSdigit@chromium.org2012-09-061-2/+2
| | | | | | | | | | | | This fixes the build, which fails because the initialization values for an array of struct sigaction cannot be { 0 }. + Get rid of warning related to unused return value for ftruncate() BUG=492 Review URL: https://breakpad.appspot.com/447002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1027 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix README.ANDROID + formattingdigit@chromium.org2012-09-051-2/+2
| | | | | | | | | | | This patch updates README.ANDROID, since the client library now supports directly generating a minidump without raising a signal, and that it builds and runs fine on Android/x86. + Formatting fixes in minidump_writer_unittest.cc Review URL: https://breakpad.appspot.com/446002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1026 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Properly redeliver (or don't) signals to the previous handlers.mark@chromium.org2012-09-043-72/+304
| | | | | | | | | | | | | | | | | | | | | | | | If none of the installed ExceptionHandlers handle a signal (their FilterCallbacks or HandlerCallbacks all return false), then the signal should be delivered to the signal handlers that were previously installed. This requires that old_handlers_ become a static vector so that we can restore the handlers in the static HandleSignal. Currently it is also restoring signals in ~ExceptionHandler (if there are no others). This should not be required since our documentation states that a process can only have one ExceptionHandler for which install_handlers is true (and so we get the correct behavior if we simply leave our handlers installed forever), but even the tests themselves violate that. Patch by Chris Hopman <cjhopman@chromium.org> Review URL: https://breakpad.appspot.com/440002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1025 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add custom getcontext() implementation for Android.digit@chromium.org2012-08-311-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This adds a minimalistic implementation of getcontext() for Android/ARM and Android/x86. The provided code is in assembly and only implements the bare minimum required by Breakpad to get the current processor state. Note that: - The FPU state is not saved to the ucontext_t on ARM. (that's actually the main difference with a normal getcontext() implementation). This is normal. On Linux/ARM, such state must be obtained with PTRACE_GETVFPREGS instead. This will be implemented in a future patch. - On x86, only the 'regular' FPU state is saved, to mimic the GLibc/i386 implementation. The state of SSE/SSE2/etc registers is not part of the upstream getcontext() implementation. Review URL: https://breakpad.appspot.com/444002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1024 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix minidump_writer_unittest on Androiddigit@chromium.org2012-08-301-4/+3
| | | | | | | | Android doesn't have /bin/cp, so instead do the copy manually with CopyFile() Review URL: https://breakpad.appspot.com/442002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1022 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix Linux/ARM GetInstructionPointer() in minidump_writer.ccdigit@chromium.org2012-08-301-1/+1
| | | | | | | | On ARM, the 'ip' register (a.k.a. r12) is not the same than 'pc' (a.k.a. r15) which holds the real instruction pointer. Review URL: https://breakpad.appspot.com/443002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1021 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix the tools and processor build for Androiddigit@chromium.org2012-08-211-2/+2
| | | | | | | | | | | | | | | | | | This small patch allows the build of the tools and processor when targetting Android with the Automake/Autconf build. Not that these necessarily work correctly at the moment, but there is no need for --disable-tools --disable-processor now when using --host=arm-linux-androideabi or --host=i686-linux-android. + Modify android/run-checks.sh to build all binaries with the Automake build. + Tiny fix for --abi=x86 in android/run-checks.sh Review URL: https://breakpad.appspot.com/438002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1018 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Improve Android supportdigit@chromium.org2012-08-217-245/+1
| | | | | | | | | | | | | | | | | | This patch remove many Android-specific #ifdefs from the Breakpad source code. This is achieved by providing "fixed-up" platform headers (e.g. <signal.h> or <sys/user,h>), in the new directory src/common/android/include/, which masks differences between the NDK and GLibc headers. The old "android_link.h" and "android_ucontext.h" are moved and renamed. This also requires putting this directory as the first include path during Android-hosted builds, hence the modification of Makefile.am and configure.ac Review URL: https://breakpad.appspot.com/434002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1017 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix Android build.digit@chromium.org2012-08-202-2/+9
| | | | | | | | | | This patch fixes the Android build, and updates the NDK test application to use the new Linux ExceptionHandler API. + Use string insted of std::string in minidump_descriptor.h Review URL: https://breakpad.appspot.com/433002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1016 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Getting context information from the kernel when catching a SIGABRT on iOS.qsr@chromium.org2012-08-204-9/+39
| | | | | | | | | 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
* Fixing a Windows compiler warning in ↵ivan.penkov@gmail.com2012-08-173-6/+4
| | | | | | | | | | src/client/windows/crash_generation/minidump_generator.cc http://breakpad.appspot.com/432002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1014 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fixing a race condition in the Crash Generation Server which has toivan.penkov@gmail.com2012-08-154-147/+179
| | | | | | | | | | | do with simultaneous handling of dump requests and client process termination events. http://breakpad.appspot.com/430002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1013 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make ExceptionHandler::HandleSignal() public.mark@chromium.org2012-08-102-0/+12
| | | | | | | | | Patch by Alexander Potapenko <glider@chromium.org> Review URL: https://codereview.appspot.com/6461052/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1008 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Adding a way to create an ExceptionHandler that takes in a file descriptorjcivelli@chromium.org2012-08-0910-407/+649
| | | | | | | | | | | | where the minidump should be created, without the need of opening any other file. BUG=None TEST=Run unit-tests. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1007 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Conditionally compiling a unittest - based on whether AddressSanitizer is used. ivan.penkov@gmail.com2012-08-061-0/+7
| | | | | | | | http://breakpad.appspot.com/428002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1004 4c0a9323-5329-0410-9bdc-e9ce6186880e
* SORRY. It seems I've screwed up my commit for ↵digit@chromium.org2012-08-035-63/+67
| | | | | | | | | | http://breakpad.appspot.com/411002/, since revision 1001 only contains the new src/client/linux/linux_libc_support.cc and none of the other required files. I'm not sure what happened, but I'm re-uploading the patch has another issue. Review URL: https://breakpad.appspot.com/426002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1002 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Android ucontext_t handling refinement.digit@chromium.org2012-08-011-13/+116
| | | | | | | | | | | | | | This is a forward-compatible patch to prepare for future versions of the Android C library headers that define ucontext_t. When this patch is applied, Google Breakpad will build and work properly against any version of the NDK or platform headers. See http://code.google.com/p/android/issues/detail?id=34784 for more context. Review URL: https://breakpad.appspot.com/416002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1000 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Speculatively back out r984. See http://codereview.chromium.org/10805065/mark@chromium.org2012-07-257-103/+11
| | | | | | | | | | | and http://build.chromium.org/p/chromium/builders/NACL%20Tests%20%28x64%29/builds/34563 chrome src/native_client/tests/inbrowser_crash_test/crash_dump_tester.py says that the observed failures are a symptom of crash_service.exe itself crashing. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@999 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Speculatively back out r989 per http://codereview.chromium.org/10805065/ :mark@chromium.org2012-07-249-301/+28
| | | | | | | | | | | | | | | | | | | | Ted Mielczarek: > You could try backing out r989, although Mozilla has been running with that > patch for months without issue. Me: > src/client/windows/handler/exception_handler.cc in r989 appears to have > formatting problems, an unwanted property change, and no real Breakpad review > history, so maybe we should back it out anyway until the proper process is > followed. NACL Tests nacl_integration failures: http://build.chromium.org/p/chromium/builders/NACL%20Tests/builds/30138 chrome src/native_client/tests/inbrowser_crash_test/crash_dump_tester.py says that the observed failures are a symptom of crash_service.exe itself crashing. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@998 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Back out r996, reinstating r985. That wasn't it.mark@chromium.org2012-07-244-4/+120
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@997 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Speculatively back out r985 because it may be causing crash_service problemsmark@chromium.org2012-07-244-120/+4
| | | | | | | | for Chrome. See http://codereview.chromium.org/10805065/ . I'll recommit this if it wasn't the problem. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@996 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux: Fix a bunch of clang errors from not handling return values.thestig@chromium.org2012-07-244-12/+20
| | | | | | Review URL: https://breakpad.appspot.com/421002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@995 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix a Windows compiler warning with a cast:mark@chromium.org2012-07-231-1/+1
| | | | | | | | | | | minidump_generator.cc(423) : warning C4267: '=' : conversion from 'size_t' to 'ULONG', possible loss of data Patch by Robert Sesek <rsesek@chromium.org> Review URL: https://breakpad.appspot.com/420002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@994 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Ignore -Wdeprecated-declarations for bootstrap_create_service inmark@chromium.org2012-07-231-0/+3
| | | | | | | | | | | | | OnDemandServer.mm. BUG=crbug.com/137676 TEST=compiles Patch by Robert Sesek <rsesek@chromium.org> Review URL: https://breakpad.appspot.com/419002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@993 4c0a9323-5329-0410-9bdc-e9ce6186880e