Commit graph

977 commits

Author SHA1 Message Date
thestig@chromium.org
4191cae361 Initialize a CustomClientInfo variable. (Coverity)
Review URL: https://breakpad.appspot.com/390003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@967 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-05-15 22:33:29 +00:00
mark@chromium.org
df8d4f964f Increase kMinidumpFileLengthLimit from 800000 to 2MB.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@966 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-05-15 22:30:15 +00:00
qsr@chromium.org
d3ad7c4c99 Fixing HTTPMultipartUpload.
The ending boundary for multipart must replace the last boundary, not added
after it.
Review URL: https://breakpad.appspot.com/390002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@965 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-05-15 15:41:08 +00:00
qsr@chromium.org
bbc3789df1 Unprotect the allocator before trying to create a minidump from a signal.
It is impossible to write a minidump with memory protected. This means that
before this change, no minidump were created when a signal was caught, instead
the application froze.
Review URL: https://breakpad.appspot.com/389002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@964 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-05-14 11:34:01 +00:00
mark@chromium.org
05d61dfd83 Bits necessary to send the reports along with the minidumps.
Currently the log file and the minidump are uploaded in two consequent requests,
thus they get different report ids and it's hard to associate them to each
other.
This CL makes the crash uploader send the minidump and the log file together in
a single multipart request, so that they have the same report id and are
accessible from the same landing page.

Patch by Alexander Potapenko <glider@chromium.org>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@963 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-05-11 14:12:43 +00:00
jessicag.feedback
daf16276b4 Fix warning in r961 - C4800
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@962 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-05-07 21:31:31 +00:00
cdn@chromium.org
fa31053b42 wires up the crash client side so that the deferred upload callback can be used.
TEST=N/A 
Review URL: https://breakpad.appspot.com/384001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@961 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-05-03 18:15:11 +00:00
jimblandy
d1118d6e14 In the AMD64 stackwalker, use heuristics to provide %rbp more often, as
subsequent frames are usually unable to use CFI if they don't have an %rbp
value.

a=mrmiller, r=jimb


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@960 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-25 21:11:10 +00:00
ted.mielczarek
e6e778f635 Fix race in VerifyStackReadWithMultipleThreads
Patch by Chris Dearman <chris@mips.com>
R=ted at http://breakpad.appspot.com/377002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@959 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-25 11:42:52 +00:00
ted.mielczarek
e8dbecb42c Fix compiler warning from format string
Patch by Chris Dearman <chris@mips.com>
R=ted at http://breakpad.appspot.com/369002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@958 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-25 11:42:33 +00:00
ted.mielczarek
24c3c97633 Fix compilation warnings related to unchecked return values
Patch by Chris Dearman <chris@mips.com>
R=benchan at http://breakpad.appspot.com/377001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@957 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-25 11:22:09 +00:00
ted.mielczarek
258f2459fc Reap child in VerifyStackReadWithMultipleThreads
Patch by Chris Dearman <chris@mips.com>
R=benchan at http://breakpad.appspot.com/378001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@956 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-25 11:21:45 +00:00
benchan@chromium.org
fb7dbb4c28 Fix file descriptor leak in GetThreadInfoByIndex
Patch by Chris Dearman <chris@mips.com>
Review URL: http://breakpad.appspot.com/376001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@954 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-18 15:33:54 +00:00
cdn@chromium.org
05f02b46ed Set limit on the number of custom client info entries that can be sent with a crash dump.
BUG=123709
TEST=N/A
Review URL: https://breakpad.appspot.com/377004

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@953 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-17 18:20:22 +00:00
cdn@chromium.org
9a3de4160b Expose a callback to allow crash server implementations to defer the uploading of crash dumps to a later time. The client can provide a crash_id when the dump is performed and then at a later time connect again and request that the crash id be uploaded triggering an implementation defined callback.
BUG=473
TEST=CrashGenerationServerTest.*
Review URL: https://breakpad.appspot.com/379001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@952 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-13 22:20:30 +00:00
ted.mielczarek
789eac95fd Fix file descriptor leaks in ExternalDumper test
Patch by Chris Dearman <chris@mips.com>
R=ted at http://breakpad.appspot.com/372002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@951 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-11 20:44:09 +00:00
ted.mielczarek
de8292b1d4 Fix crash_generator error message
Patch by Chris Dearman <chris@mips.com>
R=ted at http://breakpad.appspot.com/374001/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@950 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-11 20:39:35 +00:00
thestig@chromium.org
88ccbb4804 vectors are cleared with "clear()", not with "empty()
A=thakis@chromium.org
R=thestig@chromium.org

Original code review: https://breakpad.appspot.com/377003/
Review URL: https://breakpad.appspot.com/380001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@949 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-11 03:47:07 +00:00
qsr@chromium.org
a66d4b272a Fixed "unused method" warning, reported by Xcode 4.2 on simulator.
Patch by tball@google.com
Review URL: https://breakpad.appspot.com/371002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@948 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-04 11:06:35 +00:00
jimblandy
c6485cb937 Accept version 3 .eh_frame unwinding data, as well as version 1.
a=michaelrmmiller
r=jimblandy


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@947 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-03 23:12:34 +00:00
mark@chromium.org
4f291f0307 Changes to get the breakpad client compiling and running on Android using
ndk-7b.

Patch by Carlos Valdivia <carlosvaldivia@google.com>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@945 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-03 16:38:53 +00:00
ted.mielczarek@gmail.com
ae38954f50 Remove redundant include of CPP specific header files
Patch by Chris Dearman <chris@mips.com>
R=ted at http://breakpad.appspot.com/372001/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@944 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-03 12:54:37 +00:00
ted.mielczarek@gmail.com
7585a27356 Fix several issues in linux_dumper_unittest_helper
Patch by Chris Dearman <chris@mips.com>
R=ted at http://breakpad.appspot.com/369001/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@943 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-04-03 12:48:43 +00:00
mkrebs@chromium.org
78373e45c5 Fix for putting main module as first one in minidump
The first module in a minidump is expected to be for the main executable.
We used to assume that /proc/<pid>/maps always showed that one first, but in
some cases that is no longer true (see comment #7 of the bug).  So this
change makes use of the entry point stored in auxv to make sure we put the
correct module first.

BUG=chromium-os:25355
TEST=Ran Breakpad tests
Review URL: https://breakpad.appspot.com/366002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@942 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-30 23:53:32 +00:00
mkrebs@chromium.org
70f5af9444 Fix GetMainModule() to properly get first module
Change MinidumpModuleList::GetMainModule() to use GetModuleAtIndex() instead
of GetModuleAtSequence() because the former gets the first module that was
in the minidump file, while the latter actually gets the first module when
sorted by address.  While this is pretty much the same thing at the moment,
I have another change in the works that can sometimes affect the module
order in the file.

BUG=chromium-os:25355
TEST=Ran Breakpad tests
Review URL: https://breakpad.appspot.com/366001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@941 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-30 21:59:16 +00:00
benchan@chromium.org
1d8752bf0f Fix memory leak in DisassemblerX86.
A memory leak in DisassemblerX86 is detected by valgrind. This patch
fixes the DisassemblerX86 destructor to properly free the |current_instr_|
variable.

BUG=471
TEST=Run valgrind on disassembler_x86_unittest to verify the leak is gone.
Review URL: https://breakpad.appspot.com/371001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@940 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-30 21:01:09 +00:00
mark@chromium.org
f6147a6460 Fix one more -Wnull-conversion warning.
Patch by Nico Weber <thakis@chromium.org>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@939 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-30 20:36:32 +00:00
mark@chromium.org
07b3445bf1 Fix -Wnull-conversion warnings in breakpad.
Patch by Nico Weber <thakis@chromium.org>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@938 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-30 14:30:06 +00:00
benchan@chromium.org
a5477bbfab Fix class/struct mismatches in forward declarations.
This patch fixes some compiler warnings when compiling with clang.

BUG=none
TEST=Compile with clang and run unit tests.
Review URL: https://breakpad.appspot.com/368001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@937 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-30 05:01:50 +00:00
cdn@chromium.org
e89a7747b8 Unregister waits when a client shuts down so that no further callback events can
fire for that client.

BUG=117890
TEST=N/A
Review URL: https://breakpad.appspot.com/365001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@936 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-22 18:01:50 +00:00
qsr@chromium.org
1e8d2d5a4c Add high level API for breakpad on iOS.
The new API allows to automatically upload repports to the crash server when the application restarts.

 This change also:
 - Correct a bug on the test for correct alignment of the abrt signal handler
 - Add user friendly information on crashes for SIGABRT and NSException
Review URL: https://breakpad.appspot.com/361001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@935 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-13 20:02:40 +00:00
qsr@chromium.org
7facb6a6fb Change iOS implementation to not use exc_server
Instead of using exc_server, the message is parsed directly, and the minidump
is created, then the app is killed.

 Moreover, the only catch exception is exception_raise. This patch remove all
 rereference to exception_raise_state and exception_raise_state_identity.
Review URL: https://breakpad.appspot.com/358001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@934 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-09 19:22:10 +00:00
qsr@chromium.org
b1f858f26b Add SIGABRT handler for mac and iOS.
SIGABRT were not handled while in process. This change add a signal handler to
handle this.
Review URL: https://breakpad.appspot.com/360001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@933 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-09 19:11:58 +00:00
nealsid
61b5dcb168 Add COPYING file per libcurl distribution requirements
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@932 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-09 16:15:20 +00:00
qsr@chromium.org
fe7f63632f Remove static initializer in linux/guid_creator.cc.
There was a static initializer generated for this file in Chrome for Android.

 Patch by pliard@chromium.org
 Original review: http://breakpad.appspot.com/359001/
Review URL: https://breakpad.appspot.com/359002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@931 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-08 18:47:26 +00:00
qsr@chromium.org
76acc0edcd Removing breakpad_exc_server and all references.
This was aimed at replacing exc_server, but was not used.
Review URL: https://breakpad.appspot.com/357001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@930 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-08 00:02:58 +00:00
qsr@chromium.org
af7d5ccf7b Correct various compilation warnings.
- 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
2012-03-07 00:18:29 +00:00
qsr@chromium.org
04548babac Send uptime as milliseconds for Mac and iOS.
All other platform are sending uptime as milliseconds. Changing the
implementation to do the same on Mac and iOS.
Review URL: https://breakpad.appspot.com/355001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@928 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-03-02 08:27:20 +00:00
mark@chromium.org
84a55c5a72 Support for .raSearch in the x86 stackwalker
Patch by Benjamin Smedberg <bsmedberg@gmail.com>


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@927 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-23 22:56:53 +00:00
mark@chromium.org
26c31918f7 Handle program strings with the assignment operator smashed against the next
token.

Patch by Benjamin Smedberg <bsmedberg@gmail.com>


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@926 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-23 22:41:36 +00:00
benchan@chromium.org
907f95c5bd Modify CrashGenerator::CreateChildCrash to copy proc files.
This patch is taken from the downstream version of breakpad in
Chromium OS:  https://gerrit.chromium.org/gerrit/15148

LinuxCoreDumperTest previously assumes the proc files of the child
process created by CrashGenerator::CreateChildCrash() have the same
content as its parent process, which may not be true. This CL modifies
CrashGenerator to copy the proc files of the child process, created by
CreateChildCrash(), before crashing that process.

BUG=chromium-os:25252
TEST=Verified the following:
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
Review URL: https://breakpad.appspot.com/353001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@925 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-23 18:50:08 +00:00
mark@chromium.org
7caf87236a Fix an invalid cast in PostfixEvaluator<ValueType>::EvaluateInternal().
This patch fixes a compilation error with gcc / clang on Linux / Mac OS.

BUG=none
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.

Patch by Ben Chan <benchan@chromium.org>


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@924 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-23 18:44:45 +00:00
ted.mielczarek
f2e937f1cb Add support for @ operator to PostfixEvaluator
R=mark at http://breakpad.appspot.com/349002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@923 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-21 23:15:30 +00:00
mark@chromium.org
80bcce941e Move away from the 10.4 SDK.
Review URL: https://breakpad.appspot.com/351001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@922 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-21 21:33:09 +00:00
mark@chromium.org
6fbc102794 Funnel all bootstrap_register calls through a routine that doesn't care that
it's deprecated. Apple marked bootstrap_register as deprecated on 10.5 but
it's actually still needed on that OS release. There isn't a way to get the
functionality Breakpad needs from it without calling it until 10.6.
Review URL: https://breakpad.appspot.com/350001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@921 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-21 21:24:43 +00:00
ted.mielczarek
430c0a371a Add some missing #includes
P=Albert Zeyer
R=ted at http://breakpad.appspot.com/289001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@920 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-15 16:26:32 +00:00
ted.mielczarek
11ee73fc55 Add filename to error message when PDBSourceLineWriter::Open fails
P=Albert Zeyer
R=ted at http://breakpad.appspot.com/286002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@919 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-15 15:29:44 +00:00
ted.mielczarek
87063908ad Avoid setting an alternative stack for signals if there is already one
P=Mike Hommey <mh@glandium.org>
R=ted at http://codereview.appspot.com/5573054/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@918 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-14 13:21:39 +00:00
qsr@chromium.org
199703cbff Add missing include.
As the include define some method to be inlined, not having the include breaks the compilation of optimized builds.
Review URL: https://breakpad.appspot.com/347002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@917 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-14 12:14:31 +00:00
qsr@chromium.org
5d7f694f27 Creating minidump for uncaught exception on iOS.
This CL adds a minidump_generator that can write a minidump from a NSException
on iOS on an ARM cpu.

 This CL also install an uncaught exception handler on iOS, and use the
previous generator to write minidumps for any uncaught exception.
Review URL: https://breakpad.appspot.com/347001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@916 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-14 08:46:26 +00:00
mark@chromium.org
8e3dcd5a02 createDirectoryAtPath:attributes: is deprecated, use the suggested (10.5+)
replacement.

Patch by Nico Weber <thakis@chromium.org>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@915 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-09 20:31:08 +00:00
mark@chromium.org
a4c66ebff5 Fix clang warning about format string.
Patch by Nico Weber <thakis@chromium.org>.

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@914 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-09 20:30:31 +00:00
mark@chromium.org
3aa10d2a87 NXSwapBigIntToHost is deprecated, use CFSwapInt32BigToHost instead.
Patch by Nico Weber <thakis@chromium.org>


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@913 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-06 17:33:12 +00:00
jimblandy
5e4f6feaf6 Breakpad DWARF: Add support for DWARF 4 attribute forms.
This patch allows Breakpad's DWARF reader to at least read or skip
attributes using the new forms defined in version 4 of the DWARF
specification, instead of crashing.

Attributes encoded using DW_FORM_flag_present, DW_FORM_sec_offset, and
DW_FORM_exprloc should work fine now. However, compilation units using
DW_FORM_ref_sig8 to refer to types in .debug_types will need further work
to support. (GCC 4.6.2 does not emit .debug_types sections.)

Specifically:

- dwarf2reader::DwarfForm gets new values.
- dwarf2reader::Dwarf2Handler and dwarf2reader::DIEHandler get new handler
  methods, named ProcessAttributeSignature, for DW_FORM_ref_sig8 attributes.
- dwarf2reader::CompilationUnit reads DW_FORM_ref_sig8 attributes, and
  passes them to ProcessAttributeSignature. It also gets support for
  DW_FORM_sec_offset, DW_FORM_exprloc, and DW_FORM_flag_present, using the
  existing appropriate ProcessAttribute* methods.
- dwarf2reader::DIEDispatcher passes through ProcessAttributeSignature
  attributes to its DIEHandler.
- Unit tests are updated.

a=jimb, r=ted.mielczarek
Review URL: http://breakpad.appspot.com/343003/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@912 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-01 15:01:54 +00:00
jimblandy
08b912f1ed Breakpad DWARF support: Remove extraneous breaks following returns in dwarf2reader.cc.
a=jimb, r=ted.mielczarek
Review URL: http://breakpad.appspot.com/343002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@911 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-01 15:00:43 +00:00
jimblandy
6eccfe32b1 Add partial unit tests for dwarf2reader::CompilationUnit.
This is really incomplete --- it's just what's needed to get started
testing support for the DWARF 4 attribute forms.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@910 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-02-01 14:57:58 +00:00
ted.mielczarek
e06ebb4817 Change some functions in linux_libc_support.h to use intmax_t instead of int.
A=Benjamin Smedberg <benjamin@smedbergs.us>
R=ted
Review URL: https://bugzilla.mozilla.org/show_bug.cgi?id=716638

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@909 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-27 12:51:07 +00:00
benchan@chromium.org
403124f9e2 Fix test addresses to use uintptr_t instead of u_int64_t.
When a variable is used to set (and lookup) MappingInfo's "start_addr"
field, it needs to match types -- which is "uintptr_t".  When Chrome OS
updated the 'make' that's used for building, the 32-bit "char *" had
sign-extended when cast up to a u_int64_t -- maybe because pointers were
unsigned before and then changed to be signed -- and that caused the address
lookup to fail.

BUG=chromium-os:25355
TEST=Ran Breakpad unittests
A=mkrebs@chromium.org
Review URL: http://breakpad.appspot.com/345001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@908 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-27 05:23:23 +00:00
mark@chromium.org
1197f761a4 Fix several clang warnings in breakpad.
uploader.mm:549:5: warning: instance method '-uploadData:name:url:' not found (return type defaults to 'id')
[self uploadData:logFileData_ name:@"log" url:url];
=> it looks like this method does in fact not exist, the last parameter
needs to be removed.

breakpad_nlist_64.cc:193:59: warning: '&&' within '||' [-Wlogical-op-parentheses]
=> Just add parentheses, no functionality change.

Patch by Nico Weber <thakis@chromium.org>

BUG=none
TEST=breakpad stil works.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@907 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-26 19:05:31 +00:00
thestig@chromium.org
4ab7db99c1 Use sys_prctl instead of prctl.
http://breakpad.appspot.com/339002


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@906 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-24 00:46:54 +00:00
benchan@chromium.org
30566abed8 Implement core dump to minidump conversion.
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.

Specifically, this patch makes the following changes:
1. Turn the LinuxDumper class into a base class and move ptrace related
   code into a new derived class, LinuxPtraceDumper.
2. Add a LinuxCoreDumper class, which is derived from LinuxDumper, to
   extract information from a crashed process via a core dump file instead
   of ptrace.
3. Add a WriteMinidumpFromCore function to
     src/client/linux/minidump_writer/minidump_writer.h,
   which uses LinuxCoreDumper to extract information from a core dump file.
4. Add a core2md utility, which simply wraps WriteMinidumpFromCore, for
   converting a core dump to a minidump.

BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
4. Run Chromium OS tests to test core2md.
Review URL: http://breakpad.appspot.com/343001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@905 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-19 07:14:51 +00:00
benchan@chromium.org
3822e36b20 Skip ElfCoreDumpTest.ValidCoreFile test if no core dump is generated.
CrashGenerator::CreateChildCrash() may have some flakiness. This patch
changes ElfCoreDumpTest to temporarily skip the ValidCoreFile test if
no core dump is generated by CrashGenerator::CreateChildCrash(), but
print out the error message to help debug the flakiness.

BUG=chromium-os:24982
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.6.
2. All unit tests pass.
Review URL: http://breakpad.appspot.com/342001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@904 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-11 22:19:38 +00:00
thestig@chromium.org
03c31f2100 Build LinuxLibcSupportTest and make it pass.
Review URL: http://breakpad.appspot.com/341001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@903 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-11 20:35:18 +00:00
benchan@chromium.org
577304f02a Refactor LinuxDumper and MinidumpWriter.
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.

Specifically, this patch makes the following changes:
1. Add two convenient methods, back() and empty(), to the wasteful_vector
   class.
2. Refactor the LinuxDumper class such that it can later be splitted into
   a base class and two derived classes, one uses the current ptrace
   implementation and one uses a core file.
3. Refactor the MinidumpWriter class such that it can later use different
   derived implementations of LinuxDumper.

BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
Review URL: http://breakpad.appspot.com/340001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@902 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-11 01:31:35 +00:00
benchan@chromium.org
384c078d2e Clear error state flags in binarystream::rewind().
This patch is taken from the downstream google-breakpad in Chromium OS
(https://gerrit.chromium.org/gerrit/#change,7797), which makes
binarystream::rewind() properly clear error state flags.

BUG=460
TEST=Tested in downstream google-breakpad in Chromium OS.
A=asharif@chromium.org
Review URL: http://breakpad.appspot.com/339001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@901 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-09 19:43:11 +00:00
benchan@chromium.org
07e521c396 Add utilities for processing Linux core dump files.
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.

Specifically, this patch makes the following changes:
1. Add an ElfCoreDump class for processing Linux core dump files, which will
   later be used to implement the core dump to minidump conversion.
2. Add a CrashGenerator class for generating a crash with a core dump file
   for testing the functionalities of ElfCoreDump.
3. Move some utility functions for reading/writing files to file_utils.h.

BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
Review URL: http://breakpad.appspot.com/337001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@900 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-07 02:25:22 +00:00
thestig@chromium.org
33f62804fd Send crash dumps to Google via HTTPS instead of HTTP, since they might
contain sensitive information.

BUG=none
TEST=crash dumps still arrive
A=palmer@chromium.org

Original code review: http://breakpad.appspot.com/338001
Review URL: http://breakpad.appspot.com/334002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@899 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-01-04 00:13:49 +00:00
benchan@chromium.org
33c135a16f Replace MMappedRange with MinidumpMemoryRange.
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.

The MemoryRange class was added in r895 (http://breakpad.appspot.com/332001),
which is largely based on MMappedRange but generalized to be used in other
code. However, MemoryRange does not support minidump data structures. This
patch adds a MinidumpMemoryRange class that extends MemoryRange to handle
minidump data structures, which can then replace MMappedRange.

As with MemoryRange, MinidumpMemoryRange is unit tested.

BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
4. Run minidump-2-core to covnert a minidump file to a core file.
Review URL: http://breakpad.appspot.com/335001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@898 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-12-21 22:33:21 +00:00
mark@chromium.org
5951dd28af Eliminate another source of UnspecifiedStackSignature crash dumps.
Manufacturing an exception record improves the crash reporting, since then
the crashes get bucketed by the call stack leading to the dump, instead of 
all falling into a misc bucket that nobody ever looks at.
Currently these are occuring through e.g. dumps from the base watchdog.

Link against RtlCaptureContext, as the function has been documented as
available
from Windows XP
[http://msdn.microsoft.com/en-us/library/windows/desktop/ms680591(v=vs.85).aspx].

Patch by Siggi Asgeirsson <siggi@chromium.org>


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@897 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-12-21 22:09:56 +00:00
benchan@chromium.org
ae5193c24e Replace readlink calls with a safer version that guarantees NULL-termination.
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.

Specifically, this patch makes the following changes:
1. Add a SafeReadLink function that wraps sys_readlink() to resolve a
   symbolic link but guarantees the result is NULL-terminated on success.
2. Refactor other source code to use SafeReadLink instead of readlink()
   or sys_readlink().

BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
4. Run minidump-2-core to covnert a minidump file to a core file.
Review URL: http://breakpad.appspot.com/334001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@896 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-12-21 17:51:40 +00:00
benchan@chromium.org
f044345c23 Refactor code in preparation of merging with the fork in Chromium OS.
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.

Specifically, this patch makes the following changes:
1. Add a MemoryRange class for encapsulating and checking read access
   to a contiguous range of memory.
2. Add a MemoryMappedFile class for mapping a file into memory for
   read-only access.
3. Refactor other source code to use MemoryMappedFile.

BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
4. Run minidump-2-core to covnert a minidump file to a core file.
Review URL: http://breakpad.appspot.com/332001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@895 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-12-16 16:42:59 +00:00
benchan@chromium.org
25b886a7fd Fix ContextDeathTest.X86BadFlags unit test on Mac OS X.
The assertion (context.context_flags & MD_CONTEXT_X86) in synth_minidump.cc
produces a different message on Mac OS X than other platforms. This patch
changes the ContextDeathTest.X86BadFlags test to handle both message patterns.

BUG=424
TEST=Verified ContextDeathTest.X86BadFlags on Windows, Linux and Mac OS X.
Review URL: http://breakpad.appspot.com/333001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@894 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-12-16 02:15:11 +00:00
qsr@chromium.org
a42704eccc Add API on iOS to generate dump on demand.
Review URL: http://breakpad.appspot.com/331001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@893 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-12-09 08:21:26 +00:00
stuartmorgan
50cfc4a091 Fix a missed include path change from r889. (r=qsr in person)
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@892 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-12-02 10:35:19 +00:00
mark@chromium.org
06c856fd67 Speculative back-out of r883, which may have broken Windows crash reporting.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@891 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-28 19:17:41 +00:00
jimblandy
29138814cc Fix some comments and parameter names.
Trivial changes; committing for post-facto review.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@890 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-23 23:03:30 +00:00
qsr@chromium.org
e6a2f54c4d Create a static library to use Breakpad on iOS.
This obliged me to move BreakpadDefines.h to src/client/apple/Framework/BreakpadDefines.h
Review URL: http://breakpad.appspot.com/329001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@889 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-23 16:14:35 +00:00
qsr@chromium.org
bad70be095 Correct compilation warning.
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
2011-11-23 14:22:05 +00:00
ted.mielczarek
84571a2b91 Rename md5.c to md5.cc, put its contents inside the google_breakpad namespace.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@887 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-18 21:40:27 +00:00
qsr@chromium.org
d529b2d0a0 Correct bug introduced by last commit: Interface on Breakpad is incorrect.
R=mark@chromium.org


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@886 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-16 17:42:49 +00:00
qsr@chromium.org
976930db64 Add an API to Breakpad to upload custom file to the crash server.
On iOS, sending logs using the usual breakpad behavior is not possible, because
tar is not available. This allow to use Breakpad to send any file to the crash
server.

R=mark@chromium.org
Review URL: http://breakpad.appspot.com/327001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@885 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-16 17:04:28 +00:00
stuartmorgan
b2196565bd Fix several error-case leaks on the Mac found by clang analysis
Review URL: http://breakpad.appspot.com/325001


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@884 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-14 13:16:19 +00:00
ted.mielczarek
06cede988b Allow CrashGenerationClient to request that a dump of the parent process be written.
A=Jim Mathies <jmathies@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=679238

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@883 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-11 19:05:51 +00:00
qsr@chromium.org
a8d599dc00 Correct leak.
Uploaders were never released.
Review URL: http://breakpad.appspot.com/326001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@882 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-10 16:28:20 +00:00
kmixter@chromium.org
efcd534bd2 Fix problem with not NULL terminating mapping name.
BUG=453
Review URL: http://breakpad.appspot.com/323001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@881 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-11-09 22:39:26 +00:00
qsr@chromium.org
ec24b1b19e Add mach_vm_deallocate to the set of function not available on iOS5.
Review URL: http://breakpad.appspot.com/318003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@880 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-24 15:16:10 +00:00
qsr@chromium.org
09de69eca1 Do not use mach_vm.h on iOS.
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
2011-10-24 14:58:12 +00:00
mark@chromium.org
64b18d123a Upstream fix for compiling of breakpad with gcc-4.6. Remove an unnecessary
"const" that causes an error with the newer gcc.

BUG=chromium-os:14973
TEST=Built CrOS's google-breakpad

Patch by Michael Krebs <mkrebs@chromium.org>


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@878 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-22 16:57:10 +00:00
thestig@chromium.org
11582abc27 Fix some shadow variables, including one in file_id.cc that causes all files to generate the same hash. Add a test to make sure this doesn't happen again.
Review URL: http://breakpad.appspot.com/316002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@875 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-20 18:23:01 +00:00
qsr@chromium.org
70698339f6 Correct incorrect bounds checking.
Review URL: http://breakpad.appspot.com/319002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@874 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-20 15:39:57 +00:00
qsr@chromium.org
446616ee22 Allow to retrieve id of a module from memory instead of going to disk for iOS.
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
2011-10-20 15:22:48 +00:00
mark@chromium.org
05829315f0 Fix svn:executable and svn:eol-style properties in src/client/windows.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@872 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-20 13:18:59 +00:00
qsr@chromium.org
38e7f8b51b Changing declaration order of field to correct compilation warnings.
Review URL: http://breakpad.appspot.com/316001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@871 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-18 07:35:46 +00:00
jessicag.feedback@gmail.com
bf407c0c77 Add includes for unittests that appear to need them.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@870 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-17 19:08:31 +00:00
qsr@chromium.org
01596d3bc1 Use frame pointer to walk ARM stack on iOS.
Review URL: http://breakpad.appspot.com/314001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@869 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-17 13:42:35 +00:00
qsr@chromium.org
375928a0a6 Breakpad implementation for ios.
To be noted:
 1) All is done in process, as multi-process is not allowed on ios.
 2) Dump are saved when a crash occures but are not automatically send to the
    server.
 3) Breakpad.h contains function to check if a dump must be uploaded, and to
    upload a dump.
 4) The code is copy pasting a log of Breakpad implementation for Mac OS. It
    might be possible to do some refactoring.
Review URL: http://breakpad.appspot.com/309003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@868 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-12 14:00:19 +00:00
qsr@chromium.org
e694156d72 Handling reading arm executable.
Because CPU_TYPE_ARM is not defined on Mac OSX 10.4, I have to redefine the
variable to the correct value.
Review URL: http://breakpad.appspot.com/310004

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@867 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-12 13:49:03 +00:00
mark@chromium.org
7de777ec24 Minor formatting fix following r865.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@866 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 20:16:17 +00:00
mark@chromium.org
7e5c7d7c21 More fixes following r862.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@865 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 20:07:43 +00:00
mark@chromium.org
6e91e4a8fb Additional fixes following r862.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@864 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 18:43:41 +00:00
mark@chromium.org
bc582f782b Remove "using namespace std" from dwarf2reader.h. Using-directives are
forbidden by the style guide, and are bad practice in headers even under
style rules that tolerate this construct.

This fixes warnings such as:

In file included from dwarf2reader.cc:34:
dwarf2reader.h:53:17: warning: using namespace directive in global context in header [-Wheader-hygiene]
Review URL: http://breakpad.appspot.com/312002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@862 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 17:59:03 +00:00
mark@chromium.org
29b0d713c9 Fix harmless warning in dwarf_cfi_to_module.cc.
This function already establishes that (signed) i must be positive by the time
it assigns it to (unsigned) reg. Because reg is unsigned, it is impossible for
it to be negative. Because i was already checked for positivity, this check
can be removed entirely. It was not a miswritten check that intended to check
i instead of reg, because i is already checked.

This addresses the following warning:

dwarf_cfi_to_module.cc:135:9: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]

Committed r859
Review URL: http://breakpad.appspot.com/310003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@861 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 17:38:35 +00:00
mark@chromium.org
a75f1bf9e7 Fix harmless printf abuse in symupload.
symupload printed -[NSData length], an NSUInteger, using %lu. %lu is proper
to print a "long" as unsigned, but NSUInteger is a typedef for "unsigned int"
when building for 32-bit. This would not have caused any problems, because in
the 32-bit model, both int and long are 32 bits wide. In the 64-bit model,
long is 64 bits wide, but NSUInteger is defiend as "unsigned long", so there
wouldn't have even been a warning in that case.

This addresses the following warning:

symupload.m:137:30:{137:28-137:31}{137:46-137:59}: warning: conversion specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int') [-Wformat]
Review URL: http://breakpad.appspot.com/313002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@860 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 17:38:01 +00:00
mark@chromium.org
6669714772 Remove duplicate definition of GTMLoggerDebug.
The actual defintion comes from common/mac/GTMLogger.h, #imported above.

This removes a compilation warning that showed up in r853:

uploader.m:52:9: warning: 'GTMLoggerDebug' macro redefined
GTMLogger.h:339:9: note: previous definition is here
Review URL: http://breakpad.appspot.com/310002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@859 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 17:37:32 +00:00
qsr@chromium.org
f53e77c011 Adding missing method.
parameters method was missing on Uploader.
Review URL: http://breakpad.appspot.com/312001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@858 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 16:55:19 +00:00
mark@chromium.org
3473acb12e #include BreakpadDefines.h as "BreakpadDefines.h" and not
<Breakpad/BreakpadDefines.h>.

During the build of Breakpad itself (especially in Chromium), there is no
Breakpad.framework/Headers in which to locate BreakpadDefines.h, so the
framework-style #include of <Breakpad/BreakpadDefines.h> is not able to find
anything to #include. Using the "BreakpadDefines.h" form should always locate
this file next to Breakpad.h whether it's in the framework or in the source
tree.

This fixes a Chromium build regression caused by Breakpad r856.
Review URL: http://breakpad.appspot.com/313001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@857 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 16:47:47 +00:00
qsr@chromium.org
0775bfd7ab Extract constants from Breakpad.h.
This is done to allow ios implementation to use the same constants.
Review URL: http://breakpad.appspot.com/311001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@856 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-11 14:40:57 +00:00
qsr@chromium.org
b958379739 Handle ios dump.
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
2011-10-11 14:17:02 +00:00
qsr@chromium.org
9d4dcad18b Use right header.
Code was pulling Cocoa dependency, when Foundation is enough.
Review URL: http://breakpad.appspot.com/310001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@854 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-10 14:43:03 +00:00
qsr@chromium.org
bf747d2dbb Extract the uploader process from crash_report_sender
The aim is to separate the process itself from the view, to be able to
reuse the process on the iOS platform.
Review URL: http://breakpad.appspot.com/309002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@853 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-10 14:40:26 +00:00
qsr@chromium.org
da1c36d03e Extracting the config file class from the Inspector to be able to reuse it.
This will be needed for iOS implementation, where the Inspector won't be
used, but where a config file will still be needed, because the uploads
won't happen just after the crash, but on a next run.
Review URL: http://breakpad.appspot.com/309001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@852 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-10 14:02:29 +00:00
qsr@chromium.org
9525fcd633 #ifdef cpu specific code.
Review URL: http://breakpad.appspot.com/307002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@848 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-07 15:57:23 +00:00
mark@chromium.org
be368a3d4a 10.4 SDK fix
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@847 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-06 18:03:17 +00:00
qsr@chromium.org
52a90898ab Adding svn:ignore properties for .deps and .dirstamp
Remove spurious .distamp from the repository.

 LGTM from stuartmorgan.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@845 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-06 13:24:35 +00:00
mark@chromium.org
405bb7aff7 Address review comments from r843 (http://breakpad.appspot.com/307001)
Review URL: http://breakpad.appspot.com/308001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@844 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-05 22:32:27 +00:00
mark@chromium.org
1e9dbde88a Ensure crash reports will be uploaded on the Mac.
Regression from Breakpad r842 (Chromium r103778) - browser crash reports were
uploaded, but renderer crash reports were not. Messages such as these may have
been logged:

com.apple.launchd.peruser.x[y] could not lookup DNS configuration info
service: (ipc/send) invalid destination port
com.apple.launchd.peruser.x[y] Breakpad Reporter: Send Error: Error
Domain=NSURLErrorDomain Code=-1009 UserInfo=z "This computer’s Internet
connection appears to be offline." Underlying Error=(Error
Domain=kCFErrorDomainCFNetwork Code=-1009 UserInfo=w "This computer’s Internet
connection appears to be offline.")

When OnDemandServer establishes the bootstrap subset, it will now register the
parent bootstrap port in the subset namespace so that the Inspector can
recover this port and switch to it. The Sender, launched by the Inspector,
relies on the bootstrap port being set properly.

BUG=chromium:99252
TEST=All test cases from Chromium r103778 (bug chromium:28547) plus:
     about:crash should generate a crash report which should be uploaded,
     provided that throttling is not in effect. Remove or edit
     ~/Library/Preferences/com.Breakpad.crash_report_sender.plist to defeat
     throttling. Also verify that about:inducebrowsercrashforrealz works.
Review URL: http://breakpad.appspot.com/307001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@843 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-05 21:58:10 +00:00
mark@chromium.org
e7b75dbcc3 Use a bootstrap subset port for the inspector, tying the subset to the
lifetime of the task to be monitored, the invoking task. This allows the
bootstrap server (in launchd) to automatically clean up the Mach server
registration when the task being monitored exits, avoiding leaks of
com.Breakpad.Inspector(pid) ports in "launchctl bslist".

BUG=chromium:28547
TEST=Handler should still crash catches, but inspector ports should no longer
     show up in "launchctl bslist". They should show up under a subset port in
     "launchctl bstree" instead. "launchctl bstree" must be invoked as root.
Review URL: http://breakpad.appspot.com/306001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@842 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-10-03 19:54:28 +00:00
mark@chromium.org
9dfe692010 Fix some compilation warnings and other errors due to API changes
Review URL: http://breakpad.appspot.com/305002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@841 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-09-29 16:14:01 +00:00
mark@chromium.org
742e915661 Build the Mac Breakpad utilities with the 10.5 SDK in x86_64 Debug mode. This
was already the SDK being used for x86_64 Release mode. The 10.6 SDK is not
necessary.

Explicitly set the file encoding to UTF-16 on the sender app's lproj's
InfoPlist.strings and Localizable.strings files.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@840 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-09-28 20:10:34 +00:00
mark@chromium.org
86901970f2 Fix encoding of breakpad/src/client/mac/testapp/English.lproj/InfoPlist.strings
in breakpad/src/client/mac/Breakpad.xcodeproj - it's UTF-16, not UTF-8.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@839 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-09-27 22:01:13 +00:00
mark@chromium.org
494fa83886 Fix some newlines.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@838 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-09-27 21:32:40 +00:00
mark@chromium.org
1f17be3171 Fix totally busted-up project file that was, for the most part, wrong for
non-Debug configurations and was probably even a little wrong for Debug too.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@837 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-09-27 21:17:04 +00:00
mark@chromium.org
86643aa489 Fix breakpad/src/tools/mac/crash_report/on_demand_symbol_supplier.mm following
r835.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@836 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-09-27 21:02:31 +00:00
thestig@chromium.org
8d54c75092 Linux/Mac: Add option to omit the CFI section in dump_syms.
Review URL: http://breakpad.appspot.com/304001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@835 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-09-14 01:02:55 +00:00
mihaip@chromium.org
912c99fc8e Remove javascript_engine GYP variable.
(it's no longer needed in Chromium as of http://crrev.com/100692)

Review URL: http://breakpad.appspot.com/303001


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@834 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-09-13 16:05:17 +00:00
ted.mielczarek
f3b59ca226 Fix 64-bit literals in test data
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@833 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-09-01 19:43:27 +00:00
ted.mielczarek
9f042be4a7 issue 438 - fix array index bug in libdisasm
P=matthewbg@google.com R=ted

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@832 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-31 16:38:40 +00:00
ted.mielczarek
1a1890a52a Adjust MD_CONTEXT_CPU_MASK to reflect reality, fix some code so it can handle dumps using the old value for MD_CONTEXT_ARM
The value of MD_CONTEXT_CPU_MASK in use assumes that only the lower 6 bits are used for flags, and the upper 26 bits are for the CPU type. However, as of Windows 7 SP1, the 7th bit is being used as a flag (per http://msdn.microsoft.com/en-us/library/hh134238%28v=vs.85%29.aspx and the Windows SDK headers). Adjusting MD_CONTEXT_CPU_MASK works, but unfortunately that masks off the existing value of MD_CONTEXT_ARM. This patch also changes the value of MD_CONTEXT_ARM and adjusts the minidump context reading machinery to gracefully handle minidumps with the old value.
R=mark at http://breakpad.appspot.com/302001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@831 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-30 22:22:08 +00:00
ted.mielczarek
8ade75f955 issue 243 - Linux dumper should use build id produced by ld --build-id if available
R=thestig at http://breakpad.appspot.com/185001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@830 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-30 15:21:07 +00:00
ted.mielczarek
68e380d5a7 Fix libcurl include in http_upload (trivial, no bug)
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@829 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-30 15:20:56 +00:00
mark@chromium.org
93257311a1 Fix a Breakpad crash during teardown when USE_PROTECTED_ALLOCATIONS is in
effect.

BUG=none
TEST=Apple Crash Reporter logs from processes in which Breakpad handles the
     crash should point the finger at the actual crash source, not the
     Breakpad thread's attempt to write to unwritable memory.
Review URL: http://breakpad.appspot.com/301001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@828 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-26 22:29:33 +00:00
mark@chromium.org
ce8d2156e8 Add missing (parentehses.)
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
2011-08-26 21:37:59 +00:00
mark@chromium.org
60a883212f Fix CalculateStackSize to behave properly when the main thread's stack is
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
2011-08-25 21:19:29 +00:00
mark@chromium.org
7b8b8632d3 The process_id field is unsigned, so we need this cast in c++0x.
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
2011-08-11 13:47:38 +00:00
mark@chromium.org
e6c0689091 The first field in a MDLocationDescriptor is a u_int32_t, so change this cast
to the correct type. This fixes an error newer clang versions find in c++ 0x
mode.

Patch by Rafael Ávila de Espí­ndola <respindola@mozilla.com>

https://bugzilla.mozilla.org/show_bug.cgi?id=677641


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@824 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-11 13:45:30 +00:00
mark@chromium.org
8f2b058398 Fix clang warnings.
Review URL: http://breakpad.appspot.com/298002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@823 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-11 13:40:13 +00:00
mark@chromium.org
3c59c247e2 Zero out the entire context on MD5_Final, not just the number of bytes in a
pointer.
Review URL: http://breakpad.appspot.com/298001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@822 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-11 13:39:44 +00:00
mark@chromium.org
ba5ee2c8f5 Remove a bogus const.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@821 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-10 15:29:52 +00:00
ted.mielczarek
1b9920afa7 Fix a typo in r817
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@820 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-27 18:29:37 +00:00
mark@chromium.org
e919fdd63b Wean Mac Breakpad off of its OpenSSL libcrypto dependency.
This libcrypto dependency sucks. Linking against OpenSSL is sort of broken in
certain Mac OS X SDKs. libcrypto was only being used to provide an MD5
implementation. Breakpad already has its own MD5 implementation, so just use
that instead.

To be perfectly honest, on modern systems, nothing should be making MD5
hashes of modules anyway, because everything has an embedded LC_UUID.

The project file changes just remove libcrypto and add md5.c as needed.

A bonus (and untested) fix for on_demand_symbol_supplier.mm is included to
account for changes in r794.
Review URL: http://breakpad.appspot.com/296001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@819 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-27 14:30:58 +00:00
ted.mielczarek
48550041f9 Switch mac DumpSymbols::WriteSymbolFile to take an ostream instead of a 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
2011-07-26 14:03:09 +00:00
ted.mielczarek@gmail.com
d01a9f8bc4 Fix compilation using the OS X 10.7 SDK by #ifdefing out PPC support when 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
2011-07-26 12:00:20 +00:00
jessicag.feedback@gmail.com
1cbdeae78d Fix a sizeof(pointer) vs sizeof(pointee) issue caught by client.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@815 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-21 21:38:01 +00:00
ted.mielczarek
32d04cdbbc Remove curl/types.h include, since this header has been deprecated for a long time and removed in a recent curl release.
P=Evan Shaw <edsrzf@gmail.com> R=ted

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@814 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-21 17:44:48 +00:00
ted.mielczarek
69607b678f Remove NetworkSourceLine{Resolver,Server} and related code. It never wound up being useful enough to use in production, so let's drop the maintenence burden
R=jessicag at http://breakpad.appspot.com/292001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@795 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-07 20:53:52 +00:00
ted.mielczarek
3ca4a120de Add some unit tests for Linux WriteSymbolFile
This patch adds synth_elf::{StringTable,SymbolTable,ELF} classes to
produce in-memory ELF files to properly test the Linux symbol dumping
code. It also uses those classes to add some basic tests for
the WriteSymbolFile function.

R=jimb at http://breakpad.appspot.com/277001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@794 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-06 17:05:59 +00:00
ted.mielczarek
b2f96f314c Dump PUBLIC + CFI records from libraries without debug info on Linux, use .dynsym for symbol names if there are no usable debug symbols.
R=jimb at http://breakpad.appspot.com/275001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@793 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-06 17:05:49 +00:00
mmentovai
be55cc8cf0 Fix an assertion encountered in UntypedMDRVA::Copy().
Fix an assertion where a zero-length buffer was being passed to
UntypedMDRVA::Copy().  This occurred when WriteFile() was given a file whose
size was a multiple of the temporary buffer size.  In this issue's case, the
procfs file "environ" happened to be 2032 bytes, while the temporary buffer
was 1016 bytes.

Patch by Michael Krebs <mkrebs@chromium.org>


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@792 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-01 01:20:27 +00:00
jessicag.feedback@gmail.com
df33e47bb4 Delete OS failing test cases and note failure in relevant .h file.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@791 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-06-21 18:34:01 +00:00
ted.mielczarek@gmail.com
dcebaf42ba Add some headers necessary to build the Linux client code with the Android NDK r5
P=Alon Zakai <azakai@mozilla.com>, R=ted

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@790 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-05-31 12:12:30 +00:00
cdn@chromium.org
94074a84d0 Fix null derefs in x86 dissasembler code.
BUG=428
TEST=N/A
Review URL: http://breakpad.appspot.com/285001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@789 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-05-12 19:11:26 +00:00
ted.mielczarek
1807e385d7 Fix linux-gate handling in LinuxDumper so it gets a valid debug ID
A=ted R=nealsid at http://breakpad.appspot.com/284001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@788 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-05-06 23:23:31 +00:00
vitalybuka@chromium.org
04023b1f6a Fixed message about unregistered msdia*dll. Builds with different DiaSDK need different dll.
Rebuilt with Visual Studio 2008.
Slightly improved refresh_binaries.bat.

BUG=none
TEST=none
Review URL: http://breakpad.appspot.com/281001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@787 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-04-26 20:52:48 +00:00
mmentovai
fd557e4a97 Use task_info(..., TASK_DYLD_INFO, ...) on 10.6 and later in preference to
looking up the _dyld_all_image_infos symbol in /usr/lib/dyld.
Review URL: http://breakpad.appspot.com/276001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@786 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-04-05 16:05:17 +00:00
jessicag.feedback@gmail.com
23c82999a8 Another attempt at signed / unsigned int resolution for linux minidump writer.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@785 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-30 21:42:27 +00:00
jessicag.feedback@gmail.com
3b3f0c3f61 Adding header files at the request of Chrome.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@784 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-22 02:50:41 +00:00
jessicag.feedback@gmail.com
322818287c Add trusted check
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@783 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-22 00:29:37 +00:00
jimblandy
a4a9922512 Issue 417: update unit tests after adding unnamed function detection
In r779, at the last moment, I added a default call count expectation for
the UnnamedFunction warning to the CUFixtureBase constructor, but didn't
re-run the tests. This patch adjusts all affected tests.

a=jimblandy, r=ted.mielczarek


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@782 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-14 17:35:26 +00:00
ted.mielczarek
b0201df935 Merge adjacent mappings with the same name into one module in LinuxDumper.
A=Mike Hommey <mh+mozilla@glandium.org> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=637316

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@781 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-14 17:04:09 +00:00
SiyangXie@gmail.com
88fa7cfc6b Protect "std::max", "std::min" against MACROs defined in WinDef.h.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@780 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-11 22:47:07 +00:00
jimblandy
fd18beeb5c Google Breakpad Issue 417: Handle DWARF that omits function names.
This patch makes sure dump_syms behaves properly when presented with
malformed DWARF data that provides no name for a function. We print a
warning message to stderr, and subsitute "<name omitted>" for the empty
string, so that the "FUNC" record written to the symbol file for the
function is still well-formed. (We may have line number data covering the
function, so it would be a shame to omit the function altogether.)

Unit tests included.
a=jimblandy, r=ted.mielczarek


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@779 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-11 22:16:12 +00:00
ted.mielczarek
bf25801d83 Put PUBLIC lines in Mac symbol files.
Exported symbols on Mach-O binaries are defined in a STABS section. This patch makes stabs_reader handle them, adds support for Extern symbols in the Module class (which are output as PUBLIC lines in symbol files), and the proper processing in stabs_to_module to hook it all up.

A=mark R=jimb at http://breakpad.appspot.com/163001 and http://breakpad.appspot.com/267001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@778 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-04 16:08:39 +00:00
jessicag.feedback@gmail.com
68b256aed3 Updating to ints from unsigned ints so -1 will be an acceptable value.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@777 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-03 00:42:11 +00:00
jessicag.feedback@gmail.com
248d340b71 Fix compiler warning.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@776 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-01 20:47:27 +00:00
ted.mielczarek
dbf409ca20 Make programs in src/tools/linux build via the automake build system
R=jimb at http://breakpad.appspot.com/265001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@775 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-28 14:05:22 +00:00
mmentovai
d2b6b9ae82 Fix breakpad compilation on ubuntu 10.10.
Patch by Marc-Antoine Ruel <maruel@chromium.org>

Review URL: http://breakpad.appspot.com/264001


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@774 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-18 19:12:06 +00:00
ted.mielczarek
cff9fdbd94 enable writing INFO CODE_ID line in symbol files
R=mark (originally from http://breakpad.appspot.com/180001)

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@773 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-15 13:39:08 +00:00
ted.mielczarek
1530800640 Fix printing of x86_64 registers from minidump_stackwalk
R=mark at http://breakpad.appspot.com/262001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@772 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-14 19:23:35 +00:00
ted.mielczarek
ad35fbc56a Dump MD_LINUX_MAPS from minidump_dump
R=kmixter at http://breakpad.appspot.com/261001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@767 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-28 18:53:02 +00:00
ted.mielczarek
ed1c70b5b8 Expose actual instruction from DisassemblerX86
R=cdn at http://breakpad.appspot.com/260001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@766 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-26 22:13:37 +00:00
ted.mielczarek
d328f2011f Rename duplicate argument names to make it compile with CLang.
P=rafael.espindola R=ted at http://breakpad.appspot.com/248001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@765 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-25 20:01:26 +00:00
ted.mielczarek
eba8cc5172 Add missing constructor to CPPLanguage class to make it compile with CLang.
P=rafael.espindola R=jimb at https://bugzilla.mozilla.org/show_bug.cgi?id=623121

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@764 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-25 20:01:22 +00:00
ted.mielczarek
0df0555e75 Use a MinidumpCallback to force minidumps on Windows to include memory around the faulting instruction pointer. Older versions of DbgHelp don't seem to do this correctly (on Windows XP, for example)
R=mark at http://breakpad.appspot.com/259001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@763 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-25 19:19:19 +00:00
ted.mielczarek
9220e0baf1 Round-trip client/processor unittests for Windows
R=mark at http://breakpad.appspot.com/258001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@762 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-24 19:59:14 +00:00
ted.mielczarek
281d52d944 Fix some apparently longstanding crash bugs in Stackwalker implementations when resolver is NULL.
R=mark at http://breakpad.appspot.com/257001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@761 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-24 19:59:09 +00:00
mmentovai
b904343e14 Fix clang warning / miscompile.
Patch by Nico Weber <thakis@chromium.org>

Review URL: http://breakpad.appspot.com/256001


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@760 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-24 19:20:10 +00:00
ted.mielczarek
7b8e2b7e09 Add MinidumpMemoryInfo / MinidumpMemoryInfoList classes to expose MDRawMemoryInfo / MDRawMemoryInfoList via the Minidump class
R=mark at http://breakpad.appspot.com/255001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@755 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-13 19:05:33 +00:00
ted.mielczarek
80745c59de Add structure definitions for the memory info list, as well as some other new enum values.
R=mark at http://breakpad.appspot.com/254001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@754 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-13 19:05:29 +00:00
thestig@chromium.org
972ae49d47 Fix compile by adding needed includes.
Review URL: http://breakpad.appspot.com/253001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@753 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-12 00:14:27 +00:00
ted.mielczarek
78aaf6a665 Fix review comment that I missed.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@752 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-11 20:31:53 +00:00
ted.mielczarek
c77fc8a32c Make some parts of the processor compile on Win32/MSVC
R=mark at http://breakpad.appspot.com/250001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@751 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-11 20:27:29 +00:00
thestig@chromium.org
fd00ae5f55 Fixing typos that will soon be gyp errors.
A=bradnelson
R=thestig
Original review: http://breakpad.appspot.com/251001
Review URL: http://breakpad.appspot.com/252001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@750 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-11 19:50:45 +00:00
stuart.morgan
816f25011c Make localization resizing of Mac uploader email line more robust. Review URL: http://breakpad.appspot.com/247001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@749 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-05 05:34:47 +00:00
stuartmorgan
717bf0ded2 Keep a log of uploaded crash IDs on the Mac. Review URL: http://breakpad.appspot.com/245001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@748 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-17 20:41:22 +00:00
ted.mielczarek@gmail.com
c45b12b422 Fix MinidumpGenerator::WriteExceptionStream for writing cross-architecture dumps
R=mark at http://breakpad.appspot.com/244001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@747 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-16 22:52:38 +00:00
ted.mielczarek@gmail.com
0344a368de Allow out-of-process minidump generation to work on processes of a different 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
2010-12-15 21:55:56 +00:00
ted.mielczarek@gmail.com
0d9bd40775 Allow writing on-request minidumps with an exception stream
R=mark at http://breakpad.appspot.com/172001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@745 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-15 16:28:28 +00:00
ted.mielczarek@gmail.com
cae59b4ae4 issue 334 - Fix a race condition between ExceptionHandler::Teardown and ExceptionHandler::WaitForMessage on OS X
R=mark at http://breakpad.appspot.com/165001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@744 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-15 16:28:22 +00:00
ted.mielczarek@gmail.com
7405ecd046 allow uploading zero-byte files in HTTPUpload
R=mark at http://breakpad.appspot.com/243001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@743 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-15 16:19:32 +00:00
ted.mielczarek
efbe428d83 Add some unit tests for the mac MinidumpGenerator
R=mark at http://breakpad.appspot.com/240001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@742 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-13 22:10:32 +00:00
ted.mielczarek
ef7262d477 allow passing info about known memory mappings to MinidumpWriter and ExceptionHandler
r=thestig at http://breakpad.appspot.com/242001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@741 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-13 22:10:23 +00:00
kmixter@chromium.org
b5dfa2834d Reuse code and fix inconsistent array boundaries.
R=ted.mielczarek
Review URL: http://breakpad.appspot.com/237001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@740 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-08 22:26:20 +00:00
kmixter@chromium.org
8322cd6586 Propagate failure if http uploads fail with http error codes.
R=ted.mielczarek
BUG=413
Review URL: http://breakpad.appspot.com/236001


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@739 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-08 22:24:29 +00:00
kmixter@chromium.org
e41dc09252 Enable dumping of the Linux extension streams.
We now dump information about process's environment/command line/status, Linux release, and CPU info.
Review URL: http://breakpad.appspot.com/238001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@738 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-08 18:48:28 +00:00
kmixter@chromium.org
6c05f5ddd9 Fix segv in network_source_line_resolver_server_unittest
R=siyangxie
BUG=409


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@737 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-08 02:14:17 +00:00
cdn@chromium.org
fb7fdb9426 Added null checks to disassembler_x86
Review URL: http://breakpad.appspot.com/239001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@736 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-12-03 22:28:58 +00:00
ted.mielczarek
30b075c4a5 Fix WriteMemoryListStream to remove an extraneous loop index variable increment.
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
2010-11-30 19:19:31 +00:00
thestig@chromium.org
ccc2446863 Fix 64-bit build on Linux.
BUG=412
Review URL: http://breakpad.appspot.com/233001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@734 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-11-22 22:54:51 +00:00
thestig@chromium.org
3665a7d09b Linux: Attempt to generate an ELF identifier for deleted running binaries.
Review URL: http://breakpad.appspot.com/228001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@733 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-11-19 19:57:07 +00:00
nealsid
d9d863e153 Add specific curl headers to facilitate building on Ubuntu Lucid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@732 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-11-17 18:45:20 +00:00