From 6e7a29c7de4e1df679f2b6f6449b20474fbbcfdf Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Fri, 2 Sep 2022 14:16:30 -0400 Subject: bfd: Add bfd_find_nearest_line_with_alt bfd_find_nearest_line_with_alt functions like bfd_find_nearest_line with the addition of a parameter for specifying the filename of a supplementary debug file such as one referenced by .gnu_debugaltlink or .debug_sup. This patch focuses on implementing bfd_find_nearest_line_with_alt support for ELF/DWARF2 .gnu_debugaltlink. For other targets this function simply sets the invalid_operation bfd_error. --- bfd/bfd-in2.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bfd/bfd-in2.h') diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 6aefdd7..79fcc4e 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -7162,6 +7162,11 @@ bool bfd_set_private_flags (bfd *abfd, flagword flags); BFD_SEND (abfd, _bfd_find_nearest_line, \ (abfd, syms, sec, off, file, func, line, NULL)) +#define bfd_find_nearest_line_with_alt(abfd, alt_filename, sec, syms, off, \ + file, func, line, disc) \ + BFD_SEND (abfd, _bfd_find_nearest_line_with_alt, \ + (abfd, alt_filename, syms, sec, off, file, func, line, disc)) + #define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \ line, disc) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ @@ -7554,6 +7559,7 @@ typedef struct bfd_target NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ + NAME##_find_nearest_line_with_alt, \ NAME##_find_line, \ NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ @@ -7584,6 +7590,11 @@ typedef struct bfd_target struct bfd_section *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); + bool (*_bfd_find_nearest_line_with_alt) (bfd *, const char *, + struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); bool (*_bfd_find_line) (bfd *, struct bfd_symbol **, struct bfd_symbol *, const char **, unsigned int *); -- cgit v1.1