breakpad/src/common/linux
Zequan Wu 9f96d5c7b7 Fix inline_origin_map key collision when split dwarf is enabled.
It fixes following two problems:
1. When we have skeleton compilation unit (DW_TAG_skeleton_unit) in a
binary file refers to the complete unit in a split dwarf file
(.dwo/.dwp file), we should use the split dwarf file's path in warning
reporting. Right now, it uses the original file (binary file) path in
warning report, which is incorrect.

For example, if we have chrome.debug which is the binary with skeleton
debug info and chrome.dwp which is the complete debug info and the debug
info in chrome.dwp has some incorrect reference, it will warn on
chrome.debug rather than chrome.dwp

2. When split dwarf is enabled, the global inline_origin_map will likely
encounter key collision because the offsets as keys are now relative to
each CU's offset which is relative to .debug_info section. Also
offsets from different files might collide.

This change makes a inline_origin_map for each debug file and use
offsets only relative to .debug_info section as keys.

Bug: b/280290608
Change-Id: If70e2e1bfcbeeeef2d425c918796d351a0e9ab3b
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4544694
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2023-05-19 17:05:35 +00:00
..
tests Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
breakpad_getcontext.h Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
breakpad_getcontext.S Added riscv and riscv64 support for Linux 2022-09-09 08:44:46 +00:00
breakpad_getcontext_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
crc32.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
crc32.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
dump_symbols.cc Fix inline_origin_map key collision when split dwarf is enabled. 2023-05-19 17:05:35 +00:00
dump_symbols.h Add option to enable multiple symbol field in Linux tool 2022-12-08 18:28:34 +00:00
dump_symbols_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
eintr_wrapper.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
elf_core_dump.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
elf_core_dump.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
elf_core_dump_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
elf_gnu_compat.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
elf_symbols_to_module.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
elf_symbols_to_module.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
elf_symbols_to_module_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
elfutils-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
elfutils.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
elfutils.h names anonymous structs in elfutils.h 2022-10-27 02:55:38 +00:00
file_id.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
file_id.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
file_id_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
google_crashdump_uploader.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
google_crashdump_uploader.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
google_crashdump_uploader_test.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
guid_creator.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
guid_creator.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
http_upload.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
http_upload.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
ignore_ret.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
libcurl_wrapper.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
libcurl_wrapper.h LibcurlWrapper uses curl_global_cleanup 2023-01-27 20:36:21 +00:00
linux_libc_support.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
linux_libc_support.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
linux_libc_support_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
memory_mapped_file.cc Set O_NONBLOCK for opening file to prevent hanging when file unavailable. 2023-04-17 21:23:19 +00:00
memory_mapped_file.h Modernize code 2023-05-12 18:17:39 +00:00
memory_mapped_file_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
safe_readlink.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
safe_readlink.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
safe_readlink_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
scoped_pipe.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
scoped_pipe.h Add ScopedPipe. 2023-01-31 00:34:58 +00:00
scoped_pipe_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
scoped_tmpfile.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
scoped_tmpfile.h Add ScopedTmpFile. 2023-01-31 00:34:48 +00:00
scoped_tmpfile_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
symbol_collector_client.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
symbol_collector_client.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
symbol_upload.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
symbol_upload.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
synth_elf.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
synth_elf.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
synth_elf_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
ucontext_constants.h Added riscv and riscv64 support for Linux 2022-09-09 08:44:46 +00:00