Commit graph

977 commits

Author SHA1 Message Date
mkrebs@chromium.org
d80f175c1a Add optional file size limit for minidumps
When there are upwards of 200 threads in a crashing process, each having an
8KB stack, this can result in a huge, 1.8MB minidump file.  So I added a
parameter that, if set, can compel the minidump writer to dump less stack.
More specifically, if the writer expects to go over the limit (due to the
number of threads), then it will dump less of a thread's stack after the
first 20 threads.

There are two ways to specify the limit, depending on how you write minidumps:
1) If you call WriteMinidump() directly, there's now a version of the
   function that takes the minidump size limit as an argument.
2) If you use the ExceptionHandler class, the MinidumpDescriptor object you
   pass to it now has a set_size_limit() method you would call before
   passing it to the constructor.

BUG=chromium-os:31447, chromium:154546
TEST=Wrote a size-limit unittest; Ran unittests
Review URL: https://breakpad.appspot.com/487002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1082 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-15 00:01:13 +00:00
mkrebs@chromium.org
1b75bf9f8a Fix assertion failure in WriteMappings() for zero modules
If there were no mappings where ShouldIncludeMapping() returned true,
AllocateObjectAndArray() would die with an assertion failure.

BUG=chrome-os-partner:14914
TEST=Ran unittests
Review URL: https://breakpad.appspot.com/492002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1081 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-14 22:01:35 +00:00
thestig@chromium.org
bbcdd7711f Fix typo from r1079.
TBR=digit
Review URL: https://breakpad.appspot.com/496002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1080 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-13 02:58:56 +00:00
thestig@chromium.org
81885eea47 Linux: Avoid truncating the vendor id.
Review URL: https://breakpad.appspot.com/495002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1079 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-09 19:15:06 +00:00
thestig@chromium.org
d45abdd839 Minor cleanup in src/client/linux/minidump_writer/minidump_writer_unittest.cc.
Review URL: https://breakpad.appspot.com/486002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1078 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-08 03:12:03 +00:00
ted.mielczarek@gmail.com
fc6f700bb5 Allow processing dumps with missing stack memory for some threads
r=mkrebs at https://breakpad.appspot.com/413002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1077 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-06 16:50:01 +00:00
ivan.penkov@gmail.com
66a21aad61 Wrong %ebp after skipping a frame for which the instruction pointer is not in a known module.
http://breakpad.appspot.com/494002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1076 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-02 21:43:58 +00:00
ivan.penkov@gmail.com
6b91f41a7c SuspendThread returns a DWORD value, so checking the return value with ">= 0"
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
2012-11-01 21:49:06 +00:00
SiyangXie@gmail.com
c14298db63 Fix a compile warning in stack_frame_symbolizer.cc
http://breakpad.appspot.com/493002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1074 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-01 20:58:23 +00:00
ivan.penkov@gmail.com
df8e3973f4 Fixing Windows client unit tests. They were broken in r1034 due to gMock and
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
2012-10-19 18:51:05 +00:00
ted.mielczarek@gmail.com
f9a63cb164 Fix some compiler errors in exception_handler_unittest by casting like crazy
R=digit at https://breakpad.appspot.com/483002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1072 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-15 11:59:45 +00:00
SiyangXie@gmail.com
ff8cad8ae6 Check-in stack_frame_symbolizer.[h|cc] that were missing in r1068.
http://breakpad.appspot.com/484002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1069 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-11 17:58:37 +00:00
SiyangXie@gmail.com
bab770045b Refactor the logic of resolving source line info into helper class.
http://breakpad.appspot.com/459002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1068 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-10 21:41:52 +00:00
digit@chromium.org
f72b9c6ff4 Make Linux signal handler more robust.
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
2012-10-09 18:03:25 +00:00
digit@chromium.org
b52be69e59 Fix the Android unit tests.
- 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
2012-10-09 17:15:06 +00:00
mkrebs@chromium.org
1500c41966 Don't bail if a thread's stack pointer is invalid
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
2012-10-08 20:33:06 +00:00
jimblandy
4ae41d8d20 Comment out unused arguments in definitions, as required by the Google C++ Style Guide.
A=Rafael Ávila de Espíndola <respindola@mozilla.com> R=jimb at https://breakpad.appspot.
com/479003


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1064 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-05 22:07:48 +00:00
jimblandy
9de66be60d Fix out-of-date comment for DwarfCUToModule::FilePrivate::common_strings.
No review.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1063 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-05 21:59:33 +00:00
jimblandy
4fcccf68cb If a specification DIE has a DW_AT_MIPS_linkage_name attribute, don't fail
to add it to the specifications table. Record the fully-qualified name
provided by the demangler in the table.

A=Rafael Ávila de Espíndola <respindola@mozilla.com> R=jimb at https://breakpad.appspot.
com/478004/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1062 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-05 21:47:55 +00:00
qsr@chromium.org
872d464500 Update dump_syms to correctly filter on cpu subtype.
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
2012-10-04 13:26:47 +00:00
digit@chromium.org
a1da3a504b Fix minor Android build failure with Clang.
Review URL: https://breakpad.appspot.com/478003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1060 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-04 12:37:21 +00:00
ted.mielczarek@gmail.com
5e76d87dfe Use DW_AT_MIPS_linkage_name if it is available to get names of functions with arguments during symbol dumping.
A=Rafael Ávila de Espíndola <respindola@mozilla.com> R=ted at https://breakpad.appspot.com/457002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1059 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-04 12:04:18 +00:00
kenbongort@gmail.com
75f6a6bf95 Fix an analyzer warning due to value assigned but not used.
http://breakpad.appspot.com/473002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1058 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-03 17:03:49 +00:00
qsr@chromium.org
9b6b41b8ca Add custom implementation of NXGetArchInfoXXX to allow adding new arch.
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
2012-10-03 16:20:53 +00:00
ted.mielczarek@gmail.com
9f8f461279 Fix merge error from r1055
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1056 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-10-02 12:10:56 +00:00
qsr@chromium.org
a56db25fed Fix linux compile errors for some systems.
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
2012-10-02 10:46:31 +00:00
thestig@chromium.org
47d9afa176 Fix the Linux build with clang.
Review URL: https://breakpad.appspot.com/470002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1052 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-26 19:54:10 +00:00
thestig@chromium.org
d053a94be8 Fix a bunch of small nits.
Review URL: https://breakpad.appspot.com/463004

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1051 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-26 18:59:06 +00:00
thestig@chromium.org
5edf194493 Fix a parsing error in the Linux dump writer.
Review URL: https://breakpad.appspot.com/464002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1050 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-26 17:46:28 +00:00
ted.mielczarek@gmail.com
5b6c092b01 Fix type in string_conversion.cc introduced in r1046
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1049 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-26 00:40:45 +00:00
qsr@chromium.org
6446cfcff0 processor: add arm exception flags
From inspection of Apple headers and
https://llvm.org/svn/llvm-project/lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp

Review: https://breakpad.appspot.com/457003/
Patch by: jaysoffian@gmail.com



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1048 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-25 08:30:48 +00:00
ted.mielczarek@gmail.com
3500120c1f Fix a really stupid bug in WriteMinidumpForChildProcess
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1047 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-24 18:36:34 +00:00
qsr@chromium.org
f1489baeb7 Turn on more warnings in ios / mac projects.
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
2012-09-21 07:58:25 +00:00
qsr@chromium.org
c83cd11615 Update GTM files to latest from
http://google-toolbox-for-mac.googlecode.com/svn/trunk/

Patch by: jakerr@google.com
Review: https://breakpad.appspot.com/452002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1045 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-21 07:55:17 +00:00
ted.mielczarek@gmail.com
0e91d185ca Minidumps never contain MD_LINUX_DSO_DEBUG info when breakpad is in a shared 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
2012-09-19 12:55:16 +00:00
ted.mielczarek@gmail.com
67364c1326 Allow generating minidumps from live process on Linux via ExceptionHandler
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
2012-09-18 18:51:56 +00:00
ted.mielczarek@gmail.com
6a5ab68d56 Allow generating minidumps from live processes on Windows.
R=mark at https://breakpad.appspot.com/115002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1042 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-18 13:55:17 +00:00
ted.mielczarek@gmail.com
61d9b9ff96 Allow adding extra memory regions to minidump on linux/windows
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
2012-09-18 13:54:58 +00:00
mark@chromium.org
3682b31cbe Change an always true comparison to another conditional. Since
next_offset is unsigned, comparing it >= 0 is always true.  Instead,
compare the numbers whose difference makes next_offset.

Patch by Richard Trieu.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1040 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-17 21:55:37 +00:00
ted.mielczarek@gmail.com
52935b4e81 Add a GetInstructionPointer method to MinidumpException
R=mark at https://breakpad.appspot.com/444003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1039 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-17 14:01:28 +00:00
ted.mielczarek@gmail.com
a61c7e6927 Make my_str_len/my_itos take uintmax_t
R=digit at https://breakpad.appspot.com/452004/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1038 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-17 14:01:19 +00:00
ted.mielczarek@gmail.com
54ede03227 Allow setting a new MinidumpDescriptor on ExceptionHandler, also expose 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
2012-09-17 14:01:10 +00:00
ted.mielczarek@gmail.com
a8e7e18656 Fix compilation of crash_generation_server.cc, and add it to the client 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
2012-09-17 14:00:36 +00:00
ted.mielczarek@gmail.com
3e3324b06b Fix processor to build with clang
R=mark at http://breakpad.appspot.com/451002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1035 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-10 19:46:19 +00:00
thestig@chromium.org
44c27420e2 Fix compiler warnings on Ubuntu Precise. Pull in gmock r408 in the process.
BUG=490
Review URL: https://breakpad.appspot.com/448002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1034 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-10 18:26:31 +00:00
ted.mielczarek@gmail.com
ba7e0d9657 Use sys_fstat64 on Android
R=digit at https://breakpad.appspot.com/414002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1033 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-10 13:14:48 +00:00
ivan.penkov@gmail.com
d6a10e6fbb Fix of a race condition during Crash Generation Server startup
https://breakpad.appspot.com/445002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1031 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-09-07 18:01:26 +00:00
digit@chromium.org
b6514a8133 Fix the Linux build on Ubuntu 12.04 LTS
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
2012-09-06 14:24:05 +00:00
digit@chromium.org
f792eecd1e Fix README.ANDROID + formatting
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
2012-09-05 08:08:53 +00:00
mark@chromium.org
343ce73b73 Properly redeliver (or don't) signals to the previous handlers.
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
2012-09-04 22:38:41 +00:00
digit@chromium.org
7e3c538af1 Add custom getcontext() implementation for Android.
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
2012-08-31 18:38:29 +00:00
digit@chromium.org
02f664dbf4 Fix minidump_writer_unittest on Android
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
2012-08-30 12:04:52 +00:00
digit@chromium.org
0efce7d2a8 Fix Linux/ARM GetInstructionPointer() in minidump_writer.cc
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
2012-08-30 12:01:43 +00:00
digit@chromium.org
13d9e27ef0 Fix Breakpad unit tests build for Android.
This patch contains the source-related fixes to ensure that
the Breakpad unit tests build properly when targetting Android.

Calling 'make check' still fails because there is still no
way to run the unit test programs on a device. This will be
addressed by a future patch.

Important notes:

- You must target Android API level 9 (Gingerbread) or higher
  to build the unit tests. This requirement is due to the
  current GTest revision used in the breakpad source tree.

- This patch adds headers providing inlined C library functions
  missing from the NDK (see src/common/android/testing). They
  are inlined to avoid modifying Makefile.am and other build
  files.

- Similarly, the <wchar.h> header-fix under
  src/common/android/testing/include is only required by
  GTest's current revision. E.g. it's not needed when building
  Breakpad as part of Chromium which uses a more up-to-date
  revision.
Review URL: https://breakpad.appspot.com/439002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1020 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-08-23 15:45:01 +00:00
digit@chromium.org
690e294ece Fix the tools and processor build for Android
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
2012-08-21 17:55:47 +00:00
digit@chromium.org
62d486be7c Improve Android support
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
2012-08-21 14:34:48 +00:00
digit@chromium.org
d270dcfa18 Fix Android build.
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
2012-08-20 20:22:05 +00:00
qsr@chromium.org
5f57e963d0 Getting context information from the kernel when catching a SIGABRT on iOS.
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
2012-08-20 13:42:09 +00:00
ivan.penkov@gmail.com
e050c46a53 Fixing a Windows compiler warning in 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
2012-08-17 01:41:05 +00:00
ivan.penkov@gmail.com
d7de392b05 Fixing a race condition in the Crash Generation Server which has to
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
2012-08-15 22:09:42 +00:00
jessicag.feedback
f8c1de5643 Fix narrowing conversion from -1 to size_t
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1010 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-08-14 01:03:14 +00:00
mark@chromium.org
066d09538f Make ExceptionHandler::HandleSignal() public.
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
2012-08-10 15:41:19 +00:00
jcivelli@chromium.org
43c933d7f8 Adding a way to create an ExceptionHandler that takes in a file descriptor
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
2012-08-09 22:59:58 +00:00
jessicag.feedback
1c3f79dfeb Clean up warnings about narrowing conversion
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1006 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-08-07 21:00:36 +00:00
ivan.penkov@gmail.com
5ad99ac174 Prepending file names with "src/" in #include directives is undesirable.
Committed: http://breakpad.appspot.com/427003/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1005 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-08-06 23:30:37 +00:00
ivan.penkov@gmail.com
fd7870028f Conditionally compiling a unittest - based on whether AddressSanitizer is used.
http://breakpad.appspot.com/428002



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1004 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-08-06 21:44:25 +00:00
digit@chromium.org
e0555f5bdf SORRY. It seems I've screwed up my commit for 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
2012-08-03 15:01:52 +00:00
digit@chromium.org
7475fb4bb4 Remove some linux libc calls from client library.
This patch removes a few libc calls from the client library
when generating a minidump.

+ Move the static inlined functions from linux_libc_support.h
  into their own source file to avoid code duplication.

Tested on linux-x86_64 with 'make check' and 'android/run-checks.sh'
Review URL: https://breakpad.appspot.com/411002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1001 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-08-01 17:37:44 +00:00
digit@chromium.org
8f59faffd1 Android ucontext_t handling refinement.
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
2012-08-01 17:36:59 +00:00
mark@chromium.org
c578271545 Speculatively back out r984. See http://codereview.chromium.org/10805065/
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
2012-07-25 15:34:00 +00:00
mark@chromium.org
3279794487 Speculatively back out r989 per http://codereview.chromium.org/10805065/ :
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
2012-07-24 22:45:30 +00:00
mark@chromium.org
28970fab19 Back out r996, reinstating r985. That wasn't it.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@997 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-24 20:33:12 +00:00
mark@chromium.org
febb444dcd Speculatively back out r985 because it may be causing crash_service problems
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
2012-07-24 19:36:34 +00:00
thestig@chromium.org
6b563c50dd Linux: Fix a bunch of clang errors from not handling return values.
Review URL: https://breakpad.appspot.com/421002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@995 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-24 00:15:53 +00:00
mark@chromium.org
63c7f7d7d7 Fix a Windows compiler warning with a cast:
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
2012-07-23 21:35:52 +00:00
mark@chromium.org
5d8db68b51 Ignore -Wdeprecated-declarations for bootstrap_create_service in
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
2012-07-23 19:09:25 +00:00
ted.mielczarek
cd77197264 Fix sizeof bug in HTTPUpload::SendRequest
A=Himanshu <only4coding@gmail.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=710993

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@992 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-20 17:54:32 +00:00
ted.mielczarek
da1568ac03 Move minidump_extension_linux.h contents into minidump_format.h
R=mark at https://breakpad.appspot.com/415002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@991 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-20 12:38:31 +00:00
ted.mielczarek
b6b4451142 Add a filter callback to CrashGenerationServer on mac
A=Rafael Ávila de Espíndola <respindola@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=732173

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@990 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-20 12:24:25 +00:00
ted.mielczarek
2f56276fbf Allow adding extra memory regions to minidump on linux/windows
A=Bill McCloskey <wmccloskey@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=662646

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@989 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-19 22:03:39 +00:00
ted.mielczarek
72542b052d Add some more DWARF ARM register numbers to the DWARF CFI register maps
R=jimb at https://breakpad.appspot.com/418002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@988 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-18 18:13:29 +00:00
ted.mielczarek
4116671cbf Rework dump_symbols.cc using templates and traits classes to handle cross-word-size symbol dumping
R=mark at https://breakpad.appspot.com/393002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@987 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-18 17:55:08 +00:00
ted.mielczarek
972be40f1f Move some ELF-handling bits from file_id.cc to elfutils.{h,cc}
R=mark at https://breakpad.appspot.com/392002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@986 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-18 13:44:34 +00:00
ted.mielczarek
534189b735 Allow the crash generation server to be initialized with a handle instead of a pipe name
A=bsmedberg R=ted at http://breakpad.appspot.com/406002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@985 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-16 15:16:01 +00:00
cdn@chromium.org
e05aab7b6b Add the capability to include an arbitrary data stream within minidumps
This is supplied via a custom field "custom-data-stream"
Review URL: https://breakpad.appspot.com/408002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@984 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-10 18:52:07 +00:00
qsr@chromium.org
47e34e6f07 Fix compilation for iOS on XCode 4.5
Compilation directive for PPC was using MAC_OS_X_VERSION_MIN_REQUIRED.

 This is not correct, as the latest SDKs allow to compile for older version of
Mac OS, but don't contain the ppc headers. Changing the directive to use
MAC_OS_X_VERSION_MAX_ALLOWED instead.

 Moreover, uploader.mm was including pwd.h that was not used and doesn't exist
on the latest iOS SDK.
Review URL: https://breakpad.appspot.com/412002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@982 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-09 12:38:15 +00:00
digit@chromium.org
8d96707553 Add MD_OS_ANDROID definition.
In order to better distinguish Android and Linux minidumps, introduce
a new MD_OS_ANDROID definition, and modify related source code accordingly.

Also append the build-fingerprint to the minidump location descriptor.
This gives more information about the system image the device runs on.
Review URL: https://breakpad.appspot.com/405002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@981 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-04 11:56:26 +00:00
mark@chromium.org
7db2fb7b93 Do not fail crash dump generation if handle operations tracing is not enabled
and yet the fatal exception was STATUS_INVALID_HANDLE.

BUG=131699

Patch by Alex Pakhunov <alexeypa@chromium.org>

Review URL: https://breakpad.appspot.com/409003/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@980 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-03 18:31:08 +00:00
mark@chromium.org
a15a2a6811 Allow the minidump writer to collect handle data so that resulting dump contains
information about opened handles (!handle) and handle operations trace
(!htrace).

Depending on the dump type different amount of data is collected. For a full
dump all handles and complete handle trace are included to the dump. In the case
of a minidump the list of handle operations for a single handle value (the last
handle value that caused STATUS_INVALID_HANDLE exception) is recorded. In either
case the handle trace should be explicitly enabled by the client process (or by
a debugger) in order to produce any handle trace data.

BUG=131699

Patch by Alex Pakhunov <alexeypa@chromium.org>

Review URL: https://breakpad.appspot.com/410002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@979 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-03 16:44:49 +00:00
ivan.penkov@gmail.com
5f6e1f0fe7 Fixing various compiler warnings and applying minor tweaks to allow running of
the mojority of breakpad unittests in Google.

http://breakpad.appspot.com/399002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@978 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-02 22:55:57 +00:00
mark@chromium.org
eb3bf49197 Change #imports that should have been #includes to #include.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@977 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-02 15:34:15 +00:00
mark@chromium.org
0866e8254d Remove 1 static initializer.
Patch by Nico Weber <thakis@chromium.org>

Review URL: https://breakpad.appspot.com/409002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@976 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-07-02 15:33:37 +00:00
ivan.penkov@gmail.com
1a7a0a4d4b Fixing a mem leak in test code
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@975 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-06-29 22:34:04 +00:00
ivan.penkov@gmail.com
6de969a304 This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-06-28 22:46:01 +00:00
digit@chromium.org
93cebf538e Fix Android build of client library
http://breakpad.appspot.com/401002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@973 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-06-27 14:04:52 +00:00
thestig@chromium.org
5f4fd97781 Fix a race condition in AutoCriticalSection.
CID=104232
Review URL: https://breakpad.appspot.com/398002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@972 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-06-19 23:42:18 +00:00
ivan.penkov@gmail.com
1208a8e369 This is a fix for a stackwalker_x86 issue which has to
do with FPO (frame-pointer-omission) optimized context
frames where the context frame represents a Windows
System call stub.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@971 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-06-12 21:18:45 +00:00
mark@chromium.org
c50346b341 CrashGenerationServer's state machine can be invoked from both the application
thread and thread pool threads. This CL serializes access to the FSM state.
Handling of crash dump and client shutdown requests is still done
asynchronously.

Patch by Alex Pakhunov <alexeypa@chromium.org>

BUG=132164
TEST=remoting_unittests.BreakpadWinDeathTest.*

Review URL: https://breakpad.appspot.com/396002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@970 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-06-12 21:06:11 +00:00
qsr@chromium.org
fd67ff286e Fix uploader so that it send the guid to the server.
Review URL: https://breakpad.appspot.com/391002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@969 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-06-06 08:02:48 +00:00
mkrebs@chromium.org
d6b6959e0e sym_upload: Show failure if symbol server gives redirect response
Add a "response_code" parameter to Linux's HTTPUpload::SendRequest() that,
if non-NULL, will be set to the response code of the HTTP request.  Using
that, sym_upload will print a failure message on Linux if the response code
is not 200.  This is in line with the change made by
http://breakpad.appspot.com/77001/ for the Mac version.

BUG=google-breakpad:480, chromium-os:30032
TEST=Ran "sym_upload powertop.sym http://test.webdav.org/redir-tmp/"
     Ran "sym_upload powertop.sym http://clients2.google.com/cr/staging_symbol"
Review URL: https://breakpad.appspot.com/388002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@968 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-05-24 20:22:48 +00:00