aboutsummaryrefslogtreecommitdiff
path: root/binutils/nm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-05-01 06:43:32 +0000
committerAlan Modra <amodra@gmail.com>2002-05-01 06:43:32 +0000
commitdd70071f8b84788aae196c6e07924a8526e76b59 (patch)
treef8a139329abba7cf8c068dee50f3726d24282760 /binutils/nm.c
parentaf566d9f8ce9121ba79c13c0b38eb5b2b98e0341 (diff)
downloadgdb-dd70071f8b84788aae196c6e07924a8526e76b59.zip
gdb-dd70071f8b84788aae196c6e07924a8526e76b59.tar.gz
gdb-dd70071f8b84788aae196c6e07924a8526e76b59.tar.bz2
* nm.c (print_symbol): Check returned filename from
bfd_find_nearest_line is non-NULL.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r--binutils/nm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/nm.c b/binutils/nm.c
index 68eae77..eb8a55f 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -1291,7 +1291,8 @@ print_symbol (abfd, sym, archive_bfd)
bfd_asymbol_name (*r->sym_ptr_ptr)) == 0
&& bfd_find_nearest_line (abfd, secs[i], syms,
r->address, &filename,
- &functionname, &lineno))
+ &functionname, &lineno)
+ && filename != NULL)
{
/* We only print the first one we find. */
printf ("\t%s:%u", filename, lineno);