aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-06-06 14:28:31 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-06-06 14:28:31 +0000
commit5420f73dbbafa8009dcab94ef1787ce8c848d571 (patch)
tree87ed3f3fc648b0c3d34ab9a8538389811cb23b5d /binutils
parentb42f9a05b66c1135b09de2a5e5c39b3101ff0928 (diff)
downloadgdb-5420f73dbbafa8009dcab94ef1787ce8c848d571.zip
gdb-5420f73dbbafa8009dcab94ef1787ce8c848d571.tar.gz
gdb-5420f73dbbafa8009dcab94ef1787ce8c848d571.tar.bz2
bfd/
2005-06-06 H.J. Lu <hongjiu.lu@intel.com> PR 990 * bfd.c (bfd_find_line): New. * dwarf2.c (comp_unit): Add variable_table. (funcinfo): Add file, line, and sec. (varinfo): New. (lookup_symbol_in_function_table): New. (lookup_symbol_in_variable_table): New. (scan_unit_for_functions): Renamed to ... (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and DW_TAG_variable. (comp_unit_find_nearest_line): Updated. (comp_unit_find_line): New. (_bfd_dwarf2_find_line): New. * elf-bfd.h (_bfd_elf_find_line): New. (_bfd_generic_find_line): New. Defined. * elf.c (_bfd_elf_find_line): New. * libbfd-in.h (_bfd_dwarf2_find_line): New. (_bfd_generic_find_line): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. * libbfd.c (_bfd_generic_find_line): New. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line with _bfd_generic_find_line. (bfd_target): Add _bfd_find_line. binutils/ 2005-06-06 H.J. Lu <hongjiu.lu@intel.com> PR 990 * nm.c (print_symbol): Call bfd_find_line before bfd_find_nearest_line.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/nm.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 7b93900..8018ed9 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 990
+ * nm.c (print_symbol): Call bfd_find_line before
+ bfd_find_nearest_line.
+
2005-06-06 Alan Modra <amodra@bigpond.net.au>
* NEWS: Mention new powerpc ld support.
diff --git a/binutils/nm.c b/binutils/nm.c
index 511e6d3..999a6db 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -905,9 +905,10 @@ print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd)
}
else if (bfd_get_section (sym)->owner == abfd)
{
- if (bfd_find_nearest_line (abfd, bfd_get_section (sym), syms,
- sym->value, &filename, &functionname,
- &lineno)
+ if ((bfd_find_line (abfd, syms, sym, &filename, &lineno)
+ || bfd_find_nearest_line (abfd, bfd_get_section (sym),
+ syms, sym->value, &filename,
+ &functionname, &lineno))
&& filename != NULL
&& lineno != 0)
printf ("\t%s:%u", filename, lineno);