aboutsummaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c14
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);