aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--gdb/ChangeLog54
-rw-r--r--gdb/coffread.c11
-rw-r--r--gdb/symtab.c10
3 files changed, 69 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0a04536..a065671 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,57 @@
+Sat Apr 20 21:42:47 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
+
+ * symtab.c (various): Change error return of find_line_common to -1.
+
+ * coffread.c (find_linenos): Use LINESZ not sizeof (struct lineno).
+
+ * coffread.c (end_symtab): Initialize language, dirname, and
+ fullname fields.
+
+Fri Apr 19 18:18:31 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
+
+ * mips-tdep.c (mips_frame_chain): Don't chain if saved_pc == 0.
+
+ * stddef.h (size_t): Let either _SIZE_T or _SIZE_T_ guard it.
+
+ * mipsread.c (parse_symbol): Set startup_file_{start,end} if
+ entry_point is in current file.
+
+ * findvar.c (read_register_gen): Add "target byte-order" comment.
+
+Wed Apr 17 17:09:48 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
+
+ * i386-tdep.c (i386_get_frame_setup): Use SWAP_TARGET_AND_HOST
+ before returning locals or slocals.
+
+ * i386-tdep.c (i386_follow_jump): Do not add data16 to pos in
+ call to codestream_seek; add one to pos if (and only if)
+ we are dealing with a jump with data16 == 1 (i.e. 0x66, 0xe9).
+
+Mon Apr 15 12:04:32 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
+
+ * valops.c (call_function_by_hand): Put dummy1 in target order
+ before FIX_CALL_DUMMY.
+
+ * tm-i386v.h (FIX_CALL_DUMMY): Don't depend on host byte order.
+
+Sun Apr 14 11:55:19 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
+
+ * valops.c (push_word): Add SWAP_TARGET_AND_HOST.
+
+ * remote.c (remote_open): Send '+' before calling putpkt().
+
+ * tm-i386v.h (REGISTER_VIRTUAL_TYPE): Return pointer to void,
+ not int, for pc, fp, and sp.
+
+ * remote.c (remote_open): Call start_remote after putpkt("?");
+ infrun.c (start_remote): Also call wait_for_inferior & normal_stop.
+
+Sat Apr 13 22:11:42 1991 Jim Kingdon (kingdon at spiff.cygnus.com)
+
+ * exec.c: Include <ctype.h>.
+
+ * sun3-xdep.c (fetch_core_registers): Add #ifdef FP0_REGNUM.
+
Fri Apr 19 09:36:50 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
* tm-68k.h (NUM_REGS): Conditionalize on TARGET_SUN3 not sun.
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! */
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 96c751f..0e77e7f 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1371,7 +1371,7 @@ find_line_pc (symtab, line)
return 0;
l = LINETABLE (symtab);
ind = find_line_common(l, line, &dummy);
- return ind ? l->item[ind].pc : 0;
+ return (ind >= 0) ? l->item[ind].pc : 0;
}
/* Find the range of pc values in a line.
@@ -1395,7 +1395,7 @@ find_line_pc_range (symtab, thisline, startptr, endptr)
l = LINETABLE (symtab);
ind = find_line_common (l, thisline, &exact_match);
- if (ind)
+ if (ind >= 0)
{
*startptr = l->item[ind].pc;
/* If we have not seen an entry for the specified line,
@@ -1418,7 +1418,7 @@ find_line_pc_range (symtab, thisline, startptr, endptr)
/* Given a line table and a line number, return the index into the line
table for the pc of the nearest line whose number is >= the specified one.
- Return 0 if none is found. The value is never zero is it is an index.
+ Return -1 if none is found. The value is >= 0 if it is an index.
Set *EXACT_MATCH nonzero if the value returned is an exact match. */
@@ -1435,11 +1435,11 @@ find_line_common (l, lineno, exact_match)
or 0 if none has been seen so far.
BEST_INDEX identifies the item for it. */
- int best_index = 0;
+ int best_index = -1;
int best = 0;
if (lineno <= 0)
- return 0;
+ return -1;
len = l->nitems;
for (i = 0; i < len; i++)