* dwarf2dbg.c (get_filenum): Skip as-yet unassigned file numbers.

(out_file_list): Assign non-null filename after generating error.
This commit is contained in:
Richard Henderson 2003-04-21 18:23:25 +00:00
parent 04714b914f
commit 88b4ca4072
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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;
}