+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.
+
2019-01-17 Tom de Vries <tdevries@suse.de>
* internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
{
/* The data for the next file we know about. */
struct dwarf_data *next;
+ /* The data for .gnu_debugaltlink. */
+ struct dwarf_data *altlink;
/* The base address for this file. */
uintptr_t base_address;
/* A sorted list of address ranges. */
const unsigned char *dwarf_str,
size_t dwarf_str_size,
int is_bigendian,
+ struct dwarf_data *altlink,
backtrace_error_callback error_callback,
void *data)
{
return NULL;
fdata->next = NULL;
+ fdata->altlink = altlink;
fdata->base_address = base_address;
fdata->addrs = addrs;
fdata->addrs_count = addrs_count;
const unsigned char *dwarf_str,
size_t dwarf_str_size,
int is_bigendian,
+ struct dwarf_data *fileline_altlink,
backtrace_error_callback error_callback,
void *data, fileline *fileline_fn,
struct dwarf_data **fileline_entry)
dwarf_line, dwarf_line_size, dwarf_abbrev,
dwarf_abbrev_size, dwarf_ranges, dwarf_ranges_size,
dwarf_str, dwarf_str_size, is_bigendian,
- error_callback, data);
+ fileline_altlink, error_callback, data);
if (fdata == NULL)
return 0;
debuglink_view_valid = 0;
}
+ struct dwarf_data *fileline_altlink = NULL;
if (debugaltlink_name != NULL)
{
int d;
int ret;
ret = elf_add (state, filename, d, base_address, error_callback, data,
- fileline_fn, found_sym, found_dwarf, NULL,
+ fileline_fn, found_sym, found_dwarf, &fileline_altlink,
0, 1, debugaltlink_buildid_data,
debugaltlink_buildid_size);
backtrace_release_view (state, &debugaltlink_view, error_callback,
sections[DEBUG_STR].data,
sections[DEBUG_STR].size,
ehdr.e_ident[EI_DATA] == ELFDATA2MSB,
+ fileline_altlink,
error_callback, data, fileline_fn,
fileline_entry))
goto fail;
const unsigned char *dwarf_str,
size_t dwarf_str_size,
int is_bigendian,
+ struct dwarf_data *fileline_altlink,
backtrace_error_callback error_callback,
void *data, fileline *fileline_fn,
struct dwarf_data **fileline_entry);
sections[DEBUG_STR].data,
sections[DEBUG_STR].size,
0, /* FIXME */
+ NULL,
error_callback, data, fileline_fn,
NULL))
goto fail;
dwsect[DWSECT_STR].data,
dwsect[DWSECT_STR].size,
1, /* big endian */
+ NULL,
error_callback, data, fileline_fn,
NULL))
goto fail;