diff options
author | Richard Henderson <rth@redhat.com> | 2003-04-21 18:23:25 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2003-04-21 18:23:25 +0000 |
commit | 88b4ca40728bd25b9e39c4d146fcbf8dd78149d9 (patch) | |
tree | e3949935031ec297b7156befe1152cb6f9f88b04 /gas | |
parent | 04714b914fe6e2deaf384c77a286df8e95545a73 (diff) | |
download | gdb-88b4ca40728bd25b9e39c4d146fcbf8dd78149d9.zip gdb-88b4ca40728bd25b9e39c4d146fcbf8dd78149d9.tar.gz gdb-88b4ca40728bd25b9e39c4d146fcbf8dd78149d9.tar.bz2 |
* dwarf2dbg.c (get_filenum): Skip as-yet unassigned file numbers.
(out_file_list): Assign non-null filename after generating error.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/dwarf2dbg.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 49a22c0..01e9528 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2003-04-21 Richard Henderson <rth@redhat.com> + + * dwarf2dbg.c (get_filenum): Skip as-yet unassigned file numbers. + (out_file_list): Assign non-null filename after generating error. + 2003-04-18 Jakub Jelinek <jakub@redhat.com> * ehopt.c (check_eh_frame): For aug_size == 0 diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index 3b863cd..e58f73a 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -411,6 +411,7 @@ get_filenum (filename, num) { for (i = 1; i < files_in_use; ++i) if (files[i].dir == dir + && files[i].filename && strcmp (file, files[i].filename) == 0) { last_used = i; @@ -1089,6 +1090,8 @@ out_file_list () if (files[i].filename == NULL) { as_bad (_("unassigned file number %ld"), (long) i); + /* Prevent a crash later, particularly for file 1. */ + files[i].filename = ""; continue; } |