diff options
author | John Gilmore <gnu@cygnus> | 1991-10-27 22:26:02 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-10-27 22:26:02 +0000 |
commit | 4137c5fc0d1b24d00ceec0981ea5d9da77477f0e (patch) | |
tree | 1d01de4d5f225bdcd8cc81ac88c4cc022a7c7ba2 /gdb/symmisc.c | |
parent | 9439f48f4c52cd82eca522aea847e0a330568235 (diff) | |
download | gdb-4137c5fc0d1b24d00ceec0981ea5d9da77477f0e.zip gdb-4137c5fc0d1b24d00ceec0981ea5d9da77477f0e.tar.gz gdb-4137c5fc0d1b24d00ceec0981ea5d9da77477f0e.tar.bz2 |
* buildsym.c: Break out initial malloc sizes.
(record_line): Record directly in a subfile. Alloc on demand.
(compare_line_numbers): Add from xcoffread.c.
(end_symtab): New params say whether to sort pendings and
linetable. Patch block stabs if defined. Shrink linetable before
allocating the symtab.
* buildsym.h: Delete line_vector* and prev_line_number. Add
global_stabs and file_stabs for xcoffread.
* dbxread.c (start_subfile): Move to buildsym. Change above calls.
* symtab.h: LINETABLE(symtab) can now be null. Zap LINELIST.
* symmisc.c, symtab.c: Cope with null LINETABLEs.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r-- | gdb/symmisc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c index fbcc79d..04d3759 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -172,13 +172,15 @@ print_symtabs (filename) for (s = symtab_list; s; s = s->next) { /* First print the line table. */ - fprintf (outfile, "Symtab for file %s\n\n", s->filename); - fprintf (outfile, "Line table:\n\n"); + fprintf (outfile, "Symtab for file %s\n", s->filename); l = LINETABLE (s); - len = l->nitems; - for (i = 0; i < len; i++) - fprintf (outfile, " line %d at %x\n", l->item[i].line, - l->item[i].pc); + if (l) { + fprintf (outfile, "\nLine table:\n\n"); + len = l->nitems; + for (i = 0; i < len; i++) + fprintf (outfile, " line %d at %x\n", l->item[i].line, + l->item[i].pc); + } /* Now print the block info. */ fprintf (outfile, "\nBlockvector:\n\n"); bv = BLOCKVECTOR (s); |