breakpad/src/common
Mark Mentovai 7c409af709 Parse DWARF 4 line tables correctly
Breakpad’s DWARF line table reader only understood line tables at the
level of DWARF 2. This wasn’t a problem because LLVM only produced line
tables at this level, even when generating DWARF 4. But LLVM would like
to output DWARF 4 line tables when generating DWARF 4, and Breakpad
needs to understand this format. (Meanwhile, it seems that GCC has used
DWARF 4 line tables with DWARF 4 output since 4.5.0, 2010-04-14.)

DWARF 3 line tables are fully compatible with DWARF 2 (assuming that
nothing needs “prologue end,” “epilogue begin,” or “isa”, and opcodes
related to these fields are properly skipped). DWARF 4 changes the line
number program header slightly to include a “maximum operations per
instruction” field. This field must be recognized, but can safely be
ignored (and assumed to be always 1) if VLIW architectures are not
supported (they aren’t). DWARF 4 also introduces a “discriminator”,
whose opcode can also be skipped if these values are not needed (they
shouldn’t be).

This recognizes the “maximum operations per instruction” field when
processing DWARF 4 line tables, but asserts that its value is 1 and
otherwise ignores it.

This is not compatible with VLIW architectures that set this field to a
value other than 1. Such architectures are irrelevant to Breakpad, and
mainline GCC and the proposed LLVM patch always set this field to 1.
There are other things that could be extracted from DWARF 3 and 4 line
tables that aren’t currently extracted (although these are currently
irrelevant to Breakpad too).

Bug: google-breakpad:745
Change-Id: I5bf9c0b1aa654849c9cce64e60682447d10be8ba
Reviewed-on: https://chromium-review.googlesource.com/663441
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2017-09-13 19:50:52 +00:00
..
android Revert "Don't define |r_debug| and |link_map| on Android releases 21 and later" 2016-08-10 22:01:39 +00:00
dwarf Parse DWARF 4 line tables correctly 2017-09-13 19:50:52 +00:00
linux Teach the ELF parser to handle multiple PT_NOTE phdrs. 2017-05-26 16:43:47 +00:00
mac Make the cross-compilation glue for dump_syms Mac handle x86_64h. 2017-05-26 16:03:39 +00:00
solaris solaris: fix spurious ; 2015-09-11 12:59:53 -04:00
testdata Breakpad Linux dumper: Make StabsReader independent of endianness and word size. 2010-05-05 17:09:20 +00:00
tests Add missing #include of eintr_wrapper.h to auto_testfile.h. Since it's 2013-12-03 19:01:17 +00:00
windows Fix dump_syms clang compilation on Windows 2017-03-02 13:32:02 +00:00
basictypes.h Use a proper ignore_result() to fix a ftruncate warn_unused_result warning with GCC 4.8. 2013-12-18 19:52:36 +00:00
byte_cursor.h 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
byte_cursor_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
common.gyp Add debug fission support. 2016-05-04 11:09:44 -07:00
convert_UTF.c Update license on convert_UTF.* to the standard Unicode license. 2015-02-25 21:16:43 +00:00
convert_UTF.h Update license on convert_UTF.* to the standard Unicode license. 2015-02-25 21:16:43 +00:00
dwarf_cfi_to_module.cc Allow compiling the google-breakpad code using a global ::string class instead of std::string. 2016-11-08 01:29:06 +00:00
dwarf_cfi_to_module.h Allow compiling the google-breakpad code using a global ::string class instead of std::string. 2016-11-08 01:29:06 +00:00
dwarf_cfi_to_module_unittest.cc Add some more DWARF ARM register numbers to the DWARF CFI register maps 2012-07-18 18:13:29 +00:00
dwarf_cu_to_module.cc Allow compiling the google-breakpad code using a global ::string class instead of std::string. 2016-11-08 01:29:06 +00:00
dwarf_cu_to_module.h Initial support for dumping DWARF corresponding to Swift code 2016-09-23 14:22:42 -04:00
dwarf_cu_to_module_unittest.cc Don't demangle Rust symbols by default, but allow linking to rust-demangle. 2016-10-25 10:43:00 +00:00
dwarf_line_to_module.cc Include the compilation directory for FILE entries, making them absolute instead of relative 2013-01-23 18:01:28 +00:00
dwarf_line_to_module.h Include the compilation directory for FILE entries, making them absolute instead of relative 2013-01-23 18:01:28 +00:00
dwarf_line_to_module_unittest.cc Include the compilation directory for FILE entries, making them absolute instead of relative 2013-01-23 18:01:28 +00:00
language.cc Use string instead of std::string 2017-03-22 23:22:40 +00:00
language.h Allow compiling the google-breakpad code using a global ::string class instead of std::string. 2016-11-08 01:29:06 +00:00
md5.cc md5: fix strict aliasing warnings 2017-02-07 01:10:12 +00:00
md5.h Fix up ~14 warnings about 'Implicit conversion loses integer precision' on iOS. 2014-02-18 22:52:02 +00:00
memory.h linux-syscall-support: pull in latest version 2016-06-14 14:17:56 -04:00
memory_range.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
memory_range_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
memory_unittest.cc fix signed warning errors in unittests 2016-05-26 10:09:46 -04:00
minidump_type_helper.h Remove pointers from serialized file format 2014-12-11 01:17:43 +00:00
module.cc Dump INFO CODE_ID containing Build ID in Linux dump_syms 2016-06-10 13:23:29 -04:00
module.h Dump INFO CODE_ID containing Build ID in Linux dump_syms 2016-06-10 13:23:29 -04:00
module_unittest.cc Dump INFO CODE_ID containing Build ID in Linux dump_syms 2016-06-10 13:23:29 -04:00
scoped_ptr.h Switch scoped_ptr.h to a compatible google3 implementation. 2013-12-18 19:49:55 +00:00
simple_string_dictionary.cc Rewrite SimpleStringDictionary with NonAllocatingMap. 2013-04-24 18:15:48 +00:00
simple_string_dictionary.h In NonAllocatingMap, remove asserts around key/value length. 2013-10-01 21:32:16 +00:00
simple_string_dictionary_unittest.cc In NonAllocatingMap, remove asserts around key/value length. 2013-10-01 21:32:16 +00:00
stabs_reader.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
stabs_reader.h Fix Mac Breakpad host tools to build in Linux cross-compile 2015-09-16 06:46:55 -04:00
stabs_reader_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
stabs_to_module.cc Fix some fragile code that is likely to cause future memory corruption 2015-01-27 01:20:59 +00:00
stabs_to_module.h 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
stabs_to_module_unittest.cc Put PUBLIC lines in Mac symbol files. 2011-03-04 16:08:39 +00:00
stdio_wrapper.h Rename stdio.h wrapper file to stdio_wrapper.h. 2016-04-05 15:45:30 -04:00
string_conversion.cc Fix pointer arithmetic in UTF8ToUTF16Char 2016-10-27 23:27:56 +00:00
string_conversion.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
symbol_data.h Allow reading just CFI data when reading symbols 2013-03-06 15:32:53 +00:00
test_assembler.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
test_assembler.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
test_assembler_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
unordered.h Both std::tr1::unordered_set and std::unordered_set are not allowed in 2014-07-21 18:27:43 +00:00
using_std_string.h 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