Commit Graph

11 Commits

Author SHA1 Message Date
Tom de Vries 9ad458d539 [libbacktrace] Add altlink field to struct dwarf_data
Add an altlink field to struct dwarf_data, and initialize it with the pointer
to the struct dwarf_data for the .gnu_debugaltlink.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (struct dwarf_data): Add altlink field.
	(backtrace_dwarf_add): Add and handle fileline_altlink parameter.
	* elf.c	(elf_add): Add argument to backtrace_dwarf_add call.
	(phdr_callback, backtrace_initialize): Add argument to elf_add calls.
	* internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
	* pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
	* xcoff.c (xcoff_add): Same.

From-SVN: r267994
2019-01-17 00:07:43 +00:00
Tom de Vries e6f00c83f4 [libbacktrace] Return struct dwarf_data pointer from elf_add
Allow the caller of elf_add access to the struct dwarf_data pointer
corresponding to the added elf.

2019-01-17  Tom de Vries  <tdevries@suse.de>

	* internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
	* dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
	* elf.c	(elf_add): Add and handle fileline_entry parameter.  Add
	argument to backtrace_dwarf_add call.
	(phdr_callback, backtrace_initialize): Add argument to elf_add calls.
	* pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
	* xcoff.c (xcoff_add): Same.

From-SVN: r267993
2019-01-17 00:07:32 +00:00
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Ian Lance Taylor a794e494c6 * pecoff.c (coff_add): Only release syms_view if it is valid.
From-SVN: r257053
2018-01-25 15:38:41 +00:00
Ian Lance Taylor 45f3ab193d * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
From-SVN: r257052
2018-01-25 15:33:36 +00:00
Ian Lance Taylor 017707ce06 * pecoff.c (coff_add): Use coff_read4, not memcpy.
From-SVN: r257040
2018-01-25 02:42:26 +00:00
Jakub Jelinek 85ec4feb11 Update copyright years.
From-SVN: r256169
2018-01-03 11:03:58 +01:00
Ian Lance Taylor 9283471ba0 re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split)
PR sanitizer/77631
	Support for external debug info.
	* elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
	(S_ISLNK): Define if not defined.
	(xstrnlen): Define if strnlen is not available.
	(b_elf_note): Define type.
	(NT_GNU_BUILD_ID): Define macro.
	(elf_crc32, elf_crc32_file): New static functions.
	(elf_is_symlink, elf_readlink): New static functions.
	(elf_open_debugfile_by_buildid): New static function.
	(elf_try_debugfile): New static function.
	(elf_find_debugfile_by_debuglink): New static function.
	(elf_open_debugfile_by_debuglink): New static function.
	(elf_add): Add filename and debuginfo parameters.  Adjust all
	callers.  Look for external debug info notes, and try to fetch
	debug info from external file.
	(struct phdr_data): Add exe_filename field.
	(phdr_callback): Pass filename to elf_add.
	(backtrace_initialize): Add filename parameter.
	* internal.h (backtrace_initialize): Add filename parameter.
	* fileline.c (fileline_initialize): Pass filename to
	backtrace_initialize.
	* pecoff.c (fileline_initialize): Add unused filename parameter.
	* unknown.c (fileline_initialize): Likewise.
	* xcoff.c (fileline_initialize): Likewise.
	* configure.ac: Check for objcopy --add-gnu-debuglink.
	* Makefile.am (dtest): New test target.
	* configure, Makefile.in: Rebuild.

Co-Authored-By: Denis Khalikov <d.khalikov@partner.samsung.com>

From-SVN: r253032
2017-09-20 21:09:37 +00:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Tristan Gingold e24afc10e0 libbacktrace: add support of PE/COFF
libbacktrace/
2015-05-29  Tristan Gingold  <gingold@adacore.com>

	* pecoff.c: New file.
	* Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
	* Makefile.in: Regenerate.
	* filetype.awk: Detect pecoff.
	* configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
	Add pecoff.
	* btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
	true.
	* backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
	* configure: Regenerate.
	* pecoff.c: New file.

From-SVN: r223859
2015-05-29 08:40:20 +00:00