aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1991-04-21 05:17:05 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1991-04-21 05:17:05 +0000
commitb203fc1803219d5eb29b0a3dcc0b07143ce4a836 (patch)
tree710a3f242087099ab287ffe72567e5e060cdd349 /gdb/coffread.c
parent98885d766ec6a495760d87d8677fca99b9efc91a (diff)
downloadgdb-b203fc1803219d5eb29b0a3dcc0b07143ce4a836.zip
gdb-b203fc1803219d5eb29b0a3dcc0b07143ce4a836.tar.gz
gdb-b203fc1803219d5eb29b0a3dcc0b07143ce4a836.tar.bz2
* coffread.c (find_linenos): Use LINESZ not sizeof (struct lineno).
* coffread.c (end_symtab): Initialize language, dirname, and fullname fields.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 68eed37..3dcb2d1 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -512,6 +512,7 @@ end_symtab ()
symtab->blockvector = blockvector;
symtab->free_code = free_linetable;
symtab->filename = last_source_file;
+ symtab->dirname = NULL;
lv = line_vector;
lv->nitems = line_vector_index;
symtab->linetable = (struct linetable *)
@@ -520,6 +521,9 @@ end_symtab ()
symtab->nlines = 0;
symtab->line_charpos = 0;
+ symtab->language = language_unknown;
+ symtab->fullname = NULL;
+
#ifdef TDESC
symtab->coffsem = last_coffsem;
symtab->coffsyn = last_coffsyn;
@@ -624,7 +628,12 @@ find_linenos (abfd, asect, vpinfo)
if (count == 0)
return;
- size = count * sizeof (struct lineno);
+#if !defined (LINESZ)
+/* Just in case, you never know what to expect from those
+ COFF header files. */
+#define LINESZ (sizeof (struct lineno))
+#endif /* No LINESZ. */
+ size = count * LINESZ;
info = (struct coff_symfile_info *)vpinfo;
/* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */