diff options
author | Tristan Gingold <gingold@adacore.com> | 2011-09-30 10:39:45 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2011-09-30 10:39:45 +0000 |
commit | fc28f9aa231c8f3386e1c9bdb448d9cdd9cae1a9 (patch) | |
tree | d1cb8ea7d3d4aea609cdbd1dd1d509b2ecb52b2a /bfd/coffgen.c | |
parent | 9852805258de4c870df1f723bf22f21b41ebd6a7 (diff) | |
download | gdb-fc28f9aa231c8f3386e1c9bdb448d9cdd9cae1a9.zip gdb-fc28f9aa231c8f3386e1c9bdb448d9cdd9cae1a9.tar.gz gdb-fc28f9aa231c8f3386e1c9bdb448d9cdd9cae1a9.tar.bz2 |
2011-09-30 Tristan Gingold <gingold@adacore.com>
* dwarf2.c (struct dwarf2_debug): Add field debug_sections.
(read_section): Add sec argument. Adjust the code to get section
names from it.
(read_indirect_string): Adjust call to read_section.
(read_abbrevs): Ditto.
(decode_line_info): Ditto.
(read_debug_ranges): Ditto.
(DWARF2_DEBUG_INFO, DWARF2_COMPRESSED_DEBUG_INFO): Remove.
(find_debug_info): Add debug_sections parameter. Use it instead
the above macros.
(place_sections): Get section names from stash.
(find_line): Add debug_sections argument. Initialize
debug_sections field of stash from it.
Adjust calls to find_debug_info.
(_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
Adjust call to find_line.
(_bfd_dwarf2_find_line): Adjust call to find_line.
* libcoff-in.h (struct dwarf_debug_section): New declaration.
(coff_find_nearest_line_with_names): Likewise.
* libcoff.h: Regenerate.
* libbfd-in.h (struct dwarf_debug_section): Move declaration.
(dwarf_debug_sections): Likewise.
(_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
* libbfd.h: Regenerate.
* elf.c (_bfd_elf_find_nearest_line): Adjust call to
_bfd_dwarf2_find_nearest_line.
* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Ditto.
* elf64-alpha.c (elf64_alpha_find_nearest_line): Ditto.
* elf32-arm.c (elf32_arm_find_nearest_line): Ditto.
* coffgen.c (coff_find_nearest_line_with_names): New function.
(coff_find_nearest_line): Calls coff_find_nearest_line_with_names.
* coff-rs6000.c (xcoff_debug_sections): New constant.
(xcoff_find_nearest_line): New function.
(rs6000coff_vec): Use xcoff_find_nearest_line.
(pmac_xcoff_vec): Ditto.
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r-- | bfd/coffgen.c | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c index bbb0acc..2508b51 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -2085,13 +2085,14 @@ _bfd_coff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, nearest to the wanted location. */ bfd_boolean -coff_find_nearest_line (bfd *abfd, - asection *section, - asymbol **symbols, - bfd_vma offset, - const char **filename_ptr, - const char **functionname_ptr, - unsigned int *line_ptr) +coff_find_nearest_line_with_names (bfd *abfd, + const struct dwarf_debug_section *debug_sections, + asection *section, + asymbol **symbols, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, + unsigned int *line_ptr) { bfd_boolean found; unsigned int i; @@ -2116,7 +2117,8 @@ coff_find_nearest_line (bfd *abfd, return TRUE; /* Also try examining DWARF2 debugging information. */ - if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, + if (_bfd_dwarf2_find_nearest_line (abfd, debug_sections, + section, symbols, offset, filename_ptr, functionname_ptr, line_ptr, 0, &coff_data(abfd)->dwarf2_find_line_info)) @@ -2299,6 +2301,21 @@ coff_find_nearest_line (bfd *abfd, } bfd_boolean +coff_find_nearest_line (bfd *abfd, + asection *section, + asymbol **symbols, + bfd_vma offset, + const char **filename_ptr, + const char **functionname_ptr, + unsigned int *line_ptr) +{ + return coff_find_nearest_line_with_names (abfd, dwarf_debug_sections, + section, symbols, offset, + filename_ptr, functionname_ptr, + line_ptr); +} + +bfd_boolean coff_find_inliner_info (bfd *abfd, const char **filename_ptr, const char **functionname_ptr, |