Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in

Issue 5744002: dump_syms: Fix handling of DW_FORM_ref_addr to work with DWARF 4 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
6 years, 7 months ago by mseaborn
6 years, 5 months ago
Base URL:


dump_syms: Fix handling of DW_FORM_ref_addr to work with DWARF 4

Previously, dump_syms did not handle DW_FORM_ref_addr if it appeared
in DWARF 4 debugging info.

Also fix a DW_FORM_ref_addr case so that it doesn't fall through to
the next switch case when assertions are disabled and the DWARF
version isn't recognised.

The following steps will reproduce the problem when using LLVM 3.4:

cat <<END >example1.c
int main() { return 0; }
cat <<END >example2.c
void foo(int x) {}

clang -emit-llvm -g -c example1.c -o example1.bc
clang -emit-llvm -g -c example2.c -o example2.bc
llvm-link-3.4 example1.bc example2.bc -o combined.bc
clang combined.bc -o executable
./google-breakpad/build/src/tools/linux/dump_syms/dump_syms executable

When using LLVM bitcode linking in this way, LLVM's backend generates
partially-merged DWARF debugging info in which some of the references
to the "int" type go via "DW_FORM_ref_addr".  Since PNaCl uses LLVM
bitcode linking, this dump_syms failure occurs with nexes produced by
the PNaCl toolchain.

BUG= https://code.google.com/p/chromium/issues/detail?id=416368
TEST= see above
R=mark@chromium.org, mcgrathr@chromium.org

Committed: https://code.google.com/p/google-breakpad/source/detail?r=1408

Patch Set 1 #

Total comments: 5

Patch Set 2 : Review #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/common/dwarf/dwarf2reader.cc View 1 2 chunks +7 lines, -6 lines 0 comments Download


Total messages: 7
6 years, 7 months ago #1
Roland McGrath
lgtm https://breakpad.appspot.com/5744002/diff/1/src/common/dwarf/dwarf2reader.cc File src/common/dwarf/dwarf2reader.cc (right): https://breakpad.appspot.com/5744002/diff/1/src/common/dwarf/dwarf2reader.cc#newcode191 src/common/dwarf/dwarf2reader.cc:191: } else if (header_.version == 3 || header_.version ...
6 years, 7 months ago #2
+Mark Mentovai for review as an owner of Breakpad. Mark, do you have any opinion ...
6 years, 7 months ago #3
Mark Mentovai
You should be able to add a test for DW_FORM_ref_addr to common/dwarf/dwarf2reader_die_unittest.cc. There’s a series ...
6 years, 7 months ago #4
Mark, please take a look... On 2014/10/13 21:40:01, Mark Mentovai wrote: > You should be ...
6 years, 5 months ago #5
Mark Mentovai
6 years, 5 months ago #6
6 years, 5 months ago #7
Message was sent while issue was closed.
Committed patchset #2 (id:70001) manually as 1408 (presubmit successful).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted