Commit Graph

486 Commits

Author SHA1 Message Date
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
df55cf4313 Updated google mock external revision so we can use their own tuple implementation, so we can compile test cases under vs 2005
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@356 4c0a9323-5329-0410-9bdc-e9ce6186880e
2009-06-26 21:50:48 +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