Dwarf generated by Clang -g1 will not have DW_AT_inline attribute for some DW_TAG_subprograms even if they are inlined. This warning recently increased a lot (~ 3 million) due to DW_TAG_inlined_subroutine also complains about unknown abstract origin. It caused infra failure in building bots.
Bug: 1241579
Change-Id: I9b5135925b71aa915760c140bcf73fc603bb77d3
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3111782
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Building fails for some people because configure requires c++11 but make_unique is a c++14 feature.
Change-Id: I23ce689fc92e9e90a95e7643ff29602f6b32ccbb
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3107784
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
The size of symbol file for chrome binary increased from 577 MB to
1205 MB. There are 7,453,748 INLINE records and 1,268,493 INLINE_ORIGIN
records.
Bug: 1190878
Change-Id: I802ec1b4574c14f74ff80d0f69daf3c81085778a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2915828
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This adds the support to process INLINE and INLINE_ORIGIN records in
symbol files and to generate inlined frames using those records if
possible.
Bug: 1190878
Change-Id: Ia0b6d56c9de37cf818d9bb6842d58c9b68f235b2
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3024690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Section 7.26 of the DWARF 5 spec describes a header of
either 8 or 16 bytes before the offsets begin.
Bug: b/187205051
Change-Id: I1ba01008dcd7a533f59d3865762ca09b9d43032b
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3016609
Reviewed-by: Sterling Augustine <saugustine@google.com>
iOS closes an app’s network connections when the app is backgrounded. This can cause an in-progress upload request to fail. We can mitigate this by requesting additional background execution time using the `UIApplication` background task APIs.
BUG=b:130302235
Change-Id: Ifd8e14ca82c736ad7dd60dcdd0d4bbcabb76f5ad
Signed-off-by: Darren Mo <darrenmo@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2251020
Reviewed-by: Mark Mentovai <mark@chromium.org>
PUBLIC records.
For chrome, the symbol file size dropped from 661 MB to 577 MB.
The number of PUBLIC records dropped from 559416 to 91930.
Change-Id: I7f703d619f2acc7c83f002e6f588f6a6569e5c87
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2916731
Reviewed-by: Lei Zhang <thestig@chromium.org>
Since the entire Chromium GoB host is moving to enforce owners, make
sure we have settings in place ahead of time.
Change-Id: Ia8a52ff587a0b8f11f2b56caf9e283d05e2a822c
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2920608
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Sterling Augustine <saugustine@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
macho_reader assumes that every section in a segment exists, or none of the
sections exist in the file (for dSYM files).
https://reviews.llvm.org/D94460?id=315965 added __eh_frame section to the
__TEXT segments in dSYM files. All the other sections are removed, but still
have non-zero size in the header. macho_reader only looks at `fileoff` and
`filesize` fields to determine the size of the segment, but it looks at `addr`
and `size` to determine the size of the section, therefore it determines that
the sections would not fit in the segment and refused to parse the file.
In this case the removed sections all have offset == 0. Ignore such cases.
Change-Id: Ife771f7b302c1bc81c673b1103492c41321b5e3e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2911204
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Before this change, forward_ref_die_to_func is always empty.
Because forward reference DIEs could cross compilation units,
forward_ref_die_to_func is moved into FilePrivate.
By using "grep "name omitted" sym | wc -l", the number of functions
with no name is reduced from 26951 to 203 if forward reference only is
allowed within CU. It's reduced from 203 to 6 if crossing compilation
units is allowed.
Change-Id: Ie2a457abfc0c4d8e68fe0fa595a27ea4abf33a76
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2904093
Reviewed-by: Mike Frysinger <vapier@chromium.org>
If there is an address index reference to .debug_addr section before
DW_AT_addr_base, addr_base_ will be 0. It will retrieve wrong address.
An example could be DW_AT_loc_pc occurs before DW_AT_addr_base.
Change-Id: Id2b337f5235470cc9beaf05a62efebbde797dacf
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2900806
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
std::allocator<T>::pointer and related are removed in C++20, so moving to
std::allocator_traits which is available since C++11.
Change-Id: Ie67b5c24b27e59edf5595a3575f2794748c3817f
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2894004
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Make various tools print just their names as part of the usage
instructions, rather than the full path. Also fix a missing space in the
dump_syms usage output.
Change-Id: I2b796678cd47e7dbabcc03df2b57cdc3420c008c
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2787678
Reviewed-by: Mike Frysinger <vapier@chromium.org>
This reverts commit f2b3ab5e0a.
Reason for revert: Causes symbolization errors on ARM ChromeOS
devices crbug.com/1182948.
Original change's description:
> arm: Allow the first function to use linked register as return pc
>
> For a crash at the function entry with corrupted PC, the caller's PC
> could be lying in the link register. Using the PC from link register
> would be more effective than blindly scanning the stack immediately.
>
> Change-Id: I51673b7298e70faeeab2bfa97075e3c4793f94bc
> Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2678992
> Reviewed-by: Mike Frysinger <vapier@chromium.org>
> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Bug: 1182948
Change-Id: I2818b35ab1fb99012919cccc0fb80368e456ca15
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2765164
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
LLVM, especially in ThinLTO builds, sometimes puts a suffix on symbols
to give them a unique name. For example:
?foo@@YAXXZ$5520c83448162c04f2b239db4b5a2c61
?foo@@YAXXZ.llvm.1304071520971994875
Strip such suffixes in order to demangle the names.
Bug: chromium:1179132
Change-Id: Ibc8da0c605b95c6b9fc51802a56b89f6e7cfb7e1
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2739612
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
The auto-detection of the UUID was missing the extra "0" added for
compatibility reasons. The native upload also was sending malformed
HTTP.
Change-Id: I8c261fc525f0f0086f269f2dee02941dd55488cb
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2739320
Reviewed-by: Nelson Billing <nbilling@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
There's no need to pass in debug ID to symupload for native symbol
uploads, as breakpad can extra the ID itself for dsym and macho types.
Change-Id: Ib0b7703eac85bc84fe1f095e678d75b347bd872a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2724731
Reviewed-by: Nelson Billing <nbilling@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
For a crash at the function entry with corrupted PC, the caller's PC
could be lying in the link register. Using the PC from link register
would be more effective than blindly scanning the stack immediately.
Change-Id: I51673b7298e70faeeab2bfa97075e3c4793f94bc
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2678992
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
`core_handler` and `pid2md` are always untracked after `make`. They are
the output of build. We should ignore them.
```
Untracked files:
(use "git add <file>..." to include in what will be committed)
src/tools/linux/core_handler/core_handler
src/tools/linux/pid2md/pid2md
```
Change-Id: Ib20fdaf6b902f4de0b336ab22423c7271f8dc26c
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2678993
Reviewed-by: Mike Frysinger <vapier@chromium.org>
To generate the out directory before compiling stackwalk_common.cc.
Makefile.in and aclocal.m4 were generated by running `aclocal &&
automake`.
BUG=chromium:1167503
BUG=b:177451284
TEST=./configure && make
Change-Id: I7a7674aa5f81cf0016eb2f5170ea3676ccfe3bbb
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2659000
Reviewed-by: Mike Frysinger <vapier@chromium.org>
When built with -Werror, dwar2reader.cc fails to build with three
-Wunused-variable warnings. This CL fixes that.
Change-Id: I10487644377d623d850acc258a94bbacb368ffae
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2638927
Reviewed-by: Sterling Augustine <saugustine@google.com>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Fifth of 5 small patches to fix various breakpad issues found
while testing dump_syms of DWARF v5 in ChromeOS.
DWARF v5 introduces a new dwp version, version 5. The current
dwp reader only recognizes versions 1 & 2 as valid dwp versions. This
CL fixes that.
Change-Id: I5ac43b318b59e406ca1f6749232709aaef59a67b
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2634550
Reviewed-by: Sterling Augustine <saugustine@google.com>
Fourth of 5 small patches to fix various breakpad issues found
while testing dump_syms on DWARF v5 in ChromeOS.
Dwarfv5 adds many new Type Unit sections to debug information. Since
these only contain type information, they are of no interest to
dump_syms. This CL gets dump_syms to skip trying to process the
type unit sections. Without this CL, dump_syms takes ~ 3 hours to
process the DWARF v5 Chrome binary. With this CL, dump_syms takes
~ 8 minutes to process the DWARF v5 Chrome binary (about the same
time as it takes for DWARF v4).
This CL also adds a test case to verify that type units are being
skipped.
Change-Id: Ie0bb2d675718f7041b8e9b3186ed44f80a3ad39c
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2634549
Reviewed-by: Sterling Augustine <saugustine@google.com>