| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables the DWARF reader to properly parse DW_AT_ranges attributes
in compilation units and functions. Code covered by a function is now
represented by a vector of ranges instead of a single contiguous range
and DW_AT_ranges entries are used to populate it. All the code and tests
that assumed functions to be contiguous entities has been updated to
reflect the change. DW_AT_ranges attributes found in compilation units
are parsed but no data is generated for them as it is not currently needed.
BUG=754
Change-Id: I310391b525aaba0dd329f1e3187486f2e0c6d442
Reviewed-on: https://chromium-review.googlesource.com/1124721
Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The lld linker has native support for creating packed relocation
sections, and as a result we can expect files with these sections to
have symbols.
Bug: chromium:742655
Change-Id: I48a50bff041146f51b3a8b730d7a778f832787f6
Reviewed-on: https://chromium-review.googlesource.com/754239
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
| |
This hides the need to provide mutable C strings, and unifies
existing basename calls and variations in a single location.
Change-Id: Idfb449c47b1421f1a751efc3d7404f15f8b369ca
Reviewed-on: https://chromium-review.googlesource.com/725731
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
memory.h shadows a system header which normally isn't a problem
because of the include paths in Breakpad, but the Firefox build
system winds up with src/common in the include path so we've had
a workaround for this for years. Renaming the file lets us get
rid of that workaround and shouldn't hurt anything.
Change-Id: I3b7c4239dc77f3b2b7cf2b572a0cad88cd7e8522
Reviewed-on: https://chromium-review.googlesource.com/723261
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This removes unused typedef left in change:
https://chromium-review.googlesource.com/c/447697/
and fixes error:
dump_symbols.cc:613:35: error: unused typedef 'Word' [-Werror,-Wunused-local-typedef]
Change-Id: Ib5a82cd8af9a58ebf173b0f338fa9ad341819ef3
Reviewed-on: https://chromium-review.googlesource.com/459518
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
|
|
|
|
|
|
|
| |
section types
Change-Id: I0862d930d92687dee47daa8d4dc3a21524c1c893
Reviewed-on: https://chromium-review.googlesource.com/447697
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'd like to have the Build ID available for our symbol server
uploading, and this will make it easy.
Most of this change is me rewriting dump_symbols_unittest to be
typed tests so I could add a new test there.
R=mark@chromium.org
BUG=
Review URL: https://codereview.chromium.org/2052263002 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This added debug fission support.
It tries to find the dwp file from the debug dir /usr/lib/debug/*/debug
and read symbols from them.
Most of this patch comes from
https://critique.corp.google.com/#review/52048295
and some fixes after that.
The elf_reader.cc comes from TOT google code. I just
removed some google dependency.
Current problems from this patch
1: Some type mismatch: from uint8_t * to char *.
2: Some hack to find the .dwp file. (replace .debug with .dwp)
BUG=chromium:604440
R=dehao@google.com, ivanpe@chromium.org
Review URL: https://codereview.chromium.org/1884283002 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is often helpful to check if a particular symbol file dumped by
dump_syms actually matches a version of a binary file we have. The
symbol output contains an ID which can be used to see if it matches
the binary file. Unfortunately, this ID is internally calculated
and not a standard hash of the binary file. Being able to output the
header information only will allow users to determine whether their
symbol file is up to date or not.
R=jochen@chromium.org
BUG=561447
Review URL: https://codereview.chromium.org/1864823002 .
Patch from David Yen <dyen@chromium.org>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This preserves full build ids in minidumps, which are useful for
tracking down the right version of system libraries from Linux
distributions.
The default build id produced by GNU binutils' ld is a 160-bit SHA-1
hash of some parts of the binary, which is exactly 20 bytes:
https://sourceware.org/binutils/docs-2.26/ld/Options.html#index-g_t_002d_002dbuild_002did-292
The bulk of the changes here are to change the signatures of the
FileID methods to use a wasteful_vector instead of raw pointers, since
build ids can be of arbitrary length.
The previous change that added support for this in the processor code
preserved the return value of `Minidump::debug_identifier()` as the
current `GUID+age` treatment for backwards-compatibility, and exposed
the full build id from `Minidump::code_identifier()`, which was
previously stubbed out for Linux dumps. This change keeps the debug ID
in the `dump_syms` output the same to match.
R=mark@chromium.org, thestig@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1688743002 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the symbols in the stack trace are not found in the .dynsym
section but were located in the full symbol table .symtab section
instead. This was causing some of our stack traces to be incomplete or
point to incorrect function names.
Since we only output function names, there are actually not that many
more symbols located in .symtab that aren't in .dynsym. It is better to
simply output all symbols found so our stack traces are complete.
R=mark@chromium.org, thestig@chromium.org
BUG=561447
Review URL: https://codereview.chromium.org/1824063002 .
Patch from David Yen <dyen@chromium.org>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newer gcc versions default to -Werror=narrowing when using newer C++
standards (which we do). This causes issues when we try to stuff a
value like 0xea into a char -- the value is out of range for signed
char bytes. That's when gcc throws an error:
.../bytereader_unittest.cc: In member function 'virtual void Reader_DW_EH_PE_absptr4_Test::TestBody()':
.../bytereader_unittest.cc:400:55: error: narrowing conversion of '234' from 'int' to 'char' inside { } [-Wnarrowing]
BUG=chromium:579384
TEST=`make check` passes
R=mark@chromium.org
Review URL: https://codereview.chromium.org/1605153004 .
|
|
|
|
|
|
|
|
|
| |
A=thakis@chromium.org
Original Review: https://codereview.chromium.org/1550933002/
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/1554613002 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shared libraries containing Android packed relocations have a load
bias that differs from the start address in /proc/$$/maps. Current
breakpad assumes that the load bias and mapping start address are
the same.
Fixed by changing the client to detect the presence of Android packed
relocations in the address space of a loaded library, and adjusting the
stored mapping start address of any that are packed so that it contains
the linker's load bias.
For this to work properly, it is important that the non-packed library
is symbolized for breakpad. Either packed or non-packed libraries may
be run on the device; the client detects which has been loaded by the
linker.
BUG=499747
R=primiano@chromium.org, rmcilroy@chromium.org
Review URL: https://codereview.chromium.org/1189823002.
Patch from Simon Baldwin <simonb@chromium.org>.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1459 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
| |
- Handle the case when the debug link points back to the object file.
- Move some checks into a separate SanitizeDebugFile() function.
BUG=636
Review URL: https://breakpad.appspot.com/3784002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1426 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
| |
As thestig@chromium.org pointed out in https://breakpad.appspot.com/9684002,
LoadSymbols() should return false if |read_gnu_debug_link| is false.
BUG=chromium:453498
R=thestig@chromium.org
Review URL: https://breakpad.appspot.com/2844002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1422 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
A=Wander Lairson Costa <wcosta@mozilla.com>. R=ted at https://breakpad.appspot.com/9684002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1400 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds Arm64 support to dumpsyms, enabling support for EM_AARCH64 elf type and
arm64 registers in DwarfCFIToModule.
BUG=367367,335641,354405
R=mark@chromium.org
Review URL: https://breakpad.appspot.com/1654002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1322 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
R=mark@chromium.org
Review URL: https://breakpad.appspot.com/1644002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1320 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mips linux support has been added previously in r1212. Some additional changes
are required to make breakpad functional on Android.
BUG=none
TEST=build, unittests, chrome test application
Review URL: https://breakpad.appspot.com/632002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1215 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support for mips cpu is added to all breakapad targets including unittests.
BUG=none
TEST=unittests
Review URL: https://breakpad.appspot.com/614002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1212 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NaCl executables have ELF program headers that look like this (for the
original NaCl x86 GCC toolchain):
Program Header:
LOAD off 0x00010000 vaddr 0x00020000 paddr 0x00020000 align 2**16
filesz 0x00017ce0 memsz 0x00017ce0 flags r-x
LOAD off 0x00030000 vaddr 0x10020000 paddr 0x10020000 align 2**16
filesz 0x00001c98 memsz 0x00001c98 flags r--
LOAD off 0x00040000 vaddr 0x10030000 paddr 0x10030000 align 2**16
filesz 0x000025ec memsz 0x00002b88 flags rw-
or this (for the newer NaCl ARM GCC toolchain):
Program Header:
LOAD off 0x00010000 vaddr 0x00020000 paddr 0x00020000 align 2**16
filesz 0x000193b0 memsz 0x000193b0 flags r-x
LOAD off 0x00000000 vaddr 0x10020000 paddr 0x10020000 align 2**16
filesz 0x00000978 memsz 0x00000978 flags r--
LOAD off 0x00001000 vaddr 0x10031000 paddr 0x10031000 align 2**16
filesz 0x00000abc memsz 0x00000fac flags rw-
Fix GetLoadingAddress() to return the start address of the first
segment, 0x20000, in these cases. Looking at p_offset for this isn't
correct, and the first segment doesn't have p_offset == 0 here because
NaCl can't map the ELF file headers as part of the first segment
(which is for validatable code only).
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3424
TEST= check addresses in output of "dump_syms" when run on NaCl nexe
Patch by Mark Seaborn <mseaborn@chromium.org>
Review URL: https://breakpad.appspot.com/588002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1170 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
|
|
| |
dump_syms.
This saves a lot of memory for dump_syms.
Review URL: https://breakpad.appspot.com/565002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1163 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
R=mark at https://breakpad.appspot.com/536002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1125 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
R=thestig at https://breakpad.appspot.com/517002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1124 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
r1102.
Patch by Julian Seward <jseward@acm.org>, R=ted
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1116 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
R=thestig at https://breakpad.appspot.com/527002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1113 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
instead of relative
A=Ryan Sleevi <rsleevi@chromium.org> R=mark,ted at https://breakpad.appspot.com/385001/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1106 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
r=thestig at https://breakpad.appspot.com/512002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1102 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
just serializing it
R=thestig at https://breakpad.appspot.com/510002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1099 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
R=mark at https://breakpad.appspot.com/511002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1098 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
|
|
| |
cross-word-size symbol dumping
R=mark at https://breakpad.appspot.com/393002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@987 4c0a9323-5329-0410-9bdc-e9ce6186880e
|
|
|
|
|
|
| |
::string class instead of std::string. For more details take a look at common/using_std_string.h
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@682 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|