From 4137c5fc0d1b24d00ceec0981ea5d9da77477f0e Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Sun, 27 Oct 1991 22:26:02 +0000 Subject: * 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. --- gdb/symtab.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/symtab.c') diff --git a/gdb/symtab.c b/gdb/symtab.c index 81f7ec1..709559c 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1489,6 +1489,8 @@ find_pc_line (pc, notcurrent) { /* Find the best line in this symtab. */ l = LINETABLE (s); + if (!l) + continue; len = l->nitems; prev_line = -1; first_line = -1; @@ -1638,6 +1640,8 @@ find_line_common (l, lineno, exact_match) if (lineno <= 0) return -1; + if (l == 0) + return -1; len = l->nitems; for (i = 0; i < len; i++) -- cgit v1.1