breakpad/src/common
Scott Graham 19af23e3c0 Handle ntdll only emitting PUBLIC at func entry
This handles a case encountered in ntdll.dll symbols for Windows 7,
where a PUBLIC would be emitted only for the entry point to the
function. The body of the function, however, is split in a PGO-ish
fashion to another remote location in the binary. Because of this, there
were large gaps in the RVA space that would be attributed to the "last"
function that happened to have an entry point before the gap. In
practice, something like this:

0x100 Func1
0x110 Func2
0x120 Func3
0x130 Func4
...
0x800 LaterFuncs

The bodies of Func1/2/3 tend to be implemented as a fast-path check,
followed by a jmp to somewhere in the range between 0x130 and 0x800.
Because no symbols are emitted for this range, everything is attributed
to Func4, causing crash misattribution.

In this CL, the change is: after emitting the entry point symbol, also
walk in the original OMAP entries through the untranslated binary, and
for each block until we resolve to a new symbol (via the same mechanism
as we found the entry point) emit another PUBLIC indicating that there's
another block that belongs to that symbol. This effectively breaks up
the "0x130 - 0x800" range above.

R=mark@chromium.org
BUG=chromium:678874

Change-Id: Ib3741abab2e7158c81e3e34bca4340ce4d3153a1
Reviewed-on: https://chromium-review.googlesource.com/446717
Reviewed-by: Mark Mentovai <mark@chromium.org>
2017-02-23 18:28:02 +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 Allow compiling the google-breakpad code using a global ::string class instead of std::string. 2016-11-08 01:29:06 +00:00
linux Update links 2016-11-18 17:24:37 +00:00
mac macho_reader_unittest: use EXPECT_FALSE 2017-02-12 18:51:38 +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 Handle ntdll only emitting PUBLIC at func entry 2017-02-23 18:28: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 Allow compiling the google-breakpad code using a global ::string class instead of std::string. 2016-11-08 01:29:06 +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