Commit Graph

567 Commits

Author SHA1 Message Date
mark@chromium.org
2543651766 Remove i386 from the set of architectures that the Mac crash_report tool's
on_demand_symbol_supplier will accept. These should always use x86. See r638.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@639 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-08-06 19:49:17 +00:00
mark@chromium.org
0ab73db415 Breakpad uses x86 as the architecture name, not i386. Most tools don't care
what architecture name is shown in a symbol file's MODULE line, but the Mac
crash_report tool's on_demand_symbol_supplier does. The new Mac dumper
inadvertently used i386. Correct that to make it x86. Temporarily make the
on_demand_symbol_supplier accept symbol files whose architecture is i386.
Also add x86_64 to the set of architectures that the on_demand_symbol_supplier
considers valid.

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@638 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-08-06 19:47:16 +00:00
ted.mielczarek
0fdc829d32 Fix HandleInvalidParameter/HandlePureVirtualCall to dynamically lookup the RtlCaptureContext symbol so the Windows exception handler will continue to work on Windows 2000. Patch by Jim Mathies <jmathies@mozilla.com> and Timothy Nikkel <tnikkel@gmail.com>. r=ted
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@637 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-08-02 13:56:29 +00:00
dmaclach
0b814c1d2b review: http://breakpad.appspot.com/139001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@636 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-29 15:34:01 +00:00
dmaclach
1b8c24f337 review: http://breakpad.appspot.com/138001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@635 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-29 05:25:43 +00:00
dmaclach
97918069d8 Review: http://breakpad.appspot.com/137001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@634 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-28 19:06:30 +00:00
dmaclach
6e3869c19f Review: http://breakpad.appspot.com/136001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@633 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-28 18:23:15 +00:00
dmaclach
b5b8051a23 Review: http://breakpad.appspot.com/135001
BUG: none
TEST: Build GoogleTalk



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@632 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-27 23:21:19 +00:00
dmaclach
a2d5da4831 Fixes up some style nits, and gets us compiling on Leopard again.
Review: http://breakpad.appspot.com/133001
BUG:none
TEST:Compile on Leopard



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@631 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-27 16:33:22 +00:00
stuart.morgan
23eabdedab Adding 11 languages to the crash uploader app on the Mac, contributed by the Camino localization teams
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@630 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-25 23:05:09 +00:00
ted.mielczarek
6f598cc435 Fix unit tests that have not built since @610
A=kmixter R=ted
http://breakpad.appspot.com/132001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@629 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-23 17:20:42 +00:00
mark@chromium.org
615d2c0d6d Separate the "hello" message from the parameter messages in
Inspector::ReadMessages as was done before r627. The "hello" message contains
the parameter count and is referenced while the message reader loops through
parameter messages. Prior to r627, both messages were named |message|, which
was confusing, probably caused a compiler warning, and apparently provided the
motivation to share them. This caused the crash inspector to fail to properly
collect the parameters. The common failure mode (although others are possible)
was for the inspector to attempt tor read more parameter messages than were
available, resulting in an IPC timeout and inspector death. No crash report
would be written, and the application expecting its crash to be inspected
would time out waiting for a response from the inspector and then _exit. This
is effectively a failure to properly handle crashes.

The inner message is reintroduced, and named parameter_message for
disambiguation.

BUG=chromium:49821
TEST=Crashes catchable by the Mac Breakpad framework
Review URL: http://breakpad.appspot.com/123002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@628 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-21 21:21:07 +00:00
dmaclach
4ac61acb3a Clean up build for 64 bit.
Fix up some broken mac projects.
Consolidate project settings in xcconfig files.

http://breakpad.appspot.com/130001



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@627 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-19 20:43:49 +00:00
jimblandy
786275e719 Breakpad Linux/Mac symbol dumper: Share duplicate strings that arise in DWARF data.
This patch avoids allocating many copies of identical strings appearing in
debugging information. Without this patch, running dump_syms on Mozilla's
libxul.so (with 173MiB of debugging information) has a peak resident set of
around 450MiB. With this patch, the peak is around 365MiB.

a=jimblandy, r=mark


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@626 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-17 15:14:30 +00:00
jimblandy
c5f5e0ae65 Breakpad Linux dumper: Don't map file into memory a second time just to compute file ID
At present, the Linux symbol dumper maps the ELF file into memory to
examine the debugging information it contains, but then also calls
google_breakpad::FileID::ElfFileIdentifier, which maps the ELF file into
memory again. Some of our object files are large; Mozilla's libxul.so is
1.1GiB. Trying to map such files twice can interfere with tools like
valgrind that map themselves into high addresses (in an attempt to stay out
of the way of ordinary programs).

The FileID class has another method, ElfFileIdentifierFromMappedFile, that
operates on an already-loaded image of the file; use that instead.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@625 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-17 05:08:04 +00:00
thestig@chromium.org
56eac4dd7a Add functionality to read the .gnu_debuglink section and load symbols from a debug ELF file.
Review URL: http://breakpad.appspot.com/126001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@624 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-16 00:43:42 +00:00
thestig@chromium.org
0dd6c95b3f Remove duplicate FUNC entries from dump_syms output.
Review URL: http://breakpad.appspot.com/128001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@623 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-13 18:14:27 +00:00
ted.mielczarek@gmail.com
8014071440 Fix a couple of tiny things for GCC pedantry
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@622 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-08 15:30:17 +00:00
thestig@chromium.org
1c87cc86e3 Remove some duplicate endianness code.
Review URL: http://breakpad.appspot.com/125001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@621 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-06 05:13:21 +00:00
thestig@chromium.org
7fbd77715f Linux: Skip sections of type SHT_NOBITS when loading symbols.
Review URL: http://breakpad.appspot.com/120001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@620 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-07-06 05:11:50 +00:00
ted.mielczarek
e193098543 Breakpad: Avoid using the C++ <cfoo> headers.
This patch avoids unnecessary use of the <cfoo> headers in files that don't
actually use the identifiers they declare in the std:: namespace.

It also changes some files to better conform with the "Names and Order of
Includes" rules in the Google C++ Style Guide.

A=jimb R=mark

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@619 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:57:07 +00:00
ted.mielczarek
4f456b8c0d Breakpad DWARF CFI support: Cleanups requested by Neal
I came across a bunch of comments Neal had made on issue 55011 that I
hadn't addressed.  This patch takes care of them.
A=jimb R=thestig

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@618 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:57:02 +00:00
ted.mielczarek
b80b13fd2f Breakpad Linux symbol dumper: Remove unneeded objects from test executables
The dwarf_cu_to_module_unittest and bytereader_unittest test executables
include object files from which they use no code.
A=jimb R=thestig

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@617 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:56:58 +00:00
ted.mielczarek
f16fbd5e96 Breakpad CFI parser: Add unit tests to XCode project.
This patch adds all the appropriate symbol dumper unit tests to the Mac
XCode dump_syms project. This allows us to test this code on a 64-bit
platform.
A=jimb R=mark

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@616 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:56:53 +00:00
ted.mielczarek
6869f2e1b3 Breakpad DWARF CFI parser: Use the proper type for offsets in CallFrameInfo::Rule subclasses.
The subclasses of CallFrameInfo::Rule store the rule currently in
force for recovering a register or computing the canonical frame
address. Their sole responsibility is to accurately convey rules from
the parser, which creates them, to a CallFrameInfo::Handler member
function, which consumes them. So, the types of their data members
should match those of the corresponding arguments of the corresponding
Handler member function.

CallFrameInfo::OffsetRule and CallFrameInfo::ValOffsetRule use an
'int' to store the rule's offset value, but
CallFrameInfo::Handler::OffsetRule and ...::ValOffsetRule expect a
'long'.  On ABIs where 'long' is larger than 'int', this can cause
values to be truncated or sign-extended unexpectedly.

This patch changes those members to 'long'.

Fortunately, offsets appearing in real DWARF call frame information
never even come close to the limits of a 32-bit int, so this bug is
unlikely to cause any practical problems.
A=jimb R=thestig

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@615 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:56:48 +00:00
ted.mielczarek
1adc07f0ff Breakpad Mac symbol dumper: Unify with Linux dumper; support DWARF CFI.
This patch rewrites the Mac symbol dumper to use the same set of classes
the Linux dumper does for reading debugging information from various
sources, consolidating them into a single table, and writing that out as a
Breakpad symbol file.

In the process, it also adds support for dumping DWARF call frame
information and .eh_frame exception-handling information as Breakpad 'STACK
CFI' records. This allows the Breakpad processor to generate stack traces
from code compiled with -fomit-frame-pointer.

The patch also replaces the DumpSymbols Objective C++ class with
google_breakpad::DumpSymbols, a plain C++ class. The code still uses some
Objective C++ to use the Foundation facilities for dealing with file names
in a file-system-independent fashion, and for examining the contents of
.dSYM bundles.

Since the code has been entirely rewritten, I have changed the author
lines.
A=jimb R=mark

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@614 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:56:42 +00:00
ted.mielczarek
9c1e16eaaa Breakpad DWARF support: Stop #including unneeded headers.
The #inclusions of <elf.h> and <link.h> were inherited from older code, but
the current code doesn't need anything from them, so they should be
removed.
A=jimb R=thestig

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@613 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:56:37 +00:00
ted.mielczarek
bd0a7f9da1 Breakpad DWARF support: Check for DWARF line info under Mac OS X section names.
For some reason, Mac OS X places DWARF debugging information in sections
whose names begin with "__", rather than the names beginning with "." given
in the DWARF spec. This patch changes google_breakpad::DwarfCUToModule to
look for line number information under both names.
A=jimb R=mark

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@612 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:56:32 +00:00
ted.mielczarek
75ce593891 Breakpad Mac dumper: Change the dumper to be more C++-ish.
Instead of using bzero in main, use constructors to initialize the
Options structure.

Use C++ bool, not Objective-C BOOL.

Use a const NXArchInfo * to represent the architecture name, so that we can
use the NXGetLocalArchInfo, NXGetArchInfoFromName, etc. to handle things.

Delete the 'uuidStr' member; it is unused.

Leave Options::srcPath as an NSString, so that we can continue to use the
filesystem path abstraction methods provided by the Foundation framework.
A=jimb R=mark

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@611 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:56:27 +00:00
ted.mielczarek
35c41e00ee Breakpad Mac symbol dumper: Add new Mach-O reader class.
This patch adds files defining new classes in the google_breakpad::Mach_O
namespace for parsing fat binaries and Mach-O files. These are used in the
new dumper to handle STABS debugging information, DWARF call frame
information, and .eh_frame exception handling stack walking information.

These new classes are independent of endianness and word size, and
therefore can be used on binaries of all the relevant architectures: x86,
x86_64, ppc, and ARM.

The patch adds a complete set of unit tests for the new classes.
A=jimb R=mark (http://breakpad.appspot.com/93001/show, http://breakpad.appspot.com/115001/show)

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@610 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-25 16:56:16 +00:00
mark@chromium.org
8ffb12eb35 Convert files in .nib format to .xib format.
Review URL: http://breakpad.appspot.com/122001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@609 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-23 20:06:13 +00:00
thestig@chromium.org
a4067bc197 Add codereview.settings so we can use gcl.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@608 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-19 02:48:54 +00:00
nealsid
e4cc9b12ec Fix test breakage caused by my last checkin :-(
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@607 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-04 20:53:20 +00:00
nealsid
4f182c746b Add access violation detail for windows (read/write/dep). Add stack buffer overrun and heap corruption exceptions for windows. Additional detail requested to improve Chrome crash analysis
A=cdn
R=nealsid
http://codereview.chromium.org/2429003/show



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@606 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-04 16:59:23 +00:00
ted.mielczarek
c0fc538ae4 Fix compilation on gcc 4.5 by adding a missing #include. Patch by Benoit Jacob <bjacob@mozilla.com>, r=me at https://bugzilla.mozilla.org/show_bug.cgi?id=569836
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@605 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-06-03 15:29:46 +00:00
nealsid
8e3c63b7f9 Remove LOG statements from linux utilities so there's no dependency on log library
A=Zhurun
R=nealsid




git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@604 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-27 19:37:24 +00:00
ted.mielczarek
b0059c54da Issue 384 - UnregisterWait error handling is incorrect. Patch by Benjamin Smedberg <benjamin@smedbergs.us>, r=doshimun at http://breakpad.appspot.com/107001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@603 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-19 13:40:59 +00:00
nealsid
0b54af4f91 Patch from Vitaly to remove synchronization and make exception handling code single-threaded
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@602 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-18 17:50:25 +00:00
nealsid
4abf9d9ebd Updated binaries to use a statically linked CRT
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@601 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-18 17:47:59 +00:00
thestig@chromium.org
1273651fcf Delete svn:executable from the DEPS file. Hans has a badly configured client on Windows?
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@600 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-18 01:46:59 +00:00
hansl@google.com
7b106e34ba Changed two files end-line to make it work better with GYP. They were DOS (CR/LF), now they are UNIX (CR).
It seems like the base gyp scripts on Windows were confused about this and didn't handle it well, while using gyp through gclient worked perfectly. I did not investigate the causes further.

Review URL: http://codereview.chromium.org/2128003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@599 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-14 18:43:43 +00:00
nealsid
951583a8ca Fix for uninitialized variable in basic_source_line_resolver.cc
R=TBR
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@598 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-13 22:21:00 +00:00
hansl@google.com
bcf885c807 Added a death test for the pure virtual function call.
Added a test for the minidump generated by a pure virtual function call.
Changed the pure virtual function call handler so that it creates a minidump with Exception info and a stack.

Review URL: http://codereview.chromium.org/2050013

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@597 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-13 21:00:43 +00:00
hansl@google.com
8cf0a52bec Moved exception_handler_test to the more aptly named exception_handler_death_test. It doesn't test anything else than death and exit.
Created the exception_handler_test that test the generation of dump and the dumps themselves.
Moved all dump analysis code from minidump to its right class DumpAnalysis. The class is used by both minidump_test and exception_handler_test. The tests are way simpler that way (ie. no handling of HANDLE).
minidump_test now uses the minidump_generator class instead of using Win32. It works well and pass all tests.
exception_handler now passes both the exception and assertion infos to the client to generate the dump. If one is NULL it's going to be handled correctly.
crash_generation_client can now RequestDump with both exception and assertion info.
minidump_generator returns both the mini and full dump string pointers, and output both (or either) depending on which was generated.
All original interfaces and method signature are still there, but call the new functions if possible.

Review URL: http://codereview.chromium.org/1994015

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@596 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-12 17:51:21 +00:00
nealsid
7d0d107b17 Adding prebuilt dump_syms.exe.
Http://breakpad.appspot.com/issues/111001

A=nealsid
R=mark mentovai



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@595 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-11 21:25:13 +00:00
nealsid
3d0b3be6c0 This checkin of the binaries was created by refresh_binaries.bat.
Date: Mon 05/10/2010 15:55:34.46 
Repository information (output of 'svn info') follows: 
Path: .
URL: https://google-breakpad.googlecode.com/svn/trunk/src
Repository Root: https://google-breakpad.googlecode.com/svn
Repository UUID: 4c0a9323-5329-0410-9bdc-e9ce6186880e
Revision: 593
Node Kind: directory
Schedule: normal
Last Changed Author: nealsid
Last Changed Rev: 593
Last Changed Date: 2010-05-10 13:35:54 -0700 (Mon, 10 May 2010)



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@594 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-10 22:55:45 +00:00
nealsid
6bc523c618 Changes to fix build warnings on newer versions of GCC, and a fix to not try to open certain mapped files.
A=ZhurunZ, Tristan Schmelcher
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@593 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-10 20:35:54 +00:00
hansl@google.com
297b1e5a06 Copied minidump_test.cc from chrome_frame (see http://src.chromium.org/viewvc/chrome/trunk/src/chrome_frame/crash_reporting/minidump_test.cc).
I had to remove the dependency from base (was using FilePath and ScopedHandle, replaced them by standard std::wstring and HANDLE). Also removed the logging and the main from the original files.

This will serve as a base for testing breakpad's dump generation. It is kept like this for easier tracking.

Review URL: http://codereview.chromium.org/1964006

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@592 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 21:38:18 +00:00
jimblandy
f6163f1e29 Breakpad Mac dumper: Clean up XCode project file.
The XCode project file has become encrufted with duplicate Executable
entres and some strange settings. This patch deletes and recreates various
entries to make things neat again. It should have no effect on the
project's visible behavior.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@591 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 18:18:28 +00:00
jimblandy
073a7f6695 Breakpad unit tests: Add support for clipped-size null-terminated strings
to TestAssembler::Section.

This patch helps the TestAssembler classes generate Mach-O object files for
use as test input.

This patch adds a new AppendCString overloading to TestAssembler::Section
for emitting null-terminated strings in fixed-length buffers, where the
string is truncated and the terminating null character omitted if the
string is too large for the buffer.

The patch includes unit tests for the new AppendCString overloading. It
also provides some for the existing overloading, which had been neglected.

a=jimblandy, r=mark


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@590 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 17:37:58 +00:00