|
|
@ -205,6 +205,8 @@ static void enter_linenos PARAMS ((long, int, int, struct objfile *)); |
|
|
|
|
|
|
|
|
static void free_linetab PARAMS ((void)); |
|
|
static void free_linetab PARAMS ((void)); |
|
|
|
|
|
|
|
|
|
|
|
static void free_linetab_cleanup (void *ignore); |
|
|
|
|
|
|
|
|
static int init_lineno PARAMS ((bfd *, long, int)); |
|
|
static int init_lineno PARAMS ((bfd *, long, int)); |
|
|
|
|
|
|
|
|
static char *getsymname PARAMS ((struct internal_syment *)); |
|
|
static char *getsymname PARAMS ((struct internal_syment *)); |
|
|
@ -213,6 +215,8 @@ static char *coff_getfilename PARAMS ((union internal_auxent *)); |
|
|
|
|
|
|
|
|
static void free_stringtab PARAMS ((void)); |
|
|
static void free_stringtab PARAMS ((void)); |
|
|
|
|
|
|
|
|
|
|
|
static void free_stringtab_cleanup (void *ignore); |
|
|
|
|
|
|
|
|
static int init_stringtab PARAMS ((bfd *, long)); |
|
|
static int init_stringtab PARAMS ((bfd *, long)); |
|
|
|
|
|
|
|
|
static void read_one_sym PARAMS ((struct coff_symbol *, |
|
|
static void read_one_sym PARAMS ((struct coff_symbol *, |
|
|
@ -656,7 +660,7 @@ coff_symfile_read (objfile, mainline) |
|
|
info->max_lineno_offset = 0; |
|
|
info->max_lineno_offset = 0; |
|
|
bfd_map_over_sections (abfd, find_linenos, (PTR) info); |
|
|
bfd_map_over_sections (abfd, find_linenos, (PTR) info); |
|
|
|
|
|
|
|
|
make_cleanup ((make_cleanup_func) free_linetab, 0); |
|
|
make_cleanup (free_linetab_cleanup, 0 /*ignore*/); |
|
|
val = init_lineno (abfd, info->min_lineno_offset, |
|
|
val = init_lineno (abfd, info->min_lineno_offset, |
|
|
info->max_lineno_offset - info->min_lineno_offset); |
|
|
info->max_lineno_offset - info->min_lineno_offset); |
|
|
if (val < 0) |
|
|
if (val < 0) |
|
|
@ -664,7 +668,7 @@ coff_symfile_read (objfile, mainline) |
|
|
|
|
|
|
|
|
/* Now read the string table, all at once. */ |
|
|
/* Now read the string table, all at once. */ |
|
|
|
|
|
|
|
|
make_cleanup ((make_cleanup_func) free_stringtab, 0); |
|
|
make_cleanup (free_stringtab_cleanup, 0 /*ignore*/); |
|
|
val = init_stringtab (abfd, stringtab_offset); |
|
|
val = init_stringtab (abfd, stringtab_offset); |
|
|
if (val < 0) |
|
|
if (val < 0) |
|
|
error ("\"%s\": can't get string table", name); |
|
|
error ("\"%s\": can't get string table", name); |
|
|
@ -1287,6 +1291,12 @@ free_stringtab () |
|
|
stringtab = NULL; |
|
|
stringtab = NULL; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
|
free_stringtab_cleanup (void *ignore) |
|
|
|
|
|
{ |
|
|
|
|
|
free_stringtab (); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
static char * |
|
|
static char * |
|
|
getsymname (symbol_entry) |
|
|
getsymname (symbol_entry) |
|
|
struct internal_syment *symbol_entry; |
|
|
struct internal_syment *symbol_entry; |
|
|
@ -1388,6 +1398,12 @@ free_linetab () |
|
|
linetab = NULL; |
|
|
linetab = NULL; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
|
free_linetab_cleanup (void *ignore) |
|
|
|
|
|
{ |
|
|
|
|
|
free_linetab (); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#if !defined (L_LNNO32) |
|
|
#if !defined (L_LNNO32) |
|
|
#define L_LNNO32(lp) ((lp)->l_lnno) |
|
|
#define L_LNNO32(lp) ((lp)->l_lnno) |
|
|
#endif |
|
|
#endif |
|
|
|