aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1991-12-27 21:11:37 +0000
committerPer Bothner <per@bothner.com>1991-12-27 21:11:37 +0000
commitaab77d5f23a8d3f54c1976bb54d944065c45eb34 (patch)
treec30ae4ca1825c2a6db908e9424aafa923209c05b /gdb/dbxread.c
parentf3b7efd5b67fd3c5bc150650b16191fa6c86bfb0 (diff)
downloadgdb-aab77d5f23a8d3f54c1976bb54d944065c45eb34.zip
gdb-aab77d5f23a8d3f54c1976bb54d944065c45eb34.tar.gz
gdb-aab77d5f23a8d3f54c1976bb54d944065c45eb34.tar.bz2
More changes, mostly cleanups from the last set.
Made some more progress in removing duplicate assembly opcode files. More improvements to how mipsread and to a lesser extent dbxread work. See the ChangeLog for details.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index c80ff16..0124667 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -560,11 +560,8 @@ fill_symbuf (sym_bfd)
(a \ at the end of the text of a name)
call this function to get the continuation. */
-#ifdef READ_MIPS_FORMAT
-extern char *next_symbol_text ();
-#else
char *
-next_symbol_text ()
+dbx_next_symbol_text ()
{
if (symbuf_idx == symbuf_end)
fill_symbuf (symfile_bfd);
@@ -572,7 +569,6 @@ next_symbol_text ()
SWAP_SYMBOL(&symbuf[symbuf_idx], symfile_bfd);
return symbuf[symbuf_idx++].n_strx + stringtab_global;
}
-#endif
/* Initializes storage for all of the partial symbols that will be
created by read_dbx_symtab and subsidiaries. */
@@ -734,6 +730,7 @@ read_dbx_symtab (addr, objfile, stringtab, stringtab_size, nlistlen,
symfile_bfd = objfile->obfd; /* For next_text_symbol */
abfd = objfile->obfd;
symbuf_end = symbuf_idx = 0;
+ next_symbol_text_func = dbx_next_symbol_text;
for (symnum = 0; symnum < nlistlen; symnum++)
{
@@ -775,23 +772,11 @@ read_dbx_symtab (addr, objfile, stringtab, stringtab_size, nlistlen,
#define CUR_SYMBOL_TYPE bufp->n_type
#define CUR_SYMBOL_VALUE bufp->n_value
#define DBXREAD_ONLY
-#define CHECK_SECOND_N_SO() \
- if (symbuf_idx == symbuf_end) \
- fill_symbuf (abfd);\
- bufp = &symbuf[symbuf_idx];\
- /* n_type is only a char, so swapping swapping is irrelevant. */\
- if (CUR_SYMBOL_TYPE == (unsigned char)N_SO)\
- {\
- SWAP_SYMBOL (bufp, abfd);\
- SET_NAMESTRING ();\
- valu = CUR_SYMBOL_VALUE;\
- symbuf_idx++;\
- symnum++;\
- }
#define START_PSYMTAB(ofile,addr,fname,low,symoff,global_syms,static_syms)\
start_psymtab(ofile, addr, fname, low, symoff, global_syms, static_syms)
#define END_PSYMTAB(pst,ilist,ninc,c_off,c_text,dep_list,n_deps)\
end_psymtab(pst,ilist,ninc,c_off,c_text,dep_list,n_deps)
+
#include "partial-stab.h"
}
@@ -1149,6 +1134,8 @@ dbx_psymtab_to_symtab (pst)
/* FIXME POKING INSIDE BFD DATA STRUCTURES */
symbol_size = obj_symbol_entry_size (sym_bfd);
+ next_symbol_text_func = dbx_next_symbol_text;
+
/* FIXME, this uses internal BFD variables. See above in
dbx_symbol_file_open where the macro is defined! */
psymtab_to_symtab_1 (pst, stringtab, stsize,