| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.
Specifically, this patch makes the following changes:
1. Add an ElfCoreDump class for processing Linux core dump files, which will
later be used to implement the core dump to minidump conversion.
2. Add a CrashGenerator class for generating a crash with a core dump file
for testing the functionalities of ElfCoreDump.
3. Move some utility functions for reading/writing files to file_utils.h.
BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
Review URL: http://breakpad.appspot.com/337001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@900 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.
Specifically, this patch makes the following changes:
1. Add a SafeReadLink function that wraps sys_readlink() to resolve a
symbolic link but guarantees the result is NULL-terminated on success.
2. Refactor other source code to use SafeReadLink instead of readlink()
or sys_readlink().
BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
4. Run minidump-2-core to covnert a minidump file to a core file.
Review URL: http://breakpad.appspot.com/334001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@896 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.
Specifically, this patch makes the following changes:
1. Add a MemoryRange class for encapsulating and checking read access
to a contiguous range of memory.
2. Add a MemoryMappedFile class for mapping a file into memory for
read-only access.
3. Refactor other source code to use MemoryMappedFile.
BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
4. Run minidump-2-core to covnert a minidump file to a core file.
Review URL: http://breakpad.appspot.com/332001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@895 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
| |
1) Modify src/common/mac/macho_walker.cc to remove a signed vs unsigned comparison.
2) Replace mktemp in test using AutoTmpDir that has been moved from client/mac/tests to common/tests.
Review URL: http://breakpad.appspot.com/328001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@888 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
to generate the same hash. Add a test to make sure this doesn't happen again.
Review URL: http://breakpad.appspot.com/316002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@875 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
| |
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@866 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
| |
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@865 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
Review URL: http://breakpad.appspot.com/304001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@835 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
available
R=thestig at http://breakpad.appspot.com/185001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@830 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
| |
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@829 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
long time and removed in a recent curl release.
P=Evan Shaw <edsrzf@gmail.com> R=ted
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@814 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds synth_elf::{StringTable,SymbolTable,ELF} classes to
produce in-memory ELF files to properly test the Linux symbol dumping
code. It also uses those classes to add some basic tests for
the WriteSymbolFile function.
R=jimb at http://breakpad.appspot.com/277001/show
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@794 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
.dynsym for symbol names if there are no usable debug symbols.
R=jimb at http://breakpad.appspot.com/275001/show
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@793 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
| |
R=ted.mielczarek
BUG=413
Review URL: http://breakpad.appspot.com/236001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@739 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
| |
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@732 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
r=mwu at http://breakpad.appspot.com/212001/show
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@716 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
thread to the minidump on OS X.
R=nealsid at http://breakpad.appspot.com/200001/show
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@699 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
Review URL: http://breakpad.appspot.com/198001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@689 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
instead of using our own copy.
Review URL: http://breakpad.appspot.com/192001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@686 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
| |
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@682 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
| |
native.
BUG=399
TEST=none
Review URL: http://breakpad.appspot.com/178001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@677 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
| |
Patch by Markus Gutschke <markus@chromium.org>. R=thestig
Review URL: http://breakpad.appspot.com/150001
Review URL: http://breakpad.appspot.com/155001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@649 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
R=nealsid at http://breakpad.appspot.com/121002/show
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@640 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compute file ID
At present, the Linux symbol dumper maps the ELF file into memory to
examine the debugging information it contains, but then also calls
google_breakpad::FileID::ElfFileIdentifier, which maps the ELF file into
memory again. Some of our object files are large; Mozilla's libxul.so is
1.1GiB. Trying to map such files twice can interfere with tools like
valgrind that map themselves into high addresses (in an attempt to stay out
of the way of ordinary programs).
The FileID class has another method, ElfFileIdentifierFromMappedFile, that
operates on an already-loaded image of the file; use that instead.
a=jimblandy, r=thestig
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@625 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
debug ELF file.
Review URL: http://breakpad.appspot.com/126001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@624 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
Review URL: http://breakpad.appspot.com/125001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@621 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
Review URL: http://breakpad.appspot.com/120001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@620 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch avoids unnecessary use of the <cfoo> headers in files that don't
actually use the identifiers they declare in the std:: namespace.
It also changes some files to better conform with the "Names and Order of
Includes" rules in the Google C++ Style Guide.
A=jimb R=mark
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@619 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
I came across a bunch of comments Neal had made on issue 55011 that I
hadn't addressed. This patch takes care of them.
A=jimb R=thestig
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@618 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
Jacob <bjacob@mozilla.com>, r=me at https://bugzilla.mozilla.org/show_bug.cgi?id=569836
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@605 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
| |
library
A=Zhurun
R=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@604 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
outside functions.
This patch addresses two differences between Linux and Macintosh OS X STABS
data:
- StabsReader assumes that the STABS entries follow the conventions for
storing STABS data in object file sections (that is, .stabs and
.stabstr), rather than in the object files's linker symbol table. On Mac
OS X, STABS entries live in the Mach-O file's LC_SYMTAB load command,
along with all the other linker symbols; they are not grouped into units
by N_UNDF entries.
This patch adds a boolean argument to the StabsReader constructor
indicating whether the parser should treat N_UNDF entries as unit
boundaries; this argument should be true on Linux, and false on Mac. The
patch changes src/common/linux/dump_symbols.cc to pass this new argument.
- Mac OS X STABS place SLINE (line number) records immediately before the
FUN record for the function to which they belong, and the values of such
records are absolute, not relative to the function start.
This patch extends the parser to queue up such records and report them to
the handler when we do see the FUN record. The meaning of
StabsHandler::Line remains unchanged; existing handlers do not need to be
adjusted.
This patch also adds unit tests for the new parser behaviors.
a=jimblandy, r=mark
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@587 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the other classes which receive debugging data from some sort of parser
and use it to populate a Module have names ending in "ToModule":
DwarfCUToModule, DwarfCFIToModule. Also, DumpStabsHandler doesn't actually
dump anything.
This patch renames the DumpStabsHandler class to StabsToModule, which is
more consistent and descriptive.
a=jimblandy, r=thestig
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@584 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StabsReader simply applies a reinterpret_cast to treat the stab entry data
as an array of 'struct nlist' structures, making the parser specific on the
host endianness, word size, and alignment rules. On Mac OS X, a single fat
binary file may contain object files of different ABIs, of which the user
chooses one at run time.
This patch changes the parser to read the data using the google_breakpad::
ByteCursor class, which can handle different endiannesses and word sizes.
The StabsReader constructor now takes arguments indicating the endianness
of the data and the size of each entry's value field. The patch changes
src/common/linux/dump_symbols.cc to pass the new argument.
This patch changes the StabsReader unit tests to use the google_breakpad::
TestAssembler classes to generate test data, rather than reading it from a
file. This makes it easy to generate test data in various endiannesses and
word sizes. It also adds tests for the new parser behaviors.
a=jimblandy, r=thestig
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@583 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
clobbered, and also remove some extraneous semicolons from ARM portions of linux_syscall_support. r=jimb at https://bugzilla.mozilla.org/show_bug.cgi?id=555674
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@579 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment, the mappings from register numbers appearing in DWARF CFI
and .eh_frame exception handling sections to the appropriate
processor-specific names are in src/common/linux/dump_syms.cc. However, the
numberings are (for the most part) the same on all platforms using DWARF,
so there's no reason those tables shouldn't be shared between the Linux and
Mac symbol dumpers.
This patch moves the tables into a nested class of DwarfCFIToModule, so
they the Mac dumper can use them when it is changed to use
DwarfCFIToModule.
a=jimblandy, r=thestig
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@575 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
| |
CR URL: http://breakpad.appspot.com/100001/show
A=Zhurun
R=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@573 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
| |
The Linux symbol dumper's classes are reasonably portable, and should be
usable for the Mac dumper as well. Move them to src/common, along with
their unit tests. Update #include directives and Makefile.
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@567 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by default.
In the process of pairing up DWARF source lines with the functions they
belong to, the dumper detects and warns about regions of functions that
have no source line information, and vice versa. However, this seems to
occur in real code frequently enough (although not often) that the warnings
may obscure more serious problems.
This patch makes those warnings disabled by default in
DwarfCUToModule::WarningReporter. It does not add a way for the dump_syms
user to enable them.
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@566 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
Patch by Adam Langley <agl@chromium.org>.
R=me
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@565 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to dump call frame information held in .eh_frame sections, the
dumper needs to know the proper base address to use for pointers encoded
using the DW_EH_PE_textrel encoding. This should be the start of the .text
section. However, due to a cut-and-paste typo, the dumper was supplying the
base address of the ".got" section instead.
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@564 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
| |
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@562 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
| |
a=jimblandy, no reviewer
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@555 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows the Breakpad minidump processor to use data from
STACK CFI records to generate stack traces for the ARM processor.
In the symbol dumper, we need a table mapping DWARF CFI register
numbers to their names: STACK CFI records refer to registers by name.
In the processor, we expand StackwalkerARM::GetCallerFrame to see if
there are STACK CFI records covering the callee, and then use those to
recover the caller's register values.
There's no good reason the ARM walker couldn't use the SimpleCFIWalker
interface declared in cfi_frame_info.h. Unfortunately, that interface
assumes that one can map register names to member pointers of the raw
context type, while MDRawContextARM uses an array to hold the
registers' values: C++ pointer-to-member types can't refer to elements
of member arrays. So we have to write out SimpleCFIWalker::FindCallerRegisters
in StackwalkerARM::GetCallerFrame.
We define enum MDARMRegisterNumbers in minidump_cpu_arm.h, for
convenience in referring to certain ARM registers with dedicated
purposes, like the stack pointer and the PC.
We define validity flags in StackFrameARM for all the registers, since
CFI could theoretically recover any of them. In the same vein, we
expand minidump_stackwalk.cc to print the values of all valid
callee-saves registers in the context --- and use the proper names for
special-purpose registers.
We provide unit tests that give full code and branch coverage (with
minor exceptions). We add a testing interface to StackwalkerARM that
allows us to create context frames that lack some register values.
a=jimblandy, r=mmentovai
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@553 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend google_breakpad::CFISection with the ability to produce
.eh_frame data. Entry headers have a different format, and pointers
can be encoded in new and fascinating ways.
Extend dwarf2reader::CallFrameInfo to be able to parse either DWARF
CFI or .eh_frame data, as determined by an argument to the
constructor. Cope with variations in header formats, encoded pointers,
and additional data in 'z' augmentation data blocks. Extend the unit
tests appropriately.
Extend dump_syms to look for a .eh_frame section, and if it is
present, find the necessary base addresess and parse its contents.
There's no need for DwarfCFIToModule to check the version numbers; if
CallFrameInfo can parse it, DwarfCFIToModule should be able to handle
it. Adjust tests accordingly.
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@552 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a new DWARF parser class, dwarf2reader::CallFrameInfo.
Extend google_breakpad::Module to store and write out 'STACK CFI' records.
Define a new google_breakpad::DwarfCFIToModule class, to accept DWARF
CFI data from the parser and populate a Module with the equivalent
STACK CFI records.
Extend the Linux symbol dumping tool, dump_syms, to use
dwarf2reader::CallFrameInfo, google_breakpad::DwarfCFIToModule, and
google_breakpad::Module to extract DWARF CFI from the executable or
shared library files and write it to the Breakpad symbol file.
Define CFISection, a new class derived from TestAssembler::Section,
for use in creating DWARF CFI data for test cases.
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@550 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Programs compiled with -ffunction-sections -Wl,--gc-sections may have
SO entries for the start of the compilation unit whose addresses are
zero, even when the compilation unit contains non-omitted functions at
non-zero addresses. The breakpad dumper should not assume that the
compilation unit starting address is always non-zero.
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@542 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
| |
in an autoconf style build in Linux. The O2 build for the unit tests is still broken but I'm checking this in to unblock people
A=nealsid
R=ajwong, hannahtang, ted.mielczarek
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@541 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As explained in the code:
Given the right options, the GNU toolchain will omit unreferenced
functions from the final executable. Unfortunately, when it does so,
it does not remove the associated portions of the line number program;
instead, it lets the symbol references in the DW_LNE_set_address
instructions pointing to the now-deleted code resolve to zero. Given
this input, the DWARF line parser will call AddLine with a series of
lines starting at address zero.
Rather than collecting series of lines describing code that is not
there, we should drop them. Since the linker doesn't explicitly
distinguish references to dropped sections from genuine references to
zero, we must use a heuristic. We have chosen:
- If a line starts at address zero, omit it. (On the platforms
breakpad targets, it is extremely unlikely that there will be code
at address zero.)
- If a line starts immediately after an omitted line, omit it too.
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@538 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
| |
Some of the error messages that could be generated in the process of
parsing DWARF debugging information lack terminating newlines.
a=jimblandly, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@536 4c0a9323-5329-0410-9bdc-e9ce6186880e
|