Commit Graph

589 Commits

Author SHA1 Message Date
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
ted.mielczarek
324d84c2f6 Issue 259 - crash when generating large .sym files with dump_syms on Linux. Patch by login_ing@yahoo.com, r=Liu Li
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@296 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-11-24 20:47:37 +00:00
nealsid
e055207058 Added some sanity checks when iterating over threads in a crashed process. In same cases the ESP could be 0. In other cases it would be borked completely(i.e. pointing to an invalid range).
R=Jeremy Moskovich



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@295 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-11-19 19:07:34 +00:00
nealsid
c85fb043ed Fix for dump_syms to ignore line number information for addresses that don't have an enclosing function
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@293 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-11-03 23:23:50 +00:00
nealsid
3a283d8f8b Undo suspend/resume feature since it was meant as a workaround to a bug in how we handled child process exceptions. Currently we don't return to the kernel when we take an exception from a child process, causing a hang. Now we return KERN_FAILURE, indicating to the kernel to move on to the host-level exception handler(usually Crash Reporter)
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@292 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-10-27 04:52:16 +00:00
nealsid
32441cc060 Issue 181: Add version info for Mac OS X modules. Found by iterating over load commands until I found LC_ID_DYLIB. Also modified crash_report to generate version number. Also added suspend/resume capability to exception handler, necessary because exception handling can behave strangely across fork() calls. Also added fix for filtering out functions with no line number information, and for filtering out some multiple inheritance glue the compiler generates.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@291 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-10-22 05:08:50 +00:00
ted.mielczarek
c5f46b2f4b Issue 276 - generate GUIDs ahead of time in Linux handler. r=Liu Li
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@290 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-10-14 11:21:34 +00:00
nealsid
1de70760db Fix for DWARF processing when inline functions were encountered. Inline functions were part of the debugging information as sequential in the PC range of the function but the source file was where the function was written(as you might expect). However the old dump_syms code, once it switched files as it was iterating over a range of addresses, never switched back, causing inline functions to cause all file numbers for addresses after the PC of the inline function to be wrong
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@289 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-10-14 01:24:02 +00:00
nealsid
bb067bf185 Fix warning when converting int to bool
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@288 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-10-10 17:51:32 +00:00
ted.mielczarek
596e476fc2 fix a typo in the makefile, HANDLER_SRC->HANDLER_OBJ
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@287 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-10-10 15:48:06 +00:00
nealsid
cb4aa6b804 Added DWARF support to Breakpad client. Thanks to Google for open sourcing their DWARF code!
Modified dump_syms to detect dSYM bundles or a binary with DWARF data appropriately, and convert data from DWARF reader to dump_syms native structures

R=danny.berlin (original writer of DWARF code)



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@286 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-10-08 23:56:02 +00:00
mmentovai
a509f4ec4b Generate Windows full memory dumps as a separate file. Patch by Huan Ren
<huanr@google.com>.  r=me


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@285 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-09-16 18:50:02 +00:00
mmentovai
9fcf4db315 Include what you use: include <algorithm> and <string.h> as needed. Patch by
Robert Henry.  r=me


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@284 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-09-15 18:16:49 +00:00
doshimun
11dc028694 Log a failure message in case of LOCATE_NOT_FOUND error.
Without this change, no error is logged in this case.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@283 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-07-30 19:39:48 +00:00
nealsid
85534c2eaf Now we provide our own implementation of the MIG function exc_server, as recommended by Apple.
See 
http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/8b363b1f8a404714
For more information



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@282 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-07-11 17:39:52 +00:00
doshimun
2d7664e8d4 In the destructor of ClientInfo, currently the wait on the clent_crashed_event is
unregistered after the handle is closed. MSDN clearly says that the behavior is
undefined in this case. See http://msdn.microsoft.com/en-us/library/ms685061(VS.85).aspx
 
This change contains the fix for that bug. See attched diff.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@281 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-06-09 23:38:24 +00:00
doshimun
3a516e4177 Client process uptime is a very useful metric for crashes. Instead of each client process having to keep track of uptime and report it whenever a crash happens, integrate this feature into breakpad OOP code so that all clients get it for free.
I tested this using the test app I have to test OOP stuff.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@280 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-06-06 21:41:32 +00:00
nealsid
38bc56cfa8 Modified symupload to correctly handle spaces in module names when processing symbol file
Reviewer=mmentovai



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@279 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-06-05 21:20:53 +00:00
doshimun
cc6cd1ff37 Fix the following bug:
The sender updates the checkpoint file even when the report is not
successfully sent.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@278 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-06-05 20:59:35 +00:00
nealsid
d55398a492 Filter out duplicates from the image list when creating a minidump. See issue 266 for more details.
Reviewer = mmentovai



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@277 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-06-04 22:57:09 +00:00
doshimun
f6b3e16ef8 Set the dump thread id and the requesting thread id properties of MDRawBreakpadInfo
only in case of in-process dump generation; otherwise the dump processing code of
breakpad doesn't identify the crashing thread properly.

I am checking this in to-be-reviewed since it is needed urgently in one of the
products at Google.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@276 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-31 19:23:20 +00:00
nealsid
b91bb881d5 Fix to ignore source files that have a text address of 0 in their stabs entry
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@275 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-19 17:27:40 +00:00
doshimun
72bafd378d Microsoft broke PROCESS_ALL_ACCESS when we build with WINVER=0x600. See http://nsylvain.blogspot.com/2008/01/winverwin32winnt-mayhem.html for
details (second half of the post).

Changing PROCESS_ALL_ACCESS to GENERIC_ALL in ClientInfo class when
opening the client process handle on the OOP server side.

A minor change to pipe name in the test app also.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@274 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-15 04:12:34 +00:00
mmentovai
808ff9bc70 64-bit processor can't handle 32-bit ppc minidumps due to struct padding
differences on 64- and 32-bit CPUs.  Force 32-bit alignment rules for
32-bit ppc context struct.  r=nealsid

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@273 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-14 18:24:23 +00:00
nealsid
d318f9efee Fix to stop unit tests from being compiled & run for non-native architectures
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@272 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-08 23:15:00 +00:00
doshimun
7ab126ecdd Replace the user of wcscpy_s with safe_wcscpy in common/windows/string_utils-inl.h to
make the code compatible for teams that still use VS 2003 to build.

Fix a bug in client ClientInfo class that returned CustomClientInfo struct containing
a pointer in the client process address space instead of pointer to in-process data
structure.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@271 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-08 18:15:07 +00:00
doshimun
8602aa71ec Some style guide compliance changes and changed the prototype of the method to get custom client info in ClientInfo class.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@270 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-07 21:54:12 +00:00
nealsid
c2bdaa613c Bug fix for issue 263: mach_vm_region_recurse calls have invalid parameter specified, which succeeds on Leopard but fails on Tiger
Reviewer: Chris Rogers(ladderbreaker)


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@269 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-07 21:15:12 +00:00
doshimun
3d4dc1f201 Add a convenience method to CustomClientInfo struct to set both name and value in one call.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@268 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-05 21:03:51 +00:00
doshimun
0ded3d718f Add a way for the client apps to specify custom information in case of out-of-process
scenarios that the OOP server can use in whatever way it wants to.

Fix a bug in CrashGenerationserver where CreateNamedPipe failure was not checked correctly.

TODO in near future: Add a custom stream to minidump files for the custom information.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@267 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-05 20:03:56 +00:00
nealsid
47df365bf8 Issue 261/262: 64-bit bug fix when iterating through load commands of a 64-bit binary, and added new test case for ReadImageInfoForTask
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@266 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-05-05 18:20:04 +00:00
nealsid
d6f0f92de3 Style changes
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@265 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-04-30 00:56:17 +00:00
nealsid
d906d0f7c9 Updated code to be compliant with style guidelines
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@264 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-04-29 23:49:39 +00:00
nealsid
4c39c138fe Issue 258: Added test cases for ReadTaskMemory, reorganized project file, renamed filenames inside comments
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@263 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-04-25 00:37:19 +00:00
doshimun
9033edcd7b Add one more parameter to the ClientDumpRequestCallback in crash generation server
to pass in the path of the dump file if the dump was generated successfully.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@262 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-04-17 21:21:48 +00:00
nealsid
9609db8173 Fix a bug in start address calculation
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@261 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-04-17 04:15:30 +00:00
nealsid
5da03791a7 As part of resolving issue 256 I'd like to check in some unit
tests(ok, just one) for the private copy of nlist that I checked in
last week, plus lay some of the ground work for collecting code
coverage numbers.  Both of these are accomplished by leveraging the
built-in facilities of Xcode & Developer Tools(namely, CPlusTest and
gcov integration; however, eventually I will also add a way to get
lcov results from the gcov results).  I also:

 - renamed breakpad_nlist_64.c to breakpad_nlist_64.cc to be more
consistent(even though it's not C++ code it still only gets called by
C++ code so I don't have to deal with extern "C" constructs).
 - I created a new target (minidump_tests) that has a "Coverage"
configuration with the appropriate GCC flags turned on.  It is only
compiled in 64-bit configurations and has 10.5 as a minimum
deployment target as well as uses the 10.5 SDK.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@260 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-04-15 23:09:30 +00:00
nealsid
b0d807666f Issue 254: The problem is that nlist() is compiled out of libc in
64-bit builds of Leopard.  I ported the code over myself and will
check it into the Breakpad tree until we decide there's a better
longer-term solution.  If you want to diff the changes, the Apple
source is in libc/gen/nlist.c(I used 498 from 10.5.2).



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@259 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-04-12 01:16:18 +00:00
doshimun
35c34d6bb9 Add a parameter to CrashGenerationServer to let the callers set the
security attributes on the pipe. This is useful when the process
hosting the crash server wants to let processes from other users to
connect to it and generate dumps for them.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@258 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-04-12 00:00:34 +00:00
doshimun
05ec557277 Some cosmetic/style changes to conform to style guidelines. This time
I waited for the style reviewer to approve all my code so hopefully there
should be no more style related check-ins.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@256 4c0a9323-5329-0410-9bdc-e9ce6186880e
2008-04-08 19:03:57 +00:00