Ian Lance Taylor
6f8310e238
libbacktrace: support returning discriminator field
...
Based on patch from Andi Kleen.
* backtrace.h (backtrace_create_state): Rewrite comment to change
threaded parameter to flags.
(backtrace_full_callback, backtrace_syminfo_callback): Document
behavior change if moredata flag is set.
(struct backtrace_moredata): Define.
* backtrace-supported.h.in (BACKTRACE_SUPPORTS_MOREDATA): Define.
* internal.h (struct backtrace_state): Add moredata field.
(BACKTRACE_MOREDATA_VERSION): Define.
* state.c (backtrace_create_state): Change threaded parameter to
flags. Set state moredata field based on flags.
* dwarf.c (struct line): Add disc field.
(struct function): Add caller_disc field.
(call_callback): New static function.
(add_line): Add disc parameter. Change all callers. Store disc
in new line value.
(read_line_program): Track discriminator value.
(read_line_info): Initialize disc field in final line entry.
(read_function_entry): Handle DW_AT_GNU_discriminator.
(report_inlined_functions): Add disc parameter. Change all
callers. Call call_callback rather than calling callback
directly.
(dwarf_lookup_pc): Handle inlined discriminators. Call
call_callback rather than calling callback directly.
(dwarf_fileline): Call call_callback rather than calling callback
directly.
* elf.c (elf_syminfo): Pass moredata if requested.
* macho.c (macho_syminfo): Likewise.
* pecoff.c (coff_syminfo): Likewise.
* xcoff.c (xcoff_syminfo): Likewise.
(xcoff_lookup_pc): Likewise.
* backtrace.c: #include <string.h>.
(unwind): Pass moredata if requested.
* unknown.c: #include <string.h>.
(unknown_fileline): Pass moredata if requested.
* fileline.c (backtrace_syminfo_to_full_callback): Add comment
about moredata.
* mdtest.c: New test file.
* Makefile.am (mdtest_SOURCES): Define.
(mdtest_CFLAGS, mdtest_LDFLAGS, mdtest_LDADD): Define.
(BUILDTESTS): Add mdtest.
* Makefile.in: Regenerate.
2026-07-06 12:42:21 -07:00
Jakub Jelinek
42962d2cfb
Update copyright years.
2026-05-03 18:21:13 -07:00
Jakub Jelinek
bdd324c192
Update copyright years.
2026-05-03 18:20:27 -07:00
Ian Lance Taylor
8c05bcb94f
libbacktrace: update copyright years
2024-07-11 18:14:01 -07:00
Ian Lance Taylor
59473f7906
libbacktrace: pass -1 to error callback for unrecognized DWARF
...
PR libbacktrace/98818
* dwarf.c (dwarf_buf_error): Add errnum parameter. Change all
callers.
* backtrace.h: Update backtrace_error_callback comment.
2021-03-02 13:49:18 -08:00
Jakub Jelinek
5496ee0a1a
Update copyright years.
2021-01-18 14:56:19 -08:00
Ian Lance Taylor
bd02146d90
Update copyright years.
2020-02-18 18:46:13 -08:00
Ian Lance Taylor
559ab7cab4
libbacktrace: update to current version from GCC trunk
...
This adds DWARF 5 support as well as an enhanced testsuite.
Patch assembled by Than McIntosh.
2019-12-23 18:55:51 -08:00
Than McIntosh
17f687d2b9
Update from gcc trunk version of libbacktrace at svn rev 256427. ( #8 )
...
Includes (among other things) support for compressed debug sections,
a variety of bugfixes, and expanded test coverage.
2018-01-12 10:26:02 -08:00
Ian Lance Taylor
ba79a27ee9
all: remove meaningless trailing whitespace
2016-09-11 06:45:37 -07:00
Ian Lance Taylor
84241313f2
libbacktrace: initial commit
...
This is a standalone version of the libbacktrace library that I
originally wrote for GCC. This is a copy of libbacktrace from GCC
trunk, with all dependencies incorporated here.
2016-09-10 07:59:09 -07:00