breakpad/src/common/dwarf
mseaborn@chromium.org 10baadae40 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; }
END
cat <<END >example2.c
void foo(int x) {}
END

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

Review URL: https://breakpad.appspot.com/5744002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1408 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-12-03 20:39:55 +00:00
..
bytereader-inl.h Breakpad: Avoid using the C++ <cfoo> headers. 2010-06-25 16:57:07 +00:00
bytereader.cc Breakpad DWARF reader: Use uint64, not uint64_t in DWARF reader code. 2010-08-25 00:54:26 +00:00
bytereader.h Breakpad DWARF reader: Use uint64, not uint64_t in DWARF reader code. 2010-08-25 00:54:26 +00:00
bytereader_unittest.cc This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
cfi_assembler.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
cfi_assembler.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
dwarf2diehandler.cc Remove dead code. 2012-12-12 04:02:58 +00:00
dwarf2diehandler.h Remove dead code. 2012-12-12 04:02:58 +00:00
dwarf2diehandler_unittest.cc Remove dead code. 2012-12-12 04:02:58 +00:00
dwarf2enums.h Breakpad DWARF: Add support for DWARF 4 attribute forms. 2012-02-01 15:01:54 +00:00
dwarf2reader.cc dump_syms: Fix handling of DW_FORM_ref_addr to work with DWARF 4 2014-12-03 20:39:55 +00:00
dwarf2reader.h Remove dead code. 2012-12-12 04:02:58 +00:00
dwarf2reader_cfi_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
dwarf2reader_die_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
dwarf2reader_test_common.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
functioninfo.cc Mac: Fix more errors from clang to get crash_report.xcodeproj close to compiling. 2013-05-08 20:24:03 +00:00
functioninfo.h Remove dead code. 2012-12-12 04:02:58 +00:00
line_state_machine.h Clean up build for 64 bit. 2010-07-19 20:43:49 +00:00
types.h Add some missing #includes 2012-02-15 16:26:32 +00:00