aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.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/symtab.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/symtab.c')
-rw-r--r--gdb/symtab.c10
1 files changed, 5 insertions, 5 deletions
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++)