mirror of
https://github.com/ianlancetaylor/libbacktrace.git
synced 2026-09-07 12:17:06 +08:00
libbacktrace: report decl_lineno with MOREDATA
Based on patch by Andi Kleen. * backtrace.h (struct backtrace_moredata): Add backtrace_decl_lineno field. * internal.h (BACKTRACE_MOREDATA_VERSION): Change to 4. * dwarf.c (struct function): Add decl_lineno field. (call_callback): Add decl_lineno parameter. Change all callers. (read_referenced_name_from_attr): Likewise. (read_referenced_name): Likewise. (report_inlined_functions): Likewise. (read_function_entry): Set decl_lineno field. (dwarf_lookup_pc): Handle decl_lineno across inlines. * mdtest.c (struct mdinfo): Define. (struct mddata): Define. (md_callback_one): Adjust for mddata. (md_callback_three): Likewise. (test1, f2): Reformat for simpler line number testing. (f3): Test that decl_lineno is correct. (f13): Adjust for mddata.
This commit is contained in:
+1
-1
@@ -428,6 +428,6 @@ extern int backtrace_uncompress_lzma (struct backtrace_state *,
|
||||
size_t *uncompressed_size);
|
||||
|
||||
/* Current expected backtrace_moredata version. */
|
||||
#define BACKTRACE_MOREDATA_VERSION (3)
|
||||
#define BACKTRACE_MOREDATA_VERSION (4)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user