diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-06-23 19:20:49 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-06-23 19:20:49 +0000 |
commit | ec06a3cb25f86ac6f0e748b22ca3fefe888162e0 (patch) | |
tree | def097ea4edb8b94c54bc4210bdf4a6326a2476a /gdb/dbxread.c | |
parent | d297ca717ff22b2a828095a2ac858ab3eb3cd155 (diff) | |
download | gdb-ec06a3cb25f86ac6f0e748b22ca3fefe888162e0.zip gdb-ec06a3cb25f86ac6f0e748b22ca3fefe888162e0.tar.gz gdb-ec06a3cb25f86ac6f0e748b22ca3fefe888162e0.tar.bz2 |
* dbxread.c (copy_pending): Change name and function of begi argument
to endi, since that is what the caller needs.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r-- | gdb/dbxread.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 65a9fec..4c33fe6 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1914,23 +1914,30 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile) } /* Copy a pending list, used to record the contents of a common - block for later fixup. */ + block for later fixup. We copy the symbols starting with all + symbols in BEG, and ending with the symbols which are in + END at index ENDI. */ static struct pending * -copy_pending (beg, begi, end) +copy_pending (beg, endi, end) struct pending *beg; - int begi; + int endi; struct pending *end; { struct pending *new = 0; struct pending *next; + int j; - for (next = beg; next != 0 && (next != end || begi < end->nsyms); - next = next->next, begi = 0) + /* Copy all the struct pendings before end. */ + for (next = beg; next != NULL && next != end; next = next->next) { - register int j; - for (j = begi; j < next->nsyms; j++) + for (j = 0; j < next->nsyms; j++) add_symbol_to_list (next->symbol[j], &new); } + + /* Copy however much of END we need. */ + for (j = endi; j < end->nsyms; j++) + add_symbol_to_list (end->symbol[j], &new); + return new; } |