Commit Graph

728 Commits

Author SHA1 Message Date
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
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
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
jimblandy
52a508dfe2 Breakpad Mac Dumper: Fix compilation warnings on OS X 10.6
Breakpad's Macintosh symbol dumper uses deprecated functions for
dealing with mixed-endianness code. This patch provides an overloaded
function, ByteSwap, that automatically chooses the OSSwap* functions
from <libkern/OSByteOrder.h> appropriate for its argument's
size.

This patch does *not* address warnings in src/common/mac/dump_syms.mm,
because that code is about to be replaced entirely; there's no reason to
bother reviewing a big, detailed patch against it.

a=jimblandy, r=mark


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@589 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 17:36:16 +00:00
jimblandy
25b512d64d Breakpad symbol dumper: Promise that Module::SetLoadAddress can be called at any time.
It's possible to imagine an implementation of google_breakpad::Module in
which calling SetLoadAddress at different times as the Module is populated
would produce different output. For the Mac dumper, we'd like to depend on
its current behavior --- that the load address is subtracted off only when
writing the symbol file, and can be set at any time prior to that.

This patch makes that promise part of Module's contract, and adjusts the
test suite to verify that that promise is met.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@588 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 17:35:10 +00:00
jimblandy
775c6f7640 Breakpad Linux dumper: Handle STABS-in-symbol-table, and line number records outside functions.
This patch addresses two differences between Linux and Macintosh OS X STABS
data:

- StabsReader assumes that the STABS entries follow the conventions for
  storing STABS data in object file sections (that is, .stabs and
  .stabstr), rather than in the object files's linker symbol table. On Mac
  OS X, STABS entries live in the Mach-O file's LC_SYMTAB load command,
  along with all the other linker symbols; they are not grouped into units
  by N_UNDF entries.

  This patch adds a boolean argument to the StabsReader constructor
  indicating whether the parser should treat N_UNDF entries as unit
  boundaries; this argument should be true on Linux, and false on Mac. The
  patch changes src/common/linux/dump_symbols.cc to pass this new argument.

- Mac OS X STABS place SLINE (line number) records immediately before the
  FUN record for the function to which they belong, and the values of such
  records are absolute, not relative to the function start.

  This patch extends the parser to queue up such records and report them to
  the handler when we do see the FUN record. The meaning of
  StabsHandler::Line remains unchanged; existing handlers do not need to be
  adjusted.

This patch also adds unit tests for the new parser behaviors.

a=jimblandy, r=mark


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@587 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 17:34:19 +00:00
jimblandy
d3e4bbb9c7 Breakpad STABS parser: Use a test fixture in StabsReader unit tests.
This patch factors out some of the common code in the StabsReader unit
tests into a fixture class. Pretty mechanical.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@586 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 17:25:47 +00:00
jimblandy
deb500f6c8 Breakpad STABS reader: Properly compute function end addresses.
An N_FUN stabs with no name is an explicit end-of-function marker, whose
value is the size of the function. This patch changes the stabs reader to
recognize these and use them to compute the function's ending address,
instead of treating them as functions with no names and mysterious
addresses. It also adds appropriate unit tests.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@585 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 17:13:42 +00:00
jimblandy
b28be1254c Breakpad Linux dumper: Rename DumpStabsHandler to StabsToModule.
All the other classes which receive debugging data from some sort of parser
and use it to populate a Module have names ending in "ToModule":
DwarfCUToModule, DwarfCFIToModule. Also, DumpStabsHandler doesn't actually
dump anything.

This patch renames the DumpStabsHandler class to StabsToModule, which is
more consistent and descriptive.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@584 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 17:12:38 +00:00
jimblandy
b0ec96cee2 Breakpad Linux dumper: Make StabsReader independent of endianness and word size.
StabsReader simply applies a reinterpret_cast to treat the stab entry data
as an array of 'struct nlist' structures, making the parser specific on the
host endianness, word size, and alignment rules. On Mac OS X, a single fat
binary file may contain object files of different ABIs, of which the user
chooses one at run time.

This patch changes the parser to read the data using the google_breakpad::
ByteCursor class, which can handle different endiannesses and word sizes.
The StabsReader constructor now takes arguments indicating the endianness
of the data and the size of each entry's value field. The patch changes
src/common/linux/dump_symbols.cc to pass the new argument.

This patch changes the StabsReader unit tests to use the google_breakpad::
TestAssembler classes to generate test data, rather than reading it from a
file. This makes it easy to generate test data in various endiannesses and
word sizes. It also adds tests for the new parser behaviors.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@583 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 17:09:20 +00:00
jimblandy
6c97801617 Breakpad symbol dumper: Define the ByteBuffer and ByteCursor classes.
The ByteBuffer and ByteCursor classes are utility classes for reading
binary files, handling endianness and word size issues in a portable way.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@582 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-05 17:07:23 +00:00
hansl@google.com
ffedcd4945 Replacing solutions with gyp files. Moving tests for windows clients in unittests.
Review URL: http://codereview.chromium.org/1687018

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@581 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-05-03 20:21:40 +00:00
nealsid
eee511f1df Fix dependency on Visual C++ 9 introduced by revision 557.
A=nealsid
r=mmentovai

http://breakpad.appspot.com/105001/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@580 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-29 22:32:32 +00:00
ted.mielczarek
c90769edd6 Fix assembly in the ARM sys_clone implementation to indicate that r7 is clobbered, and also remove some extraneous semicolons from ARM portions of linux_syscall_support. r=jimb at https://bugzilla.mozilla.org/show_bug.cgi?id=555674
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@579 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-29 18:24:04 +00:00
ted.mielczarek
131c0c6a83 issue 372 - fix Mac OS X minidump generation code to handle x86-64 properly. r=mark at http://breakpad.appspot.com/103001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@578 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-29 18:02:42 +00:00
nealsid
f2dfb88b2a Fix include paths to be consistent with rest of project
http://breakpad.appspot.com/104001

A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@577 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-28 23:03:59 +00:00
jimblandy
56e7a3c65d Breakpad Linux Dumper: Have DumpStabsHandler free accumulated functions if Finalize is not called
The DumpStabsHandler class creates Module::Function objects as it processes
data from the StabsReader, but waits to add the Functions to the Module
until all parsing is complete and its Finalize member function is called,
so that it can compute line and function end addresses that the STABS data
may have left implicit.

If the DumpStabsHandler is destructed before its Finalize method is called,
it fails to free the Functions it has created, but not yet added to the
Module. (Adding a Function to a Module transfers ownership of the Function
to the Module.)

This adds a destructor to DumpStabsHandler which takes care of freeing any
Functions that it still owns.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@576 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-28 18:16:00 +00:00
jimblandy
504280af60 Breakpad Dumper: Move CFI register names to DwarfCFIToModule class.
At the moment, the mappings from register numbers appearing in DWARF CFI
and .eh_frame exception handling sections to the appropriate
processor-specific names are in src/common/linux/dump_syms.cc. However, the
numberings are (for the most part) the same on all platforms using DWARF,
so there's no reason those tables shouldn't be shared between the Linux and
Mac symbol dumpers.

This patch moves the tables into a nested class of DwarfCFIToModule, so
they the Mac dumper can use them when it is changed to use
DwarfCFIToModule.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@575 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-28 18:14:59 +00:00
jimblandy
865df5af57 Breakpad test support: Move test_assembler.{h,cc} from src/processor to src/common.
The google_breakpad::TestAssembler classes are used in both the processor's
and the Linux dumper's test suites, and will soon be used in the Mac
dumper's tests as well. This patch moves their source files from
src/processor to src/common.

a=jimblandy, r=thestig


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@574 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-27 19:17:59 +00:00
nealsid
d5b689e7af Patch from Zhurun to fix build breaks in gcc 4.4.1
CR URL: http://breakpad.appspot.com/100001/show

A=Zhurun
R=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@573 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-26 23:52:50 +00:00
jimblandy
089003b7f6 Breakpad processor: Work around overload resolution problems in stream pos_type comparisons
When building with G++ 4.1.2, src/processor/cfi_frame_info.cc fails to
build with the error below. G++ 4.2.1 and later do not seem to report this
problem.

This patch works around the problem by casting stream.tellp() to
std::streamoff before doing the comparison.

src/processor/cfi_frame_info.cc: In member function `std::string google_breakpad::CFIFrameInfo::Serialize() const':
src/processor/cfi_frame_info.cc:105: error: ambiguous overload for `operator!=' in `stream.std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::<anonymous>.std::basic_ostream<_CharT, _Traits>::tellp [with _CharT = char, _Traits = std::char_traits<char>]() != 0'
src/processor/cfi_frame_info.cc:105: note: candidates are: operator!=(std::streamoff, int) <built-in>
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/postypes.h:143: note:                 bool std::fpos<_StateT>::operator!=(const std::fpos<_StateT>&) const [with _StateT = __mbstate_t]

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@572 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-20 15:56:32 +00:00
jimblandy
1e73bad86e Breakpad stack walker: remove embedded newlines from module names.
pdb filenames in crash reports may contain embedded newlines. When
minidump-stackwalk prints these lines, it ends up with:

Module|olek8r4u.dll|6.0.6000.16386|\\xc2\\xeb\\x17\\x04J\\xb6:\\xbaT\\xf3\\xef\\xe8Y\\x90\\x86\\xaa\\xe5\\x16n\\xb1\\x80\\x85\\t\\x12!\\x16\\x0f\\x98\\xf8\\x89\\x16"\\x96\\xd4\\x84\\x88\\xea\\xe3\\r\\r\\x1b\\xca\\x85*^h\\xf5\\xdc\n\\xd9\\xf4}j\\x1d7\\xe39o\\x1f\\xc5\\xc4\\xa6x\\x8ba\\xe8\\xd6K\\x89H\\xe1\\xff\\xe7\\xf5\\xf0Y\\xfd\\xf5\\xdbu\\x0c\\x07\\x86\\xed|29E0B04FCCBE47EB86A6C819E8B89D051|0x00f60000|0x00ff2fff|0\n

Which has an embedded newline and the machine parser can't handle it. This
patch just strips the embedded newline, just as we strip embedded |
separator characters.

a=bsmedberg, r=jimblandy


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@571 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-15 19:00:28 +00:00
jessicag.feedback@gmail.com
a62dc27d23 Mac now takes response code into account when determining success of a symupload.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@570 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-13 19:00:49 +00:00
ted.mielczarek
b223627d81 provide a network source line resolver + server. r=mark,jimb at http://breakpad.appspot.com/36001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@569 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-08 23:06:23 +00:00
mmentovai
c0ec51afe0 Include what you use.
Patch by Adam Langley <agl@chromium.org>.  r=me


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@568 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-05 19:54:48 +00:00
jimblandy
87855248f1 Breakpad symbol dumper: Move Linux dumping classes into src/common.
The Linux symbol dumper's classes are reasonably portable, and should be
usable for the Mac dumper as well. Move them to src/common, along with
their unit tests. Update #include directives and Makefile.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@567 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-05 19:40:17 +00:00
jimblandy
9e6b619ad0 Breakpad Linux Dumper: Disable warnings about unpaired functions and lines by default.
In the process of pairing up DWARF source lines with the functions they
belong to, the dumper detects and warns about regions of functions that
have no source line information, and vice versa. However, this seems to
occur in real code frequently enough (although not often) that the warnings
may obscure more serious problems.

This patch makes those warnings disabled by default in
DwarfCUToModule::WarningReporter. It does not add a way for the dump_syms
user to enable them.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@566 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-05 19:35:10 +00:00
mmentovai
5c27539f91 Add gettimeofday to linux_syscall_support.h
Patch by Adam Langley <agl@chromium.org>.
R=me


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@565 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-02 16:46:13 +00:00
jimblandy
b34b1d8525 Breakpad Linux dumper: Use the correct section's base address.
In order to dump call frame information held in .eh_frame sections, the
dumper needs to know the proper base address to use for pointers encoded
using the DW_EH_PE_textrel encoding. This should be the start of the .text
section. However, due to a cut-and-paste typo, the dumper was supplying the
base address of the ".got" section instead.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@564 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-01 22:58:18 +00:00
jimblandy
2a18f064ce Breakpad Linux dumper: Generate make dependencies on header files automatically.
The Linux dumper's Makefile doesn't record the object files' dependence on
header files at all, just because I was too lazy to write them out and knew
I would forget to keep them up to date anyway. But I've wasted too much
time tracking down mysterious segmentation faults and other problems after
changing header files, and I know it's wasted others' time, too.

a=jimblandy, r=nealsid,dmuir


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@563 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-04-01 22:57:06 +00:00
jimblandy
a0aca73851 Breakpad Linux dumper: Include filename in error messages.
a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@562 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-31 15:32:31 +00:00
jimblandy
608d142aaa Breakpad DWARF parser: correct comments regarding dynamic_cast.
The comments don't accurately describe what the style guide says.

Regardless of what the style guide says, RTTI seems to make trouble in
practice, because so many people build with it disabled. Since only the
symbol dumper uses RTTI, not the client library, it may be practical for
people to simply enable RTTI for the dumper. Failing that, it may be best
in the long run to violate the style guide and make the code work sans
RTTI.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@561 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-30 21:36:58 +00:00
jimblandy
00dbb73752 Breakpad Linux dumper: Make changes requested by Neal Sidhwaney in issue 59002.
- Use manifest constants for 'z' augmentation letters.
- Fix typos and rearrange some code for legibility.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@560 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-29 18:31:53 +00:00
jimblandy
f3319839c4 [ Mistakenly committed older version of patch. This is the right one. ]
Breakpad Linux client: Simplify VerifyStackReadWithMultipleThreads unit test.

As written, the VerifyStackReadWithMultipleThreads unit test makes
assumptions about the layout of thread_function's stack frame. As a result,
the test will fail when compiled with some compilers, or built with certain
optimization levels.

As an extension to C++, the GNU compilers allow you to request that a
variable be placed in a specific register. Using this, we can have
thread_function put the thread id in place where the test can find it
reliably.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@559 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-29 18:27:11 +00:00
jimblandy
b68b800189 Breakpad Linux client: Simplify VerifyStackReadWithMultipleThreads unit test.
As written, the VerifyStackReadWithMultipleThreads unit test makes
assumptions about the layout of thread_function's stack frame. As a result,
the test will fail when compiled with some compilers, or built with certain
optimization levels.

As an extension to C++, the GNU compilers allow you to request that a
variable be placed in a specific register. Using this, we can have
thread_function put the thread id in place where the test can find it
reliably.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@558 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-29 18:23:42 +00:00
siggi@chromium.org
18dd9d0104 Fix HandleInvalidParameter to provide a locally created exception record for the minidump.
Having an exception of interest makes the resultant minidumps look just like
crash dumps, in that the processor can identify the "crashing" tread. 
This means such minidumps can be classified by the stack signature, in contrast to the current state of things, in which all such dumps get lumped on a single pile.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@557 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-26 16:03:58 +00:00
jimblandy
43135e6e46 Add omitted newline to warning message in StabsReader::SymbolString.
a=jimblandy, no reviewer


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@555 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-18 18:59:27 +00:00
jimblandy
e7e1e1ebf5 Breakpad processor: Support AMD64 stack unwinding driven by DWARF CFI.
This adds support for 'STACK CFI' records (DWARF CFI) to the AMD64
stack walker. This is necessary for the stack trace to include any
frames other than the youngest. Unit tests are included.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@554 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-16 16:49:53 +00:00
jimblandy
c609f474a9 Breakpad: Support DWARF CFI-driven stack walking on ARM.
This patch allows the Breakpad minidump processor to use data from
STACK CFI records to generate stack traces for the ARM processor.

In the symbol dumper, we need a table mapping DWARF CFI register
numbers to their names: STACK CFI records refer to registers by name.

In the processor, we expand StackwalkerARM::GetCallerFrame to see if
there are STACK CFI records covering the callee, and then use those to
recover the caller's register values.

There's no good reason the ARM walker couldn't use the SimpleCFIWalker
interface declared in cfi_frame_info.h. Unfortunately, that interface
assumes that one can map register names to member pointers of the raw
context type, while MDRawContextARM uses an array to hold the
registers' values: C++ pointer-to-member types can't refer to elements
of member arrays. So we have to write out SimpleCFIWalker::FindCallerRegisters
in StackwalkerARM::GetCallerFrame.

We define enum MDARMRegisterNumbers in minidump_cpu_arm.h, for
convenience in referring to certain ARM registers with dedicated
purposes, like the stack pointer and the PC.

We define validity flags in StackFrameARM for all the registers, since
CFI could theoretically recover any of them. In the same vein, we
expand minidump_stackwalk.cc to print the values of all valid
callee-saves registers in the context --- and use the proper names for
special-purpose registers.

We provide unit tests that give full code and branch coverage (with
minor exceptions). We add a testing interface to StackwalkerARM that
allows us to create context frames that lack some register values.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@553 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-16 16:46:22 +00:00
jimblandy
a76aaa1442 Breakpad Linux dumper: Parse the .eh_frame section.
Extend google_breakpad::CFISection with the ability to produce
.eh_frame data. Entry headers have a different format, and pointers
can be encoded in new and fascinating ways.

Extend dwarf2reader::CallFrameInfo to be able to parse either DWARF
CFI or .eh_frame data, as determined by an argument to the
constructor. Cope with variations in header formats, encoded pointers,
and additional data in 'z' augmentation data blocks. Extend the unit
tests appropriately.

Extend dump_syms to look for a .eh_frame section, and if it is
present, find the necessary base addresess and parse its contents.

There's no need for DwarfCFIToModule to check the version numbers; if
CallFrameInfo can parse it, DwarfCFIToModule should be able to handle
it. Adjust tests accordingly.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@552 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-16 16:37:50 +00:00
jimblandy
0de9f43b87 Breakpad DWARF parser: Add support for parsing .eh_frame encoded pointers.
The Linux C++ exception handling data format (.eh_frame) can specify a
number of different encodings for the addresses it contains. This
patch extends dwarf2reader::ByteReader to read pointers encoded in
these ways.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@551 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-16 16:34:52 +00:00
jimblandy
3e768ed9c0 Breakpad Linux dumper: Add support for dumping DWARF CFI as STACK CFI records.
Define a new DWARF parser class, dwarf2reader::CallFrameInfo.

Extend google_breakpad::Module to store and write out 'STACK CFI' records.

Define a new google_breakpad::DwarfCFIToModule class, to accept DWARF
CFI data from the parser and populate a Module with the equivalent
STACK CFI records.

Extend the Linux symbol dumping tool, dump_syms, to use
dwarf2reader::CallFrameInfo, google_breakpad::DwarfCFIToModule, and
google_breakpad::Module to extract DWARF CFI from the executable or
shared library files and write it to the Breakpad symbol file.

Define CFISection, a new class derived from TestAssembler::Section,
for use in creating DWARF CFI data for test cases.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@550 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-16 16:31:49 +00:00
jimblandy
6d3a825dbf Breakpad: Add minidump processor support for DWARF Call Frame Information.
Add a CFIFrameInfo class (named for symmetry with WindowsFrameInfo) to
represent the set of STACK CFI rules in effect at a given instruction,
and apply them to a set of register values. Provide a SimpleCFIWalker
class template, to allow the essential CFI code to be shared amongst
the different architectures.

Teach BasicSourceLineResolver to partially parse 'STACK CFI' records,
and produce the set of rules in effect at a given instruction on
demand, by combining the initial rule set and the appropriate rule
deltas in a CFIFrameInfo object.

Adapt StackwalkerX86 and StackFrameX86 to retrieve, store, and apply
CFI stack walking information.

Add validity flags for all the general-purpose registers to
StackFrameX86::ContextValidity.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@549 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-16 16:28:32 +00:00
jimblandy
a7eb2329de Breakpad processor: Unit tests for StackwalkerX86.
Issue 53001 (http://breakpad.appspot.com/53001) defines the
TestAssembler classes; those, along with a new set of mock classes
defined in stackwalker_unittest_utils.h, make it possible for us to
actually do proper unit testing of a stack walker. These tests get us
full code coverage for stackwalker_x86.cc.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@548 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-16 16:25:30 +00:00
jimblandy
9244496c6f Breakpad Processor: Add new unit tests for google_breakpad::Minidump
This also adds two new test utility class groups, TestAssembler and
SynthMinidump. These are overkill for what I'm doing with them here
(and may simply be overkill, period), but they make it easy to write
unit tests for code that works on binary files or raw memory contents
in a cross-platform way. I'm planning to use them for the DWARF CFI
unwinding tests and the DWARF CFI parser tests.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@547 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-16 16:20:34 +00:00
ted.mielczarek
5431f41508 add missing <string> include from r541
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@544 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-03 15:36:35 +00:00
nealsid
19374d2636 Fix to cache NOT_FOUND results from symbol supplier on a per-minidump basis
http://breakpad.appspot.com/64001

R=ted.mielczarek, brdevmn
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@543 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-03 01:29:04 +00:00
jimblandy
81aadb99a6 Breakpad Linux dumper: Tolerate STABS data from code linked with --gc-sections.
Programs compiled with -ffunction-sections -Wl,--gc-sections may have
SO entries for the start of the compilation unit whose addresses are
zero, even when the compilation unit contains non-omitted functions at
non-zero addresses. The breakpad dumper should not assume that the
compilation unit starting address is always non-zero.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@542 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-02 19:39:18 +00:00
nealsid
de545c09d0 ARM support, with some build system changes to support x86-64, arm, and i386 in an autoconf style build in Linux. The O2 build for the unit tests is still broken but I'm checking this in to unblock people
A=nealsid
R=ajwong, hannahtang, ted.mielczarek



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@541 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-03-02 00:39:48 +00:00
jimblandy
841ad48a37 Breakpad Linux symbol dumper: Handle programs linked with --gc-sections.
As explained in the code:

Given the right options, the GNU toolchain will omit unreferenced
functions from the final executable. Unfortunately, when it does so,
it does not remove the associated portions of the line number program;
instead, it lets the symbol references in the DW_LNE_set_address
instructions pointing to the now-deleted code resolve to zero. Given
this input, the DWARF line parser will call AddLine with a series of
lines starting at address zero.

Rather than collecting series of lines describing code that is not
there, we should drop them. Since the linker doesn't explicitly
distinguish references to dropped sections from genuine references to
zero, we must use a heuristic. We have chosen:

 - If a line starts at address zero, omit it. (On the platforms
   breakpad targets, it is extremely unlikely that there will be code
   at address zero.)

 - If a line starts immediately after an omitted line, omit it too.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@538 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-24 22:36:20 +00:00
jimblandy
5cf2e760b6 Breakpad processor: Support negative literals in the postfix evaluator.
Some versions of the libstdc++, the GNU standard C++ library, have
stream extractors for unsigned integer values that permit a leading
'-' sign (6.0.13); others do not (6.0.9). Regardless of the behavior
of the extractors, Breakpad postfix expressions should support
negative literals.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@537 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-24 19:17:54 +00:00
jimblandy
19d77e0c33 Breakpad Linux dumper: Add missing newlines to error messages.
Some of the error messages that could be generated in the process of
parsing DWARF debugging information lack terminating newlines.

a=jimblandly, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@536 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-23 01:23:36 +00:00
jimblandy
d6fb5a7c51 Breakpad Linux dumper: Record AbstractOrigin entries for all DIEs that need them.
Any DIE with an DW_AT_inline attribute can be cited by
DW_AT_abstract_origin attributes --- even if the value of the
DW_AT_inline attribute is DW_INL_not_inlined. Thus, we need to set the
inline_ flag on all such DIEs, regardless of the attribute's value.
This allows us to find names in situations like this:

 <1><30cf>: Abbrev Number: 57 (DW_TAG_subprogram)
    <30d0>   DW_AT_specification: <0x3013>
    <30d4>   DW_AT_decl_file   : 1
    <30d5>   DW_AT_decl_line   : 92
    <30d6>   DW_AT_inline      : 0        (not inlined)
    <30d7>   DW_AT_sibling     : <0x30f0>
...
 <1><30f5>: Abbrev Number: 59 (DW_TAG_subprogram)
    <30f6>   DW_AT_abstract_origin: <0x30cf>
    <30fa>   DW_AT_low_pc      : 0x13bc
    <30fe>   DW_AT_high_pc     : 0x13ec
    <3102>   DW_AT_frame_base  : 0x2c     (location list)
    <3106>   DW_AT_sibling     : <0x3113>

a=jimblandy, r=nealsid,dmuir


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@526 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-20 00:51:22 +00:00
jimblandy
6de1b75da4 Breakpad Linux dumper: Compare section names correctly.
FindSectionByName will return the first section whose name starts with
NAME, because strncmp stops the comparison once NAME's characters have
been found to match. The comparison stops before the terminating '\0'.
For example, if we search for the section named ".eh_frame", we may
get the section named ".eh_frame_hdr".

Instead, check that the section name section has enough space to store
the complete name with its terminating '\0', and then use strcmp,
which will never examine more than strlen(NAME) + 1 bytes from the
section name section, regardless of its contents, and will require the
terminating '\0' to match as well.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@525 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-18 07:57:53 +00:00
jimblandy
89f1396fd1 Breakpad DWARF parser: Expand comments for ByteReader class.
This is preparation for adding support for reading Linux C++ exception
handling data's encoded pointers. The change should have no user-visible
effect; it simply expands the comments for dwarf2reader::ByteReader, and
regroups the member functions.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@522 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-11 22:44:01 +00:00
jimblandy
dd5067f391 Linux DWARF reader: Follow DW_AT_abstract_origin links to find function names.
Without this patch, debugging information like the following will produce
FUNC records with no names, because the dumper (correctly) ignores the
DW_TAG_subprogram DIEs that lack DW_AT_low_pc/DW_AT_high_pc attributes, but
won't follow the DW_AT_abstract_origin link from the DIE that does have
code addresses to find its name.

 <1><168>: Abbrev Number: 5 (DW_TAG_class_type)
    <169>   DW_AT_name        : Foo	
 <2><183>: Abbrev Number: 7 (DW_TAG_subprogram)
    <185>   DW_AT_name        : Foo	
    <18b>   DW_AT_declaration : 1	
 <1><1b7>: Abbrev Number: 12 (DW_TAG_subprogram)
    <1b8>   DW_AT_specification: <0x183>	
    <1bc>   DW_AT_inline      : 2	(declared as inline but ignored)
 <1><1dc>: Abbrev Number: 16 (DW_TAG_subprogram)
    <1dd>   DW_AT_abstract_origin: <0x1b7>	
    <1e1>   DW_AT_low_pc      : 0x8048578	
    <1e5>   DW_AT_high_pc     : 0x8048588	

a=dmuir, r=jimblandy


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@520 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-10 17:55:24 +00:00
jimblandy
952f3c7b73 Breakpad Linux dumper: Don't be silly about global functions.
Yes, classes are useful. But that doesn't mean that every function has
to gratuitously become a member function. The Google C++ Style Guide
does not require this silliness, since the function is in the
google_breakpad namespace anyway.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@519 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-09 17:13:17 +00:00
jimblandy
c50e7c604c Breakpad Linux dumper: Add file comments as required by the style guide.
This also includes some comments I promised Cary Coutant I'd write
about the appropriateness of processing attributes in EndAttributes
calls.

The Google C++ Style Guide requires each file to have an author notice
and a comment explaining the file's general purpose. For the record, I
don't think putting an author notice on the files is a good idea; it's
odd to have the original author retain prominence even if the file has
been heavily edited by others; the version control system answers this
question more accurately. This is only for Style Guide compliance. The
Apache group decided to discourage author annotations, partially for
these reasons:

http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-dev/200402.mbox/%3C4039F65E.7020406@atg.com%3E

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@518 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-09 17:10:57 +00:00
jimblandy
83e085b7a3 Breakpad: Update copyright notice years on all files changed in 2010.
We've gotten mixed advice from the lawyery types about whether this
matters. But it's easy enough to do.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@517 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-09 17:08:56 +00:00
ted.mielczarek
bad560bb69 Print ARM register values in minidump_stackwalk. r=nealsid at http://breakpad.appspot.com/57002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@516 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-09 12:16:45 +00:00
ted.mielczarek
f480ba1169 Refactor Chrome's out-of-process Linux code into CrashGeneration{Server,Client} classes. Upstreamed from the Mozilla repository. Patch by Chris Jones <jones.chris.g@gmail.com> r=me at https://bugzilla.mozilla.org/show_bug.cgi?id=516759
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@515 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-05 18:21:31 +00:00
jimblandy
bd76cd035c Breakpad processor: Move STACK WIN record parsing into its own function.
This looks a little odd right now, since ParseStackInfo has only one
alternative to handle, but I think breaking this out should make the
subsequent addition of STACK CFI record support easier to review.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@514 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-05 18:10:51 +00:00
jimblandy
2b48a6a89f Breakpad processor: Give Windows stack data Windows-specific names.
Rename BasicSourceLineResolver::Module::StackInfoTypes to
WindowsFrameInfoTypes. This enum really describes the forms of
Windows-specific stack unwinding data (STACK WIN records), and its
name should reflect that, especially since we'll be adding support for
other kinds of stack walking information.

The 'stack' -> 'frame' shift matches the naming of the
WindowsFrameInfo type.

Similarly, rename BasicSourceLineResolver::Module::stack_info_ to
windows_frame_info_.

Do similar renamings in basic_source_line_resolver_unittest.cc.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@513 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-05 18:09:17 +00:00
jimblandy
7f1455601d Breakpad processor: Segregate STACK WIN vs. traditional stack walking.
This patch moves the code for finding caller frames using STACK WIN
data and the code to do so using the traditional frame layout (%ebp
points at saved %ebp, pushed just after return address) into their own
functions. In addition to making things a little clearer, this is
preparation for adding support for STACK CFI records into the mix.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@512 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-05 18:04:56 +00:00
jimblandy
89e07bf2c7 Breakpad processor: Support evaluating a postfix expression to produce a value.
This adds an EvaluateForValue member function to PostfixEvaluator, and
along with appropriate unit tests.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@511 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-05 17:51:35 +00:00
jimblandy
6a9ffff696 Breakpad x86 Stack Walker: Pass "out" parameters by address, not reference.
The Google C++ Style Guide requires all parameters passed by reference
to be labeled 'const', and says that pointers should be used for
output arguments. This patch brings google_breakpad::StackwalkerX86
into line.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@510 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-05 17:46:41 +00:00
jimblandy
2214cb9bc1 Breakpad processor: Make PostfixEvaluator treat the MemoryRegion as const.
In order to be able to treat any MemoryRegion as const, the accessor
functions need to be declared this-const, which means annotations on
all the subclasses, etc. etc.

Since MinidumpMemoryRegion fills its memory_ member on demand, that
member needs to be marked 'mutable', but this is exactly the sort of
situation the 'mutable' keyword was intended for, so that seems all
right.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@509 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-05 17:17:24 +00:00
jimblandy
e87521a989 Breakpad processor: Save Windows unwinding data earlier in x86 walker.
At the moment, StackwalkerX86::GetCallerFrame doesn't save the
WindowsFrameInfo that it finds for a frame unless it successfully
constructs the caller frame. This means that the windows_frame_info
field of the last frame on the stack is left unset, even when that
frame does have windows unwinding information.

This is not user-visible behavior, so it doesn't matter, but it is a
blemish on the interface, and unit tests (added in a later patch)
expect it.

This patch saves the information in the frame as soon as we find it.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@508 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-05 17:14:12 +00:00
jimblandy
e53e6af0c1 Breakpad Linux dumper: Recognize more processor architectures.
This extends the ElfArchitecture function to recognize the
architectures it seemed to me that breakpad was most likely to see.

Also: the dumper has historically not provided very helpful error
messages. This patch adds a few that were convenient, but we should do
an audit for this.

a=jimblandy, r=ted.mielczarek


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@507 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-02-02 20:19:01 +00:00
jimblandy
3e60d65111 Breakpad Linux Dumper: Rename structure members to follow the Google C++ Style Guide.
The Google C++ Style Guide says that members of structures needn't
have names ending in underscores. The structure types in
google_breakpad::Module don't follow this rule.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@505 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-28 22:59:15 +00:00
jimblandy
1ac84da26d Breakpad DWARF parser: Add method to read DWARF "Initial length".
This patch moves the ReadInitialFunction from dwarf2reader.cc, where
it was a static function, to being a member function of
google_breakpad::ByteReader.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@504 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-28 22:56:28 +00:00
jimblandy
03ebc1d245 Breakpad processor: Fix function and public symbol lookup.
In r480, I botched the change to make the comparisons that decide
whether an address falls within a function's range safe from overflow.
The original code said:

  address >= function_base && address < function_base + function_size

which is fine unless the function abuts the end of the address space,
in which case the addition overflows and you get a false negative.

My change subtracted function_size from both sides of the latter
comparison, which is meaning-preserving in true math, and gets you:

  address >= function_base && address - function_size < function_base

This not only reads strangely, but also still overflows if
function_size is greater than address. That's rare, but I've added a
case to the unit tests that checks it.

My intent had been to replace the addition which could overflow with a
subtraction that was known not to overflow, namely:

  address >= function_base && address - function_base < function_size

This is equivalent to the original in true math, and because of the
first comparison, we know the subtraction won't underflow in MemAddr
math.

The patch includes similar fixes to the public symbol lookup code, and
to FindWindowsFrameInfo, which was the only other function affected by
r480.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@503 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-28 05:17:23 +00:00
jimblandy
384b1c7d7d Breakpad Linux symbol dumper: Don't disable asserts.
Having NDEBUG be the default has wasted my time more often than I'm
proud to admit. There are no expensive asserts in the Linux symbol
dumper.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@502 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-27 19:10:56 +00:00
jimblandy
97f1da43ae Breakpad processor: Have RetrieveNearestRange correctly return range extent.
RangeMaps use the range's upper end as the key in the underlying map,
but RetrieveNearestRange was treating the key as the lower end.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@501 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-27 19:10:06 +00:00
jimblandy
057aa1f617 Breakpad Linux Dumper: Add DWARF support.
This adds DWARF support to the Breakpad Linux dumper. This is
implemented as two handler classes: google_breakpad::DwarfCUToModule
accepts data from dwarf2reader::CompilationUnit, and
google_breakpad::DwarfLineToModule accepts data from a
dwarf2reader::LineInfo, each populating a google_breakpad::Module with
the results. Behaviors specific to particular source languages are
handled by instances of a new class, google_breakpad::Language.

An input executable may contain both STABS and DWARF debugging
information: the dumper automatically recognizes what sorts of
information are available, and integrates the data into a single
output file.

All classes have unit tests, providing line and branch coverage of all
interesting code. Unit tests are written using the Google C++ Testing
Framework, and the Google C++ Mocking Framework where appropriate.

a=jimblandy, r=ccoutant


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@497 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-23 05:29:16 +00:00
jimblandy
32d1b2882b Typo: "An" -> "A".
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@496 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-23 01:22:32 +00:00
jimblandy
bc64ee962f Breakpad DWARF Parser: Improved DWARF-processing interface.
dwarf2reader::CompilationUnit is a simple and direct parser for DWARF
data, but its handler interface is not convenient to use. In
particular, the same handler object receives data about all DIEs
processed. One can't use distinct classes to separate the information
needed to handle different kinds of data.

This patch defines a new adapter type, dwarf2reader::DIEHandler, which
implements the existing DWARF parser's handler interface, given a
handler written to a more comfortable, object-orient interface. The
comments in dwarf2diehandler.h provide more detail.

a=jimblandy, r=ccoutant


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@495 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-23 01:20:55 +00:00
jimblandy
8bfcc2683f Breakpad DWARF Reader: Change LineInfoHandler::AddLine to provide the line's length.
Breakpad's DWARF line number info parser provides a code address,
file, and line number for each code/source pairing, but doesn't
provide the length of the machine code. This makes that change, as
discussed in the following thread:

http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/ed8d2fde79319368p

This patch also makes the corresponding changes to the functioninfo.cc
module, used by the Mac dumper. This patch has no effect on the Mac
dumper's output.

a=jimblandy, r=ccoutant


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@494 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-22 23:30:36 +00:00
jimblandy
e15bffe466 Breakpad DWARF Reader: Also look for DWARF in sections with the proper names.
The DWARF specification specifices which names the sections containing
DWARF information should have. OSX uses slightly different names. This
patch changes the DWARF reader to look for the sections under both
sets of names.

a=jimblandy, r=ccoutant


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@493 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-22 23:26:12 +00:00
jimblandy
f4a106d4b5 Add new file missed in r490.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@492 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-14 23:08:24 +00:00
jimblandy
2684b4dc19 Breakpad processor: Don't pass Windows stack walking information to all walkers.
At the moment, the StackWalker GetCallerFrame member function expects
a vector of WindowsFrameInfo structures, even though WindowsFrameInfo
is only used or useful on one one implementation (StackWalkerX86).

This patch changes StackWalker::GetCallerFrame to no longer expect the
WindowsFrameInfo structures, and changes all implementations to match.

In particular, StackWalkerX86 is changed to find the WindowsFrameInfo
data itself, and store a pointer to whatever it got in the StackFrame
object itself (which is really a StackFrameX86).

To allow GetCallerFrame implementations to look up stack walking data,
StackWalker::resolver_ needs to be made protected, not private.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@491 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-14 19:17:36 +00:00
jimblandy
5251e64f48 Breakpad Linux dumper: STABS reader incorrectly assumes a single compilation unit
The stabs reading code in google-breakpad incorrectly assumes that the
stabs data is a single compilation unit. Specifically, it ignores
N_UNDF stabs and assumes that all string indices are relative to the
beginning of the .stabstr section.

This is true when linking with the GNU linker by default, because the
GNU linker optimizes stabs debug info. The gold linker does not do
this optimization. It can be disabled when using the GNU linker with
the --traditional-format command line option.

For more details of the problem, see:

http://sourceware.org/bugzilla/show_bug.cgi?id=10338
http://code.google.com/p/google-breakpad/issues/detail?id=359

This patch adds unit tests that reproduce the failure, and fixes the
stabs parser.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@490 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-14 17:19:34 +00:00
jimblandy
7b873221e6 Linux Breakpad Dumper: support running unit tests under valgrind or other wrapper programs.
This adds a new variable, TEST_WRAPPER, to src/tools/linux/dump_syms.
Comments in the patch provide details.

This patch also moves the public variable section to sit after the
public phony targets.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@486 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-13 07:41:22 +00:00
jimblandy
eef5ccc61f Breakpad processor: Opening a map file is not an error.
a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@485 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-13 07:39:24 +00:00
jimblandy
cf55ca5b5c Breakpad: Fix Emacs mode settings mingled with copyright notice text.
a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@484 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-12 19:51:14 +00:00
nealsid
e7b2043dd2 Move file_id.cc from test_src to lib_src
A=nealsid
R=ted.mielczarek



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@483 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-12 19:20:39 +00:00
jimblandy
330ca2f7c7 Google Breakpad DWARF reader: Add a handler function for DIE references.
Add a new member function to dwarf2reader::Dwarf2Handler,
ProcessAttributeReference, for reporting attribute values that are
references to other DIEs. This handler member function always receives
an absolute offset (that is, relative to the start of the .debug_info
section, not to the start of the compilation unit), regardless of the
form the attribute uses. (Some forms are CU-relative, some are
absolute.)

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@482 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-12 16:53:02 +00:00
jimblandy
0441036f9e Breakpad: Avoid warnings building with G++ 4.4.1 using -O3 -Wall.
src/processor/minidump.cc:1067: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 3 has type ‘unsigned int’
src/processor/stackwalker_arm.cc:83: warning: unused variable ‘last_frame’
src/processor/minidump_stackwalk.cc:163: warning: ‘trust_name’ may be used uninitialized in this function

a=jimblandy, r=ted.mielczarek


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@481 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-12 16:41:13 +00:00
jimblandy
e9faf54828 Issue 49013: Breakpad Processor: Use a separate API to retrieve Windows stack debugging info.
At the moment, FillSourceLineInfo returns Windows DIA-based stack
walking data. In addition to being ugly, this makes it difficult to
provide access to DWARF CFI-based stack walking data in a symmetrical
way.

This patch changes FillSourceLineInfo to do the single job its name
suggests, and adds a second member function to
SourceLineResolverInterface to retrieve Windows DIA stack walking
information. A sibling member function will provide access to DWARF
CFI stack walking data.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@480 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-11 22:31:50 +00:00
jimblandy
5b787b1911 Breakpad DWARF Reader: Add DWARF language enumeration values.
a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@479 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-11 22:23:05 +00:00
nealsid
2832dc011c Patch from Kris Rambish to keep memory usage flat when processing a directory full of minidump files
A=krisr
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@478 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-11 21:24:43 +00:00
nealsid
c65d3e6206 INclude stackwalker_arm.{cc,h} in crash_report build
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@477 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-11 20:26:22 +00:00
nealsid
718478d95d Fix solaris build break
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@476 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-08 23:04:14 +00:00
stuart.morgan
910f68a5d4 Make Mac comment and email text field placeholders localizable. r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@475 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-01 00:21:18 +00:00
stuart.morgan
6f50ca38bb Add email mapping for Socorro. r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@474 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-01 00:17:33 +00:00
jimblandy
b64d76a3b8 Issue 49012: Breakpad Processor: Rename 'StackFrameInfo' structure to 'WindowsFrameInfo'.
Also, rename stack_frame_info.h to windows_frame_info.h.

If it seems odd to have functions like FillSourceLineInfo returning
Windows-specific data structures... well, it is! This patch just makes
it more obvious what's going on.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@471 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-23 22:32:14 +00:00
jimblandy
5ebd6507e3 Breakpad processor: Use unsigned constants in comparisons, to quiet compiler warnings.
This patch avoids comparisons between signed and unsigned values, as
warned about by G++ 4.4.1.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@469 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-23 22:01:57 +00:00
jimblandy
0468306245 Breakpad Linux Dumper: Fix up comments in google_breakpad::Module interface.
Use the term "own", since ownership is the concept at work here.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@468 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-23 21:56:41 +00:00
jimblandy
c823931376 Issue 49003: Breakpad Linux Dumper: Add unit tests for STABS dumper.
Previous patches added unit tests for the STABS parser and the
Breakpad symbol file writer; this adds unit tests for the "dumper"
class that sits between them, receiving data from the parser and
handing it to the writer.  So now the whole pathway has coverage.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@467 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-23 21:50:01 +00:00
jimblandy
52cb2c6f42 Breakpad Linux dumper: Add unit tests for google_breakpad::Module.
Adjust Module's interface a bit to facilitate testing:
- Make AssignSourceIds something a client can call --- it's perfectly
  well-defined, so this is an okay change.
- Add GetFunctions, GetFiles and FindExistingfile member functions,
  which the test harness will use to get results to examine.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@466 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-23 21:46:00 +00:00
jimblandy
6ed5383245 Breakpad Linux Dumper: Use proper sizes and radixes when writing Breakpad symbol files.
A FUNC record's parameter size is also hexadecimal, and all values are
64 bits wide.

A line record's address and size are 64 bits wide.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@465 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-23 21:15:23 +00:00
jimblandy
5a6e1d3f03 Breakpad Linux dumper: move DumpStabsHandler into its own file, for testing.
This will make it easier to write unit tests for DumpStabsHandler.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@464 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-23 21:13:11 +00:00
ted.mielczarek
9f211b4283 fix compilation on 64-bit, followup from issue 357
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@463 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-23 20:44:32 +00:00
ted.mielczarek
0a5fc5d663 Issue 357: New Linux file_id code doesn't persist across strip. r=agl,nealsid at http://breakpad.appspot.com/49008
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@461 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-23 17:09:27 +00:00
ted.mielczarek
1adb184d42 fix a badly-applied patch, and also re-run automake which I forgot to do
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@455 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-21 13:12:20 +00:00
ted.mielczarek
9276b0d301 Basic arm cpu support for processor. r=mark at http://breakpad.appspot.com/49011
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@454 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-19 21:43:53 +00:00
jimblandy@gmail.com
7a77f45f79 Breakpad DWARF parser: Fix up documentation for DWARF reader classes.
Fix typos.

For CompilationUnit::Start, I was confused by the '-' in the original
comment, taking it for a parenthetic clause marker, assuming an
implicit "of the next compilation unit" at the end of the sentence.

The comments should refer to the ".debug_info" section, not the
"debug_info" section. The latter is not the section name actually used
on any system (ELF or Mach-O), and the former is the name prescribed
by the DWARF spec.

Some of the comments for ProcessAttribute* member functions claim that
OFFSET is from the start of the compilation unit, but that's not so:
the code has always passed an offset relative to the start of the
.debug_info section.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@453 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-18 22:57:54 +00:00
nealsid
e4ffacd0d8 Fix build break for 64-bit compilation.
A=Gregory Dardyk
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@452 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-17 23:00:12 +00:00
brdevmn
f7f9dfcab6 Added on-demand minidump generation for Linux, and a Linux test app.
A=brdevmn
R=mochalatte

Code review: http://breakpad.appspot.com/48001/show



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@451 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-16 20:10:57 +00:00
jimblandy@gmail.com
5fb436d5bb Issue 41004: Breakpad DWARF parser: fixes to compile without warnings under GNU C++ 4.3.3.
a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@450 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 17:25:27 +00:00
jimblandy@gmail.com
315c4f6b20 Issue 41003: Breakpad DWARF parser: Include <cstdio>, since we use it
src/common/dwarf/dwarf2reader.cc uses the old-fashioned <stdio.h>
facilities to report errors. Ideally, we would add a 'Warning' message
to the handler and make the client responsible for dealing with the
errors, but this at least allows us to compile.

Ubuntu 9.10 uses GCC 4.4.1; under older versions of GCC, this wasn't a
problem, probably because stdio.h was being brought in inadvertently
somewhere else.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@449 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 17:23:43 +00:00
jimblandy@gmail.com
bdd7ca54cd Issue 42002: Breakpad DWARF parser: avoid using <stdint.h> type
It seems that a use of the <stdint.h> type uintptr_t has crept into
the DWARF parser. This defines a workaround for the GNU compilers
(tested on both Mac and Linux) which will raise an error if it doesn't
work.

My personal preference would be just to assume that the <stdint.h>
header is available and use the standard types everywhere, but 1) that
would be a large change, likely to make merges with the other branches
of the DWARF parser more difficult, and 2) it would make it quite
difficult to build under Microsoft Visual Studio, which doesn't have
the <stdint.h> header; Microsoft has said they have no plans to
provide it, as they would rather "focus their efforts" on C++ and
.NET.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@448 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 17:21:14 +00:00
jimblandy@gmail.com
07466260e2 Issue 42001: Breakpad Linux Dumper: remove compilation warnings in guid_creator.cc.
Building on Ubuntu 9.10 with the distributed compiler (GCC 4.4.1), we get
warnings like the following:

guid_creator.cc:56: warning: dereferencing type-punned pointer will break strict-aliasing rules

It doesn't matter in this case, but there's no crying need to use
reinterpret casts in an endian-dependent way when there are plenty of
well-defined ways to get the same effect.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@447 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 17:11:54 +00:00
jimblandy@gmail.com
4969cfc647 Issue 39002: Breakpad DWARF parser: Move DWARF parser to platform-independent directory.
Move the DWARF parser, and the functioninfo.cc DWARF consumer, from
src/common/mac/dwarf to src/commmon/dwarf, so that it can be shared
between the Mac and Linux dumpers.

Fix up #include directives, multiple inclusion protection macros, and
Xcode build files.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@446 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 17:06:21 +00:00
jimblandy@gmail.com
08fecb2e43 Issue 26001: Linux dumper: fix comments in STABS reader
Typos; ambiguities; dangling references to arguments whose names got
changed.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@445 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 16:58:37 +00:00
jimblandy@gmail.com
7f941f990a Linux dumper: Add unit tests for google_breakpad::StabsReader.
The test system is based on Google C++ Testing Framework and the
Google C++ Mocking Framework.

This includes a parser that turns human-readable input files ("mock
stabs") into .stab and .stabstr section contents, which we can then
pass to a StabsReader instance, using a handler object written with
GoogleMock. The 'make check' target in src/tools/linux/dump_syms runs
this.

The supplied input file is pretty small, but I've done coverage
testing, and it does cover the parser.

I thought the mock stabs parser would be less elaborate than it turned
out to be. Lesson learned.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@444 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 16:54:44 +00:00
jimblandy@gmail.com
0397da8e08 Issue 25003: Linux dumper: Fix infinite loop in stabs parser.
If the input passed to a StabsReader instance contains a compilation
unit whose first entry is an N_SO with no name, the parser enters an
infinite loop.  Since such entries mark the end of a compilation unit,
ProcessCompilationUnit should skip them.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@443 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 16:34:02 +00:00
jimblandy@gmail.com
bb846bdc98 Issue 25002: Linux symbol dumper: Require STABS consumers to provide a Warning member.
The StabsHandler class should not provide a fallback definition for
its Warning member function that just throws away warning messages.
It should require the consumer to provide an appropriate definition.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@442 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 16:32:32 +00:00
jimblandy@gmail.com
1c9c0568e0 Issue 39001: Breakpad Linux dumper: Refactor Makefile.
Use GNU Make features to make the dumper, unit tests, and maintenance
targets more independent, so I get fewer conflicts as I work on
different parts of the patch series.

In particular:
- Provide targets to run tests and produce test coverage reports.
- Gather C and C++ build rules in one place.
- Avoid variables that list object files, as pattern rules can compute
  these values directly from the dependencies.
- Use VPATH to find sources in other directories.

a=jimb, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@441 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-15 16:28:43 +00:00
ted.mielczarek
9dcc03f47d Mozilla bug 532713 - OS X client code doesn't decoded extended family ids in CPU info. Patch by Jeff Muizelaar <jmuizelaar@mozilla.com>, r=me
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@440 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-14 11:47:53 +00:00
nealsid
bb618860df Fix some build warnings
A=zhurunz
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@439 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-10 19:15:44 +00:00
ted.mielczarek
0cbd50c975 Allow Minidump class to be instantiated with stream instead of file. r=mark at http://breakpad.appspot.com/46001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@438 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-09 01:24:37 +00:00
ted.mielczarek
d95a88c3f1 remove trailing comma from enum definition to make it compile with -pedantic
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@437 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-03 20:58:31 +00:00
ted.mielczarek
72a2bff592 issue 330 - linux_syscall_support.h has extra semicolons causing compilation to fail with certain gcc options. Patch by Josh Aas <joshmoz@gmail.com>, r=me
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@436 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-03 18:16:31 +00:00
ted.mielczarek
3b9b206b5f issue 336 - Look for libcurl-gnutls in addition to libcurl.so. Patch by Karl Tomlinson <karlt@mozbugz.karlt.net>, r=me
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@435 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-03 16:31:25 +00:00
ted.mielczarek
b1f271a4ec remove empty file, leftover from r384
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@434 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-03 13:59:55 +00:00
ted.mielczarek
0314e487e4 issue 170 - Report assertion type in minidump_stackwalk output. r=mark at http://breakpad.appspot.com/45001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@433 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-02 17:43:57 +00:00
nealsid
096992fac7 Upstreaming several patches from Chrome:
Build fix for systems where sys/user.h needs sys/types.h....
http://breakpad.appspot.com/40002
MDRawSystemInfo.processor_level refers to the CPU family, not the cpuid level..
http://breakpad.appspot.com/40003
Use MD_MODULE_SIZE in place of sizeof(MDRawModule).
http://breakpad.appspot.com/39003
Linux x64 compile fix.
http://breakpad.appspot.com/40004
Include linux_syscall_support.h to get definition of NT_PRXFPREG. This is
Chromium commit 23659.
http://breakpad.appspot.com/40005
Build breakpad / crash reporting on Linux 64-bit. This is Chromium commit
23396.
http://breakpad.appspot.com/40006
Fix #includes in a couple unit tests.
http://breakpad.appspot.com/41001
Clean up unused headers / files for Linux dump_syms.
http://breakpad.appspot.com/40002




git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@432 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-12-01 21:35:52 +00:00
ted.mielczarek
873064894b don't output duplicate filenames in PDBSourceLineWriter. r=mark at http://breakpad.appspot.com/43001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@431 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-11-23 14:50:55 +00:00
ted.mielczarek
927cc8fa2a output function names for PGO-optimized cold function blocks. r=mark at http://breakpad.appspot.com/40007
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@430 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-11-20 18:24:41 +00:00
nealsid
2712a8c712 Forward exceptions in child processes to Apple's Crash Reporter
http://breakpad.appspot.com/38001/show
R=mmentovai, jeremy
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@429 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-11-18 13:59:01 +00:00
mmentovai
ebebd0fcef Always export catch_exception_raise.
Patch by Jeremy Moskovich <jeremy@chromium.org>

Code review URL: http://breakpad.appspot.com/37001


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@428 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-11-11 14:47:01 +00:00
nealsid
0e76d1fdf3 Fix when walking stack when no module list is present and the return address has to be
scanned.

http://breakpad.appspot.com/36002

R=doshimun
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@420 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-10-30 23:30:39 +00:00
jschuh@chromium.org
96c69639ee Fixed style error
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@419 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-10-19 18:53:26 +00:00
jschuh@chromium.org
5f4fa55598 Issue 35001: Fallback to Thread Context on bad Exception Context
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@418 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-10-19 18:10:49 +00:00
mmentovai
a3043159f3 Allow the Breakpad Mac framework to be built without -fexceptions.
Review URL: http://breakpad.appspot.com/34003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@417 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-10-15 22:42:54 +00:00
nealsid
cb33b20f75 Raise minidump processing limits
A=justin schuh
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@416 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-10-14 22:01:35 +00:00
jimblandy@gmail.com
e4be54eb3e Issue 32002: Breakpad DWARF parser: Update char decls to be signed
a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@410 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-10-08 17:15:33 +00:00
ted.mielczarek
8d70618ffc Let x86 stackwalker scan stack in cases where program evaluation fails. Original patch by Jeff Muizelaar <jmuizelaar@mozilla.com> with some changes by me. r=mento at http://breakpad.appspot.com/32003/show
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@409 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-10-08 14:21:50 +00:00
mmentovai
760d66430e 10.6 SDK compatibility fixes. No bug.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@407 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-10-06 18:16:36 +00:00
nealsid
c84c9e7bb3 Modification to crash_report to process a directory of .DMP files
http://breakpad.appspot.com/31001

R=nealsid
A=krisr



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@405 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-09-30 21:40:41 +00:00
ted.mielczarek
b73230385c Fix compilation of OS X handler on PPC with 10.5 SDK. r=nealsid at http://breakpad.appspot.com/30001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@404 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-09-30 12:01:15 +00:00
nealsid
895d3d17ee New uploader for Linux with unit tests, and gflags/glog libraries
http://breakpad.appspot.com/29004

A=nealsid
R=chris masone at chromium org



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@403 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-09-29 21:55:19 +00:00
mmentovai
4ee3ddcd33 Check RegisterWaitForSingleObject return in CrashGenerationServer::Start.
Patch by Matt Mueller <mattm@chromium.org>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@402 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-09-28 23:53:28 +00:00
nealsid
ce9178abaa A better makefile for building the Linux client.
http://breakpad.appspot.com/29003

A=nealsid
R=chris masone



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@400 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-09-18 20:43:35 +00:00
ted.mielczarek
b2bc3bcc84 Issue 328 - should have constant for VC++ exceptions, and stringify in MinidumpProcessor::GetCrashReason
r=nealsid at http://breakpad.appspot.com/25001/show



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@394 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-09-04 20:00:33 +00:00
jimblandy@gmail.com
c426b3d98a Breakpad: Don't use the deprecated __gnu_cxx::hash_map container.
Modern GNU compilers warn about the #inclusion of <ext/hash_map>; that
container is deprecated, and code should use <tr1/unordered_map>
instead.  However, to stay within the boundaries of C++ '98, it's
probably fine just to use plain old std::map.

Breakpad uses hash_map in three cases:

o The DWARF reader's SectionMap type maps object file section names to
  data.  This map is consulted once per section kind per DWARF
  compilation unit; it is not performance-critical.

o The Mac dump_syms tool uses it to map machine architectures to
  section maps in Universal binaries.  It's hard to imagine there
  ever being more than two entries in such a map.

o The processor's BasicSourceLineResolver uses a hash_map to map file
  numbers to file names.  This is the map that will probably have the
  most entries, but it's only accessed once per frame, after we've
  found the frame's line entry.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@393 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-09-03 18:27:16 +00:00
stuartmorgan
ddd71b75f7 Fix text field resizing for 10.5+ SDK
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@392 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-28 22:08:34 +00:00
mmentovai
ebe77d7e3b Provide a real std::string hash, not just a forward declaration for something
that doesn't exist.

TBR=nealsid

Code review URL: http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/292f9ed79dfdbdde


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@391 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-20 19:29:41 +00:00
nealsid
b0baafc4da Merge of Breakpad Chrome Linux fork
A=agl, Lei Zhang
R=nealsid, agl



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@384 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-17 23:12:53 +00:00
mmentovai
7c48629d49 Fix build errors with gcc 4.4. Patch by Silvius Rus <rus@google.com>.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@383 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-14 18:46:43 +00:00
jimblandy@gmail.com
d4a212a099 Linux dumper: fix comments in src/common/linux/module.h
Fix some typos and references to member functions that didn't make the
final cut.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@381 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-07 22:11:32 +00:00
jimblandy@gmail.com
eab03fdb72 Linux dumper: Move the data structures representing the breakpad data into their own class.
src/linux/common/module.h defines a new class, google_breakpad::Module,
that can represent the contents of a breakpad symbol file.  Module::Write
writes a well-formed symbol file to the given stream.

src/linux/common/dump_symbols.cc can now lose its symbol-file-writing
code, and change DumpStabsHandler to populate a Module object, rather
than the old SymbolInfo/SourceFileInfo/... collection of types.

The code to compute function and line sizes, even in the absence of
reliable size data in STABS, is moved into a new Finalize method of
DumpStabsHandler, which is responsible for completing the Module's
contents.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@380 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-07 19:28:45 +00:00
jimblandy@gmail.com
f7cc9ef6f5 Add files left behind by previous commit.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@379 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-07 19:26:55 +00:00
jimblandy@gmail.com
54bc5cfa2d Linux dumper: Move STABS parsing into its own class.
With this patch, dump_symbols.cc no longer knows about the details of
the STABS debugging format; that is handled by the StabsReader class.
dump_symbols.cc provides a subclass of StabsHandler that builds
dump_symbols' own representation of the data.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@378 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-07 19:24:32 +00:00
jimblandy@gmail.com
68c8481df6 Linux dumper: Make the 'name' field of FuncInfo a std::string instead of a char *.
Because the actual N_FUN strings in the .stabstr section contain type
information after the mangled name, representing this information
using a pointer into .stabstr, while efficient with memory, makes the
FuncInfo data structure STABS-specific: one must know the details of a
STABS N_FUN string's syntax to interpret FuncInfo::name.  This patch
removes this STABS dependency from the data structure, and moves us
closer to having an appropriate structure for representing unified
STABS and DWARF data.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@375 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-05 00:57:48 +00:00
jimblandy@gmail.com
3c4de8e8a7 Linux dumper: Properly separate function names from STABS type data.
STABS strings for N_FUN entries contain a mangled function name,
followed by a colon, followed by type information.  The type
information itself may contain colons; mangled names never contain
colons (they need to be legal assembly-language identifiers).  So the
current code in src/common/linux/dump_symbols.cc:WriteOneFunction that
attempts to separate the mangled name from the STABS junk will
incorrectly include STABS junk in the name, causing demangling to
fail.

Applying the patch below results in changes like these in the symbol
file produced, where an unmangled name followed by STABS junk becomes
a properly demangled name:

## --- base/libxul.so.syms	2009-07-13 21:46:33.000000000 -0700
## +++ tip/libxul.so.syms	2009-07-13 21:51:04.000000000 -0700
## @@ -3907,7 +3907,7 @@
##  FILE 3905 /home/jimb/mc/in/gfx/cairo/libpixman/src/pixman-region.c
##  FILE 3906 combine.inc
##  FILE 3907 /home/jimb/mc/in/gfx/cairo/libpixman/src/pixman-edge-imp.h
## -FUNC 19898c 54 0 _Z20NS_GetCaseConversionv:F(0,1201)=*(0,1202)=xsnsICaseConvers
## ion
## +FUNC 19898c 54 0 NS_GetCaseConversion()
##  19898c 12 54 1
##  19899e 9 56 1
##  1989a7 6 60 1
## @@ -214776,7 +214776,7 @@
##  3847c9 9 57 506
##  3847d2 13 58 506
##  3847e5 7 59 506
## -FUNC 387e89 27 0 _ZN20nsGenericHTMLElement11FromContentEP10nsIContent:F(0,8117)
## =*(0,8118)=xsnsGenericHTMLElement
## +FUNC 387e89 27 0 nsGenericHTMLElement::FromContent(nsIContent*)
##  387e89 7 80 2584
##  387e90 3 80 2584
##  387e93 e 82 2584
## @@ -250473,7 +250473,7 @@
##  3d0d88 7 82 548
##  3d0d8f 25 84 548
##  3d0db4 5 85 548
## -FUNC 3d0e0c 40 0 _ZL21GetEnclosingListFrameP8nsIFrame:f(0,7182)=*(0,7183)=xsnsL
## istControlFrame
## +FUNC 3d0e0c 40 0 GetEnclosingListFrame(nsIFrame*)
##  3d0e0c 5 146 549
##  3d0e11 3 722 2645
##  3d0e14 d 146 549

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@374 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-05 00:56:29 +00:00
jimblandy@gmail.com
15117f9ae0 Linux dumper: Don't switch to wrong source file when starting new function.
In STABS, if one function's line number information contains an N_SOL
entry to switch to a new source file, then the next function's line
data should pick up in the same source file where the prior function
left off.  However, the Linux dumper restarts each function in the
compilation unit's main source file.  This patch fixes that, so that
the output attributes the lines in subsequent functions to the correct
source files.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@373 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-05 00:54:47 +00:00
jimblandy@gmail.com
f6c98159e2 Linux dumper: Delete non-functional stack parameter size computation.
Delete code to compute function stack parameter size.  It never did anything.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@372 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-05 00:53:23 +00:00
jimblandy@gmail.com
133c66ca40 Linux dumper: Let LineInfo structures point directly to their SourceLineInfo structures
Let LineInfo structures point directly to their SourceLineInfo
structures, rather than holding the index of the file's name in the
.stabstr section in the early phases, and then later the holding
source_id of the file.

This is another step in the process of moving STABS-specific values
out of the types that represent the breakpad symbol data.  When we're
done, the non-STABS structures will be something that we can populate
with both STABS and DWARF data --- or at least it will be more easily
replaced with such.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@371 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-08-05 00:51:15 +00:00
nealsid
f3f7df33de Fix an INVALIDATE_ITERATOR defect reported by Coverity.
std::vector::erase() invalidates the iterator, so we need
to advance the iterator by using the return value of erase().

R=nealsid
A=wtc



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@370 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-30 22:53:09 +00:00
jimblandy@gmail.com
0d23e8c686 Linux dumper: Don't record file boundary addresses as null-name SourceFileInfoList entries.
STABS information introduces a compilation unit with an N_SO entry
whose address is the start address of the file and whose string is the
name of the compilation unit's main source file.  However, STABS
entries can only hold one address, so STABS indicates the compilation
unit's ending address with an N_SO entry whose name is empty.

Currently, the dumper's data structures simply create SourceFileInfo
structures with empty names for these end-of-unit N_SO entries.  We
want to remove STABS-specific characteristics from these structures so
that we can replace them with an input-format-independent structure.

This moves end-of-compilation-unit addresses out of the symbol table
structure, and into their own list of boundary addresses.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@369 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-30 17:54:40 +00:00
jimblandy@gmail.com
e0a2512369 Linux dumper: Use pointers to SourceFileInfo structures.
Use a list of pointers to SourceFileInfo structures, not a list of the
structures themselves.  This is preparation for a subsequent patch
which makes the data structures less STABS-specific.

This patch introduces a memory leak.  If an included file is
referenced only by line entries for functions that LoadFuncSymbols
elected to omit from the func_info list, then its SourceFileInfo
structure is leaked when we destroy the name_to_file map.  This leak
is fixed in a subsequent patch by letting the map of files by name own
the file objects.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@368 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-30 17:39:42 +00:00
jimblandy@gmail.com
4a6e708ed6 Linux dumper: Use a sorted array of addresses in computing function and line sizes.
Replace the sorted lists of files and functions with an array of
boundary addresses.  This replaces CompareAddress with the default
comparison, and SortByAddress and NextAddress with the stock STL sort
and upper_bound algorithms, losing ~50 lines of code.

a=jimblandy
r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@367 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-30 17:36:23 +00:00
nealsid
7a5e320f84 Add tool dependencies to the 'Build All' target of Breakpad, so that everything can be built at once!
R=stuart.morgan
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@366 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-28 21:13:13 +00:00
jimblandy@gmail.com
0eb3c6e5e2 Linux dumper: Correctly find boundary address when computing line and function sizes.
In NextAddress, check both the file list and the function list for the
nearest boundary.  Don't assume that, if we find any bounding entry in
the function list, that must be the nearest thing.

A=jimblandy
R=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@365 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-27 21:33:25 +00:00
jimblandy@gmail.com
1147cc4920 The has_sol field of struct FuncInfo is unused. This patch removes it.
A=jimblandy
R=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@364 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-27 21:32:31 +00:00
jimblandy@gmail.com
53cb8044fd The 'no_next_addr_count' variable in ComputeSizeAndRVA shouldn't be static.
The current arrangement would produce needless warnings if
WriteSymbolFile were ever used twice in the same program invocation.
Even if it weren't wrong, it's unnecessary, and local non-const static
variables require extra care when reading to be sure of their effect.

A=jimblandy
R=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@363 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-27 21:30:56 +00:00
jimblandy@gmail.com
722afebee0 Use a std::map instead of a linear search to look up files for line records.
With this patch, the time required to generate Breakpad symbols for
Firefox's libxul.so on a MacBook Pro 3,1 drops from 32s to 2s.

I verified that this patch had no effect on the output of dump_syms
when applied to firefox-bin and its libraries when built with -gstabs+.

A=jimblandy
R=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@362 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-27 21:30:02 +00:00
jimblandy@gmail.com
515f92cd61 Remove warnings about uninitialized fields.
A=jimblandy
R=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@361 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-27 21:28:57 +00:00
nealsid
22734848ea Port fixes from internal Google Breakpad to SVN.
A=preston, nealsid
R=Stuart, Preston



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@360 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-21 00:10:57 +00:00
nealsid
23c364a2b4 Fix for http://breakpad.appspot.com/18009 - run dump_syms on both PPC & i386 machines correctly, and process STABS/DWARF information in the same binary
R=stuart morgan
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@359 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-17 20:32:08 +00:00
nealsid
f4f249e544 Integration test for Windows exception handler/minidump generation.
R=hannah tang
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@358 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-17 01:15:48 +00:00
nealsid
6e525cbfbb Add stack-dumping logic to crash_report with -t switch
R=jeremy
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@357 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-07-02 00:30:44 +00:00
nealsid
90a6505b03 The symbol files necessary for the processor to walk stacks on Linux that have __kernel_vsyscall at innermost frame. Special symbol files ar eneeded because EBP does not point to the frame when a thread is inside a system call.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@353 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-06-25 21:36:39 +00:00
nealsid
ae4d8370ee Fix for crashs generation test app to not deadlock
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@352 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-06-22 21:45:31 +00:00
nealsid
1d8cba25c7 Fix build break in crash_report caused by my checkin that moved minidump processing error codes to a different namespace
R=preston
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@351 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-06-16 22:31:51 +00:00
ted.mielczarek
61e88c7ad7 issue 323 - OS X exception handler / minidump generator should set exception address correctly for EXC_BAD_ACCESS . r=nealsid at http://breakpad.appspot.com/15002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@350 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-06-12 20:36:53 +00:00
nealsid
c52715f32f Fix for generating dumps on-demand to set the requesting thread to the current thread
R=stuartmorgan
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@349 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-06-12 18:16:09 +00:00
nealsid
dae47f0d16 Support overriding makefile variables, changed defaults compilation flags. This patch from Jim Blandy was Merged with a previous change from nealsid to force 32-bit compilation even on 64-bit machines.
A=jim blandy
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@348 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-06-05 23:06:54 +00:00
nealsid
0eb52ff8cc Use ctsdio streams for dump_syms for significant speedup. Also contains a makefile fix to build in 32-bit mode, even on 64-bit systems.
A=jim blandy
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@347 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-06-05 22:40:28 +00:00
nealsid
2eb356a68d Support custom URL parameters. Added unit tests for Breakpad. Added
a way to specify server parameters in app plist file, as well.

R=stuartmorgan, jeremy
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@346 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-06-03 21:51:33 +00:00
nealsid
1a997295b6 Removed logging init macro from minidump_processor_unittest, since with the Google Test integration, logging is handled through it's facilities
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@345 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-05-29 20:49:04 +00:00
nealsid
b56cfa067a Add more error information to minidump processing return code. Also added dependency on google test, and modified minidump processing unit tests to use google test
R=brdevmn
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@343 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-05-29 00:53:02 +00:00
ted.mielczarek
aaecb48b3b Fix minidump_stackwalk compilation on gcc 4.3. Patch by Jim Blandy
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@342 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-05-28 17:50:33 +00:00
stuartmorgan
2a78191cab Show the reporter UI for Breakpad.framework regardless of whether continuing the crashed process succeeded (issue 319)
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@341 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-05-28 16:26:30 +00:00
nealsid
2a4698319a Fix up warnings when building http_upload.cc. Changed warning level to /W4, and also turned off deprecated 64-bit compatability warning flag(since some people are regularly building Breakpad in 64-bit mode, if we turn off this flag we get rid of a warning in 32 bit mode under VS2008)
R=mmentovai
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@340 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-05-27 16:54:23 +00:00
nealsid
bec07f6972 Patch from Jeremy to have better error reporting, and workaround a Cocoa bug in different locales
R=nealsid
A=jeremy


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@339 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-05-15 17:54:20 +00:00
nealsid
fc26f4a9b5 Fix memory leak in test case when calling into basic source line resolver.
R=brdevmn
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@338 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-05-14 21:31:03 +00:00
nealsid
dad1acc2d0 Deleting obsolete file(when I added DWARF support I had to make this a .MM but I forgot to delete the old file)
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@337 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-05-12 17:19:59 +00:00
stuartmorgan
f9c5540ea6 Add a missing include (for gettimeofday) to Inspector.mm
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@336 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-30 01:11:36 +00:00
stuartmorgan
33e8fad61d Mac reporter improvements:
- Made localization for UI entirely string-based, with flexible layout based on the size of the strings inserted.
- Made the request for an email address optional.
- Fixed a bug that would prevent comments or email from being collected if the text field were still focused.
- Refactored askUserPermissionToSend.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@335 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-29 13:50:53 +00:00
stuart.morgan
73afbc7302 Mac framework fixes: Propagate server type from plist, and fix precedence of defaults vs. plist
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@334 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-29 13:27:16 +00:00
nealsid
ed1f6e754a Code review issue 9002: Add paranoid logging to Inspector & Reporter
A=jeremy moskovich
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@333 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-23 07:56:16 +00:00
stuartmorgan
e438d9cc0b Add a parameter to control the Mac reporter timeout.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@332 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-22 13:22:08 +00:00
nealsid
1cb4ad73a6 Fix to support extensible parameter handling, and add process crashtime/uptime support
R=stuart morgan
A=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@331 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-22 06:25:21 +00:00
stuartmorgan
04a7df7acf Give the Mac reporter app a localized name of 'Crash Reporter'
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@330 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-22 03:10:03 +00:00
nealsid
ad6543e4e7 Fix memory leak when using the basic source line resolver, plus the optimization to load using in-memory buffers. Moved from manually allocating/deallocating memory to using a scoped_array
A=nealsid
R=tiger feng



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@329 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-22 00:55:31 +00:00
nealsid
a0a0de39a8 Patch from Jeremy Moskovich to build with 10.5 SDK correctly. Also removed externals directory.
A=jeremy
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@328 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-21 08:29:46 +00:00
doshimun
ea78675fbd AppVerifier leak test fix for Windows 7.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@327 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-08 18:58:12 +00:00
stuart.morgan
841f5f7390 Sender tweaks; strip whitespace from server-returned ID, and change the title of the dialog a bit.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@326 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-07 16:31:27 +00:00
stuart.morgan
9290b7062f Fix framework bundle ID and remove useless autogenerated InfoPlist.strings
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@325 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-06 20:17:09 +00:00
nealsid
77d851c356 Fix my build break due to misnamed constant
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@324 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-06 00:57:06 +00:00
nealsid
a3d4c97336 Incorporate feedback from first Breakpad integration.
This upload fixes five issues:

1) Preston's email was hardcoded in the xib :-(
2) Changed from xib to NIB to facilitate Tiger building
3) Changed the logs location to be user specifiable by BreakpadMinidumpLocation
key, or ~/Library/Breakpad/<BREAKPAD_PRODUCT> by default
4) Fixed GTM Defines problem in order to build on Tiger
5) Also set CFBundleIcon in the sender program correctly, and updated plist, and
renamed ReporterIcons to crash_report_sendER.ICNS.  However the rietveld upload
script doesn't appear to pick up renamed files correctly, so that file doesn't
show up in the patch upload.

Also various comments were updated for accuracy.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@323 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-06 00:25:29 +00:00
nealsid
3ebdb1bd7a Open sourcing the Breakpad framework from Google.
A=many, many people
R=nealsid, jeremy moskovich(from Chromium project)



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@322 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-04-01 03:18:49 +00:00
ted.mielczarek
0abe34ce5d issue 305 - breakpad Linux handler doesn't build with compiler built from latest GCC sources. Trivial patch by Jim Blandy
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@321 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-03-24 19:57:46 +00:00
nealsid
3366749ee7 Fix for issue 304: symupload needs to support timeout specifications(wininet can timeout when sending large symbol files).
R=doshimun
W=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@319 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-03-20 19:02:12 +00:00
nealsid
2ad976ef0b Fix for issues 296, 297. Various symbol supplier classes need to be updated with new overload('make check' was failing, as well as crash_report), and remove logging that was flooding output
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@318 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-02-27 23:59:40 +00:00
nealsid
02c244f1b2 Fix for issue 242, plus a redo of how old exception handlers are tracked, and called.
R=Craig.Schlenter, luly81



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@315 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-02-26 21:31:53 +00:00
nealsid
4af5fe0b59 Fix build breaks on Solaris using Sun Studio.
Written by Ginn Chen & Eagle.Lu@
R=nealsid (although I don't have a Solaris machine to build on, & these changes look localized to Sun-only builds)



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@314 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-02-23 09:28:29 +00:00
nealsid
e1a7efca7d See https://bugzilla.mozilla.org/show_bug.cgi?id=397200
The method of calculating a binary ID using the LC_ID command isn't compatible with non-default build processes, most Mac consumers
use LC_UUID anyway but for those that don't, MD5 is a better choice
R=nealsid
W=Ted.Mielczarek



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@313 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-02-22 08:16:05 +00:00
nealsid
cadc8ddde9 Issue 294: mmap error checking is not correct.
R=Liu



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@312 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-02-22 01:31:43 +00:00
nealsid
0fd2f1ae21 Modify symbol supplier interface to support an overload that takes a symbol data buffer, to get around an extraneous read/write of symbol data
R=doshimun



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@311 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-02-19 21:26:20 +00:00
nealsid
a285652cba Issue 275: patch to include list of loaded modules in crash_report output
Written by: jum@mac.com
R=nealsid



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@310 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-02-10 21:29:54 +00:00
doshimun
c9944d96e8 Reinstnate the call to TerminateThread inside ExceptionHandler destructor and put
the graceful code inside a #ifdef.

The problem is:
If ExceptionHandler is created and destroyed in DllMain, then the previous change to
remove the call to TerminateThread will lead to a deadlock. This is because inside
DllMain the loader lock is acquired, and the previous change waits for the handler
thread to exit in the destructor, that is with the loader lock acquired. But the
handler thread cannot finish until it gets the loader lock to call DllMain for
THREAD_DETACH.

With this change, we add conditional compilation so that clients that want to
avoid the call to terminate thread can do it by defining the appropriate preprocessor
variable.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@309 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-01-20 20:45:28 +00:00
doshimun
104e4e0114 Fix an AppVerifier STOP in OOP server code. In the destructor of
the OOP server, we need to wait for any pending I/O to be done.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@308 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-01-16 22:37:48 +00:00
doshimun
308947d1ce Fix some typos in comments.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@307 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-01-14 21:54:08 +00:00
doshimun
a6f58a1ac8 Minor fixes to windows exception handler.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@306 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-01-14 20:51:51 +00:00
nealsid
8b6271ce2c New test data to reflect Ted's changes that add function parameters to symbols when using DWARF
R=ted.mielczarek



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@305 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-12-19 22:28:45 +00:00
ted.mielczarek
3751b05354 Issue 283 - DWARF dumper doesn't handle DW_AT_specification. r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@303 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-12-08 13:12:45 +00:00
ted.mielczarek
d3441c2c96 Issue 284 - DWARF dumper doesn't output function names including arguments. r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@302 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-12-08 13:00:29 +00:00
ted.mielczarek
7837cb7236 issue 286 - clean up some demangling code in dump_syms.mm. r=chris rogers
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@301 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-12-03 18:23:09 +00:00
mmentovai
e5c401467b ExceptionHandler class is not handling initialization errors, such as the
handler thread not being created.  Protect the exception handler against
failure to create semaphores and a thread handle.

Patch by Marc-André (MAD) Decoste, r=me

http://code.google.com/p/google-breakpad/issues/detail?id=285
http://codereview.chromium.org/13065


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@300 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-12-03 17:21:34 +00:00
ted.mielczarek
af553e22cb follow up for issue 281 - dump_syms fails to find dylib symbol file inside of a bundle. handle files without an extension properly
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@299 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-12-01 18:42:16 +00:00
ted.mielczarek
7b8eb04745 issue 281 - dump_syms fails to find dylib symbol file inside of a bundle. r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@298 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-12-01 17:05:43 +00:00
ted.mielczarek
5f27d9125c Followup to address some review comments from Issue 259
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@297 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-11-25 13:41:41 +00:00