Commit graph

2005 commits

Author SHA1 Message Date
Nelson Billing
678d69cd78 Add symbol type option to SymUploadV2ProtocolSend.
Change-Id: Ia2eadae56c7f879ddb2212e4018024a5c04634aa
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3670054
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
2022-05-31 21:13:35 +00:00
Nelson Billing
bee636cea4 Migrate google_converter to v2 upload API.
Change-Id: If045809cfa3a3601b93725b6b2b45089e7558eb3
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3657059
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
2022-05-20 22:08:43 +00:00
Nelson Billing
c34fc86972 Make sym-upload-v2 windows code shareable.
Change-Id: I228c93655203977b27052a85705c42bafef1e1ef
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3656055
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
2022-05-19 22:17:08 +00:00
Iryna Shakhova
0808030bee Support PE modules in core files when running core2md
Core files generated from `wine` contain both ELF and PE modules. Module
format can be guessed by checking the file contents. If the module
corresponds to PE-file conditions (has specific fields set up as
described in https://code.google.com/archive/p/corkami/wikis/PE.wiki)
we'll create a MDCVInfoPDB70 record in the minidump for it, but if
the file cannot be opened, is too short or is not a PE file, we'll
fall back to ELF procedure.

Added /src/client/linux/minidump_writer/pe_file.{cc,h} to
src_client_linux_libbreakpad_client_a_SOURCES and
src_client_linux_linux_client_unittest_shlib_SOURCES.
Makefile.in and aclocal.m4 were generated by running 'aclocal && automake'.

Test: build core2md and use it to convert a core file into dmp, validate
that the generated dmp file can be opened. Ran './configure & make'.

Change-Id: I225ffeea3f582deed40ecdfe7ab77f5754e90cbe
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3629189
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-05-12 18:24:10 +00:00
Adam Duke
c85eb4a59b avoid dump_syms crashing if selected arch is not found
https://crrev.com/c/3327644 introduced the ability for dump_syms to
operate on in memory data, which has the consequence of not going
through the same input validation as the dump_syms cli tool. In certain
cases, it is possible that architecture info can't be reliably
determined, e.g. new architectures that breakpad is unware of. In that
case, dump_syms should avoid crashing when calling ReadSymbolData and
return false instead.

Change-Id: Ie9acdf811300084f1d5916f4778754f8abca10e0
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3572251
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
2022-04-15 19:07:25 +00:00
Zequan Wu
8b68c72a3f [dump_syms] Fix DW_AT_specification warning on Mac.
1. Visit DW_TAG_class_type when it's inside DW_TAG_subprogram.
2. Only warn when we can't get the name for the DIE and it has DW_AT_specification that is not in the specification map.

Bug: 1078932
Change-Id: Id3126aec305658f8f65c01675a8e9e3ea03f3651
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3579855
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-04-12 17:33:22 +00:00
Yuly Novikov
e09741c609 Fix build with Windows 10 20348 SDK
Bug: chromium:1292528
Change-Id: Iaee784fe3992725086636dddb5f73d7e1373e7d7
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3558794
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
2022-03-29 23:51:59 +00:00
Nelson Billing
fd72a6c232 Set use_async_processing in windows symupload.
Change-Id: If9cc629a44b8c05e4be55d765800c239c47e076c
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3554917
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
2022-03-29 23:47:37 +00:00
Nelson Billing
dccd242781 Set use_async_processing in mac symupload.
Change-Id: I9192aed92cc3ee85c6fdce54cbf51414338d7b99
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3558027
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
2022-03-29 23:46:40 +00:00
Zequan Wu
59abf117ac Add docs for INLINE and INLINE_ORIGIN in overview
Change-Id: I16b2de126efc3a7df5a70086c036f2f77add952a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3523703
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-03-14 22:47:01 +00:00
Ivan Penkov
c685fe1153 Better identification of context frames.
Since the introduction of inlined frames, it is not sufficient to check
the stack trace length (== 1) in order to identify context frames.
Updating all location that were depending on this assumption to check
for frame trust level instead.

Change-Id: I98f966889367c2270c268b8e78b67418c89c50f1
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3499020
Reviewed-by: Mark Mentovai <mark@chromium.org>
2022-03-01 21:11:40 +00:00
Zequan Wu
42d2475617 Add doc for INLINE and INLINE_ORIGIN records in symbol file
Change-Id: Iacf98d4e1a6f4c75e552eaa879f330be7976547e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3268351
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-02-25 17:01:54 +00:00
Ivan Penkov
622a582fa6 Support for leaf functions which don't touch any callee-saved registers
for Windows x64 stacks.

According to https://reviews.llvm.org/D2474, LLVM does't generate unwind info for leaf function which doesn't touch any callee-saved
registers. According to MSDN, leaf functions can be unwound simply by
simulating a return.

Change-Id: Ic0503e2aca90b0ba5799133ea8439f1b5f2eefda
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3489332
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-02-24 22:51:59 +00:00
Ivan Penkov
88f5fc451e Never use frame pointer unwinding on a Windows x64 stack.
MSVC never generates code that works with frame pointer chasing, and LLVM does the same.

Change-Id: I9943160d200509c079fb91394c1a5d789dc188e5
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3486523
Reviewed-by: Mark Mentovai <mark@chromium.org>
2022-02-24 19:17:11 +00:00
Deepanjan Roy
1da39e3a90 Fix another table formatting issue in symbol_files.md
This looked fine in the source but gitiles is very particular
about its table syntax.

Change-Id: I9ca8d61a5ca9656bc4f62297861540473485091a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3485499
Reviewed-by: Lei Zhang <thestig@chromium.org>
2022-02-23 22:21:23 +00:00
Deepanjan Roy
8e73e40c8c Fix table formatting of symbol_files.md
Change-Id: I4c5d2e2d77d27204fdc71d6720ea91abe18fb706
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3485498
Reviewed-by: Lei Zhang <thestig@chromium.org>
2022-02-23 22:01:09 +00:00
Ivan Penkov
fc1b9d3203 Populating is_multiple in google_breakpad::StackFrame from symbol files.
This is needed in order to properly detect and highlight frames that
correspond to multiple functions, for example as the result of identical
code folding by the linker.

Bug: google-breakpad:751
Change-Id: I2ee7c147fcff6493c2454383ad5422b38269759a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3471034
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-02-19 22:51:15 +00:00
Sunbreak
34af6bcff1 Fix missing <memory> header for Windows dump_syms
Change-Id: Ia58efa4ec5b30f644f8114eab85ef589271291dd
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3271972
Reviewed-by: Nelson Billing <nbilling@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2022-02-13 15:06:00 +00:00
Mike Frysinger
4708e6fb8b github: update to latest coverity scan action
This simplifies the action code a bit.

Change-Id: Ibd6ce393ab2d09b0b6e91cecb3a78a33a18de7c0
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3443961
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-02-08 17:27:36 +00:00
Nathan Scoglio
7685201906 Add support for product_name in Mac sym_upload v2
Change-Id: I6fab9f62434fd19eb7aea4a66f0dd809af57e595
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3436859
Reviewed-by: Nelson Billing <nbilling@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2022-02-04 22:41:30 +00:00
Takuto Ikuta
3123f102ff include memory header when using unique_ptr
This is to fix build error on Windows.

Bug: chromium:1294084
Change-Id: I8e6a2e46d53d6f5b02343b81cfaa078580a8326d
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3438886
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-02-04 18:21:24 +00:00
Ivan Penkov
8205b6edb8 The X86 stack walker was doing an illegal down cast from base-class (StackFrame) to derived-class (StackFrameX86).
Inline frames are always of the base-class type (StackFrame). Treating them as derived-class and accessing members was causing heap buffer overflows.

Change-Id: Id4122ab6a31f016933038a1cb63d45d5c38481f5
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3425445
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-02-02 19:32:58 +00:00
Zequan Wu
08bd844599 Fix corner cases on Windows dump_syms
- don't do iter decrement when the map empty.
- add dummy file with id equals to 0 to represent unknown file.

Change-Id: I3fe55a459c9fa835bbe0c4272e4ac12b1150c034
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3425732
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-01-29 00:51:00 +00:00
Zequan Wu
d55a5f3dca Make symupload v2 api respect --timeout flag
Change-Id: I763f45aa395a56e9c3285544e7755a1e5a85dbe4
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3422007
Reviewed-by: Nelson Billing <nbilling@google.com>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-01-28 17:45:39 +00:00
Adam Duke
f6974b15ef namespace implementations of FileID
In trying to create a backend service that can process both ELF and
Mach-O binaries, I found that symbol collisions occur when trying to
link different implementations of FileID. This change puts the
different implementations into separate namespaces to avoid the
collision.

Change-Id: I15aabb222803f2ffbda15ed13e66793bae32ddce
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3421417
Reviewed-by: Mark Mentovai <mark@chromium.org>
2022-01-28 17:11:22 +00:00
Adam Duke
772cfc1db6 allow dump_syms to operate on contents in memory
dump_syms assumes it is operating on a file and can access a compliant
file system. This change allows dump_syms to operate on the contents of
a file that has already been read into memory. This is useful in a
server context where the file does not exist on the local file system.

Change-Id: Id63f115c2df287083d548dadd5ac487f97bde057
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3327644
Reviewed-by: Mark Mentovai <mark@chromium.org>
2022-01-25 22:18:42 +00:00
Zequan Wu
92a20b6504 Fix reading DW_AT_ranges in dwarf 5
Bug: chromium:1285381
Change-Id: I8be6b0920e4d137a5d62283ce622669fa56bc417
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3389983
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-01-14 23:26:59 +00:00
danakj
862dc68dbc Match the return type of getopt().
getopt() returns an int, not a char.

Bug: chromium:1287175
Change-Id: I9866112f7420b39ea470d9f04435ca328ab37ce0
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3387609
Reviewed-by: Mark Mentovai <mark@chromium.org>
2022-01-13 19:35:52 +00:00
Zequan Wu
bbf740148d Fix symupload build failure on Windows.
- Make handle_inline default to false in PDBSourceLineWriter constructor.
- Add --i flag for symupload to generate inline information.

Change-Id: I3149173ee635a503b9508a12ef572f8b6e5c5dfe
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3364804
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2022-01-05 21:43:13 +00:00
Zequan Wu
10afee3916 Add INLINE and INLINE_ORIGIN records on Windows dump_syms
This adds INLINE and INLINE_ORIGIN records on Window dump_syms. It also
adds more LINE records that represents the inner most callsite line info
inside a function.

Bug: chromium:1190878
Change-Id: I15c2044709f8ca831b03a453910d036f749452c6
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3133606
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
2022-01-05 00:28:26 +00:00
Mark Mentovai
634a7b3fad mac: add go.mod for upload_system_symbols
This was created by running “go mod init upload_system_symbols”. This is
necessary for “go build” to work in recent versions of golang.
Previously, errors such as this were produced:

go: cannot find main module, but found .git/config in …/breakpad/src
	to create a module there, run:
	cd ../../../.. && go mod init

Change-Id: Ia88834aec2eb8ee01db452889c525a5f6ebefa25
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3345400
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2021-12-16 21:39:50 +00:00
David Faure
605c51ed96 Fix for non-constant SIGSTKSZ
On glibc > 2.33, `SIGSTKSZ` might not be constant (in which case
it expands to a call to `sysconf` which returns a `long int`); see
https://sourceware.org/pipermail/libc-alpha/2020-October/118513.html

Pass unsigned explicitly to std::max, to avoid relying on template
argument deduction. This works both with the old-style constant
`SIGSTKSZ` and the new configurable one.

Initially based on https://chromium-review.googlesource.com/c/2776379

Change-Id: I9fc95337f973e871b84735ce822b5e11ba73ea8c
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3340721
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-12-15 22:00:51 +00:00
Zequan Wu
3846f6d297 Add <call_site_file_id> to INLINE and remove <file_id> from INLINE_ORIGIN
This is the dump_syms side change on
https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3232838/.
This fixes incorrect source file names when a inlined function's source
file name is different from its parent's.

Change-Id: I25683912d206c6a8db44e322eca5f7383ea8c47e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3248438
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-12-14 23:19:21 +00:00
Zequan Wu
b6510f998a Fix RegisterValidFlag
Return CONTEXT_VALID_NONE if register num is greater than 15 or negative.

Change-Id: I7203d9d51f54e5d589f9ea6fd62bbbaa71de3a4d
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3336256
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-12-13 22:43:30 +00:00
Ivan Penkov
64b25d6653 Fixing issues in the Breakpad symbol file serialization code.
- FastSourceLineResolver::Module::LoadMapFromMemory now rejects an older version of the serialization format.
- Cleaned up several unneeded usages of scoped_ptr::get.
- Fixed the serialization of bool. The serialization code was using 255 for 'true' while the deserialization code was expecting to see 1.
- Serialization for PublicSymbol.is_multiple was missing. Deserialization was expecting it
- Added some logging to processor/source_line_resolver_base.cc

Change-Id: Iadc7d8ee23bf3a07e4ea280d5d4c3f25f6278b69
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3324395
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-12-09 05:03:53 +00:00
Zequan Wu
647aa17a7a Fix corrupted symbol file due to malformed INLINE/INLINE_ORIGIN records
- Ignore DW_TAG_inlined_subroutine with empty range.
- Don't stop parsing after parsing malformed INLINE/INLINE_ORIGIN
records, because reports can still be generated without them but won't
have inlined frames.

Bug: 1190878
Change-Id: I445105ad06b9146268f7d064e85b0d162c3f2a39
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3321166
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-12-07 20:40:40 +00:00
Zequan Wu
0ae29c99d1 Add serialization of inlines and inline origins for FastSourceLineResolver so that it can construct inlined frames later.
Bug: 1190878
Change-Id: Ie3b0f2f44e04e790501ea54680fe223974c750ab
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3294126
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-12-01 00:31:39 +00:00
Zequan Wu
c472afe064 Change Inlines in Function to be ContainedRangeMap that is easier to serialize.
Change-Id: I565d41f7d629d7ea9b66cec6760686ca201994b3
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3294125
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-11-30 23:24:59 +00:00
Zequan Wu
4458a5965a Extend ContainedRangeMap and StaticContainedRangeMap
This adds a new mode in ContainedRangeMap which allows existance of
equal ranges. Among those equal ranges, the most recently added range is
the innermost range.

This also adds a function to ContainedRangeMap and
StaticContainedRangeMap to allow users get a vector of entries that
contains given address from innermost to outermost ranges.

Change-Id: I84c1f2e49ffcaf8238df60e41498730103d1ead6
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3291137
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-11-30 23:24:46 +00:00
Zequan Wu
4ee9854be5 Limit Tokenize max_tokens to 512 when parsing INLINE record.
This is a more practical reserved capacity than
std::numeric_limits<int>::max() for the vector.

Change-Id: Ic8d4e812c3804e4f15cc51650f7a91bae7313415
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3301419
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
2021-11-29 21:48:50 +00:00
Mike Frysinger
998a0a480c github: enable cron schedule
Since GH is mirroring the code directly from our GoB systems, they
aren't triggering push events.  Set them up with a daily/weekly cron
so we get some level of coverage.

Change-Id: I9ececc74a4904e0e3060a10ee1acb952e2021240
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3289899
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-27 03:27:45 +00:00
Mike Frysinger
57281798ba add DIR_METADATA settings
Change-Id: I104e667a354591b35c50902dd84917910b90d2d2
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3301422
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-11-25 04:02:40 +00:00
Sunbreak
2dce3fe73e Add missing config for encoding_util.h/m in iOS client project
Change-Id: I448bc3d20e8b9bc091577e9c11bcb1603bff2588
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3236246
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Nelson Billing <nbilling@google.com>
2021-11-22 18:47:26 +00:00
Alex Pankhurst
38ee0be4d1 Update Rust demangling to use rustc-demangle
The rust-demangle-capi crate hasn't been updated since 2016 and
out-of-date. Instead, Breakpad needs to use C API offered by the
rustc-demangle to demangle Rust symbols.

*** TESTING ***

1) Set up rustc-demangle

> git clone https://github.com/rust-lang/rustc-demangle.git
> cd rustc-demangle
> cargo build -p rustc-demangle-capi --release

2) Breakpad

> ./configure --with-rustc-demangle=<path to rustc-demangle>
> make check src/common/dward_cu_to_module

Change-Id: Ib68b62ef329f1397bc379a1d04c632781e4b2069
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3273324
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-11-11 02:02:49 +00:00
Alex Gough
fe35cd43f2 Allow breakpad to read extended amd64 contexts
Minidumps can contain extended, and compacted extended, contexts to
include xstate data such as the state of the cet registers cetumsr
and cetussp. Previously breakpad would reject dumps with contexts
larger than expected. With this chage, breakpad now accepts and reads
these minidumps. This change does not yet add processing for this
extra data, but will allow any minidumps to be passed on to other
processing tools, or be available for manual inspection.

See chromium-review.googlesource.com/c/crashpad/crashpad/+/2575920
for motivation.

Bug: 1250098
Change-Id: Id67649738ef1c7fb6308e05e6cd8fde790771cb2
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3256483
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2021-11-02 20:17:21 +00:00
Zequan Wu
ee2ad61263 Make processor compatible with both old and new format INLINE/INLINE_ORIGIN
This is similar to the processor part of
https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3232838/,
but added compatibility to process both old and new format of
INLINE/INLINE_ORIGIN records in symbol file.

Old INLINE format:
INLINE <inline_nest_level> <call_site_line> <origin_id>
[<address> <size>]+
New INLINE format:
INLINE <inline_nest_level> <call_site_line> <call_site_file_id>
<origin_id> [<address> <size>]+
Old INLINE_ORIGIN format:
INLINE_ORIGIN <origin_id> <file_id> <name>
New INLINE_ORIGIN format:
INLINE_ORIGIN <origin_id> <name>

Change-Id: I555d9747bfd44a1a95113b9946dcd509b7710876
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3248433
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-10-29 23:23:38 +00:00
Mark Mentovai
dfcb7b6799 Revert "Fix incorrect source file name for inlined frames"
This reverts commit 54d878abcb.

54d878abcb changed the dump_syms format incompatibly. This must be
redone in a multi-step process: the processor must be made to understand
the old and new formats simultaneously and the processor service must be
rebuilt and run with that update before dump_syms output can change to
use the new format.

Bug: chromium:1263390
Change-Id: I5b6f8aff8ea2916b2c07ac6a74b569fa27db51b9
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3244775
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-10-26 17:23:46 +00:00
André Kempe
076073c96b Enable PA and BTI for breakpad
Introduces Arm's Pointer Authentication and Branch Target Identification
to breakpad.

The changes are similar to changes for PA/BTI to Marl, see
https://github.com/google/marl/pull/204

Bug: 1145581
Change-Id: I6a770316ad333bfcfad2ce7f3c1ff78afb35c010
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3226471
Reviewed-by: Primiano Tucci <primiano@chromium.org>
2021-10-25 13:47:48 +00:00
Zequan Wu
54d878abcb Fix incorrect source file name for inlined frames
Processor shows incorrect source file name if a frame have an inlined
frame and their source files are different.
Consider this example:
FILE 0 /tmp/a.h
FILE 1 /tmp/a.cpp
INLINE_ORIGIN 0 0 foo()
FUNC 1110 a 0 main
INLINE 0 22 0 1110 7
1110 7 3 0
1117 3 23 1

When querying the address 0x1110, we know this line 0x1110 corresponds
to /tmp/a.h line 3 and it's inside a inlined function foo() which is
defined at /tmp/a.h and called at line 22. But we don't know at which
file it's being called at line 22. So, we will get stacks like this:
void foo() /tmp/a.h:3
int main() /tmp/a.h:22

The correct stacks should be this:
void foo() /tmp/a.h:3
int main() /tmp/a.cpp:22

In this change:
1. Remove file_id field for INLINE_ORIGIN record.
2. Add call_site_file_id for INLINE record to represents the file where
this call being inlined.

After adding call_site_file_id to it (as third field), it looks like
this:
FILE 0 /tmp/a.h
FILE 1 /tmp/a.cpp
INLINE_ORIGIN 0 foo()
FUNC 1110 a 0 main
INLINE 0 22 1 0 1110 7
1110 7 3 0
1117 3 23 1

Bug: 1190878
Change-Id: Ibbb697d2f7e1b6ac3208cac6fae4353c8743198d
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3232838
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-10-20 21:15:06 +00:00
Peter Kasting
71387fc200 Fix an instance of -Wshadow.
Bug: chromium:794619
Change-Id: I7edb70a915ffb3c6f945dce77b0bd913e32e85eb
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3229392
Reviewed-by: Mark Mentovai <mark@chromium.org>
2021-10-20 13:21:51 +00:00