commit | a8a43bad6fdb2d63b623862bea8f6bc959d8edc9 | [log] [tgz] |
---|---|---|
author | Sim Sun <simsun@fb.com> | Wed Apr 17 23:52:25 2024 |
committer | Joshua Peraza <jperaza@chromium.org> | Thu Apr 18 16:19:18 2024 |
tree | 671324d486fa0de9d36e29ba30ea4f16100659aa | |
parent | e5dc1f86b2defc8f76b56fb473b804e42e75c41d [diff] |
Prefer to use .note.gnu.build-id section as ElfBuildId Summary: Android prefers `.note.gnu-build-id`[0] as BuildId than anyother PT_NOTE phdrs. This CL tries to read ElfBuildId from `.note.gnu.build-id` first to fix the BuildId mismatch issue between Android tombstone report and breakpad symbol file. e.g ``` Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .note.androi[...] NOTE 0000000000000270 00000270 0000000000000018 0000000000000000 A 0 0 4 [ 2] .note.hwasan[...] NOTE 0000000000000288 00000288 000000000000001c 0000000000000000 A 0 0 4 [ 3] .note.gnu.bu[...] NOTE 00000000000002a4 000002a4 0000000000000020 0000000000000000 A 0 0 4 $ readelf -x .note.hwasan.globals Hex dump of section '.note.hwasan.globals': 0x00000288 08000000 08000000 03000000 4c4c564d ............LLVM 0x00000298 00000000 98890100 409d0100 ........@... $ readelf -x .note.gnu.build-id Hex dump of section '.note.gnu.build-id': 0x000002a4 04000000 10000000 03000000 474e5500 ............GNU. 0x000002b4 a4eb3625 c1db6452 1e881973 bfdff9bd ..6%..dR...s.... ``` The BuildId in tombstone: ``` libartbase.so (BuildId: c7e463b51b0898d442269a421353bdbd) ``` But the breakpad dump_syms got: ``` MODULE Linux arm64 000189989D40000100000000000000000 libartbase.so INFO CODE_ID 98890100409D0100 ````` [0] https://cs.android.com/android/platform/superproject/main/+/main:system/unwinding/libunwindstack/ElfInterface.cpp;l=423-427;drc=3d19fbcc09b1b44928639b06cd0b88f735cd988d Change-Id: I01e3514e0e2a1ea163c03093055284448ed4e89c Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/5463566 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Breakpad is a set of client and server components which implement a crash-reporting system.
First, download depot_tools and ensure that they’re in your PATH
.
Create a new directory for checking out the source code (it must be named breakpad).
mkdir breakpad && cd breakpad
Run the fetch
tool from depot_tools to download all the source repos.
fetch breakpad
cd src
Build the source.
./configure && make
You can also cd to another directory and run configure from there to build outside the source tree.
This will build the processor tools (src/processor/minidump_stackwalk
, src/processor/minidump_dump
, etc), and when building on Linux it will also build the client libraries and some tools (src/tools/linux/dump_syms/dump_syms
, src/tools/linux/md2core/minidump-2-core
, etc).
Optionally, run tests.
make check
Optionally, install the built libraries
make install
If you need to reconfigure your build be sure to run make distclean
first.
To update an existing checkout to a newer revision, you can git pull
as usual, but then you should run gclient sync
to ensure that the dependent repos are up-to-date.
Follow the steps above to get the source and build it.
Make changes. Build and test your changes. For core code like processor use methods above. For linux/mac/windows, there are test targets in each project file.
Commit your changes to your local repo and upload them to the server. http://dev.chromium.org/developers/contributing-code e.g. git commit ... && git cl upload ...
You will be prompted for credential and a description.
At https://chromium-review.googlesource.com/ you'll find your issue listed; click on it, then “Add reviewer”, and enter in the code reviewer. Depending on your settings, you may not see an email, but the reviewer has been notified with google-breakpad-dev@googlegroups.com always CC’d.