diff options
author | Ted Mielczarek <ted@mielczarek.org> | 2016-04-05 09:34:20 -0400 |
---|---|---|
committer | Ted Mielczarek <ted@mielczarek.org> | 2016-04-05 09:34:20 -0400 |
commit | 6c8f80aa8b3ba8120c4158c069bb298c044dedf9 (patch) | |
tree | 2164203da75d894883e042368c34370f6c3af4c8 /src/client/linux/handler/exception_handler_unittest.cc | |
parent | sample_app: enable C++11 for Android builds (diff) | |
download | breakpad-6c8f80aa8b3ba8120c4158c069bb298c044dedf9.tar.xz |
Switch the Linux minidump writer to use MDCVInfoELF for CV data.
This preserves full build ids in minidumps, which are useful for
tracking down the right version of system libraries from Linux
distributions.
The default build id produced by GNU binutils' ld is a 160-bit SHA-1
hash of some parts of the binary, which is exactly 20 bytes:
https://sourceware.org/binutils/docs-2.26/ld/Options.html#index-g_t_002d_002dbuild_002did-292
The bulk of the changes here are to change the signatures of the
FileID methods to use a wasteful_vector instead of raw pointers, since
build ids can be of arbitrary length.
The previous change that added support for this in the processor code
preserved the return value of `Minidump::debug_identifier()` as the
current `GUID+age` treatment for backwards-compatibility, and exposed
the full build id from `Minidump::code_identifier()`, which was
previously stubbed out for Linux dumps. This change keeps the debug ID
in the `dump_syms` output the same to match.
R=mark@chromium.org, thestig@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1688743002 .
Diffstat (limited to 'src/client/linux/handler/exception_handler_unittest.cc')
-rw-r--r-- | src/client/linux/handler/exception_handler_unittest.cc | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/client/linux/handler/exception_handler_unittest.cc b/src/client/linux/handler/exception_handler_unittest.cc index 439b3c38..4eb7b73c 100644 --- a/src/client/linux/handler/exception_handler_unittest.cc +++ b/src/client/linux/handler/exception_handler_unittest.cc @@ -45,7 +45,6 @@ #include "client/linux/handler/exception_handler.h" #include "client/linux/minidump_writer/minidump_writer.h" #include "common/linux/eintr_wrapper.h" -#include "common/linux/file_id.h" #include "common/linux/ignore_ret.h" #include "common/linux/linux_libc_support.h" #include "common/tests/auto_tempdir.h" @@ -817,19 +816,7 @@ TEST(ExceptionHandlerTest, ModuleInfo) { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF }; - char module_identifier_buffer[kGUIDStringSize]; - FileID::ConvertIdentifierToString(kModuleGUID, - module_identifier_buffer, - sizeof(module_identifier_buffer)); - string module_identifier(module_identifier_buffer); - // Strip out dashes - size_t pos; - while ((pos = module_identifier.find('-')) != string::npos) { - module_identifier.erase(pos, 1); - } - // And append a zero, because module IDs include an "age" field - // which is always zero on Linux. - module_identifier += "0"; + const string module_identifier = "33221100554477668899AABBCCDDEEFF0"; // Get some memory. char* memory = |