breakpad/src/google_breakpad/processor
Zequan Wu 54d878abcb Fix incorrect source file name for inlined frames
Processor shows incorrect source file name if a frame have an inlined
frame and their source files are different.
Consider this example:
FILE 0 /tmp/a.h
FILE 1 /tmp/a.cpp
INLINE_ORIGIN 0 0 foo()
FUNC 1110 a 0 main
INLINE 0 22 0 1110 7
1110 7 3 0
1117 3 23 1

When querying the address 0x1110, we know this line 0x1110 corresponds
to /tmp/a.h line 3 and it's inside a inlined function foo() which is
defined at /tmp/a.h and called at line 22. But we don't know at which
file it's being called at line 22. So, we will get stacks like this:
void foo() /tmp/a.h:3
int main() /tmp/a.h:22

The correct stacks should be this:
void foo() /tmp/a.h:3
int main() /tmp/a.cpp:22

In this change:
1. Remove file_id field for INLINE_ORIGIN record.
2. Add call_site_file_id for INLINE record to represents the file where
this call being inlined.

After adding call_site_file_id to it (as third field), it looks like
this:
FILE 0 /tmp/a.h
FILE 1 /tmp/a.cpp
INLINE_ORIGIN 0 foo()
FUNC 1110 a 0 main
INLINE 0 22 1 0 1110 7
1110 7 3 0
1117 3 23 1

Bug: 1190878
Change-Id: Ibbb697d2f7e1b6ac3208cac6fae4353c8743198d
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3232838
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2021-10-20 21:15:06 +00:00
..
basic_source_line_resolver.h Fix incorrect source file name for inlined frames 2021-10-20 21:15:06 +00:00
call_stack.h Add a missing const to an accessor. 2016-04-14 14:45:04 -04:00
code_module.h Populate stack frames with unloaded module info. 2017-01-19 19:33:56 +00:00
code_modules.h Enable truncation of module ranges 2019-06-11 19:04:02 +00:00
dump_context.h Define and use a a new MDRawContextARM64 2018-08-01 19:27:25 +00:00
dump_object.h Refactoring in preparation for microdump processing 2014-09-08 19:10:42 +00:00
exception_record.h Extract the exception record from the minidump 2020-01-03 20:47:38 +00:00
exploitability.h Add check for Linux minidump ending on bad write for exploitability rating. 2015-08-21 16:22:19 +00:00
fast_source_line_resolver.h Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
memory_region.h Refactoring in preparation for microdump processing 2014-09-08 19:10:42 +00:00
microdump.h Define and use a a new MDRawContextARM64 2018-08-01 19:27:25 +00:00
microdump_processor.h Add -s flag to microdump_stackwalk for dumping stack contents. 2017-10-17 10:22:46 +00:00
minidump.h fix pointer style to match the style guide 2020-07-15 06:20:02 +00:00
minidump_processor.h fix pointer style to match the style guide 2020-07-15 06:20:02 +00:00
proc_maps_linux.h Allow compiling the google-breakpad code using a global ::string class instead of std::string. 2016-11-08 01:29:06 +00:00
process_result.h Refactoring in preparation for microdump processing 2014-09-08 19:10:42 +00:00
process_state.h Extract the exception record from the minidump 2020-01-03 20:47:38 +00:00
source_line_resolver_base.h Fix incorrect source file name for inlined frames 2021-10-20 21:15:06 +00:00
source_line_resolver_interface.h Fix incorrect source file name for inlined frames 2021-10-20 21:15:06 +00:00
stack_frame.h Add support to process INLINE records in symbol files 2021-07-22 19:09:50 +00:00
stack_frame_cpu.h Define and use a a new MDRawContextARM64 2018-08-01 19:27:25 +00:00
stack_frame_symbolizer.h Fix incorrect source file name for inlined frames 2021-10-20 21:15:06 +00:00
stackwalker.h processor: subtract 1 from return pointers while scanning 2020-08-14 17:26:39 +00:00
symbol_supplier.h fix pointer style to match the style guide 2020-07-15 06:20:02 +00:00
system_info.h Parse additional line introduced in the microdump format and containing the GPU infromation in the following format: 2016-02-11 10:04:04 -08:00