aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1991-05-02 04:28:42 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1991-05-02 04:28:42 +0000
commite1ce8aa5ed46310d716472d19d2e87da2833d599 (patch)
treecacaf1a83d8e388b049c2b3bc454f311dd34b6e2 /gdb/dbxread.c
parent04a0511c0af3d07f7b4587fbf4715d2b956f1fad (diff)
downloadgdb-e1ce8aa5ed46310d716472d19d2e87da2833d599.zip
gdb-e1ce8aa5ed46310d716472d19d2e87da2833d599.tar.gz
gdb-e1ce8aa5ed46310d716472d19d2e87da2833d599.tar.bz2
The list of changes is too long to fit in the cvs log (since it truncates!).
Look at the ChangeLog for Apr 30 and May 1.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 5abe56e..6c79982 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -769,7 +769,9 @@ really_free_pendings (foo)
int foo;
{
struct pending *next, *next1;
+#if 0
struct pending_block *bnext, *bnext1;
+#endif
for (next = free_pendings; next; next = next1)
{
@@ -1252,6 +1254,11 @@ record_misc_function (name, address, type)
address, misc_type);
}
+/* The BFD for this file -- only good while we're actively reading
+ symbols into a psymtab or a symtab. */
+
+static bfd *symfile_bfd;
+
/* Scan and build partial symbols for a symbol file.
We have been initialized by a call to dbx_symfile_init, which
put all the relevant info into a "struct dbx_symfile_info"
@@ -2888,7 +2895,7 @@ read_ofile_symtab (desc, stringtab, stringtab_size, sym_offset,
if (type & N_STAB)
{
- short desc = bufp->n_desc;
+ short bufp_n_desc = bufp->n_desc;
unsigned long valu = bufp->n_value;
/* Check for a pair of N_SO symbols. */
@@ -2912,15 +2919,15 @@ read_ofile_symtab (desc, stringtab, stringtab_size, sym_offset,
bufp->n_un.n_strx);
namestring2 = bufp->n_un.n_strx + stringtab;
- process_symbol_pair (N_SO, desc, valu, namestring,
+ process_symbol_pair (N_SO, bufp_n_desc, valu, namestring,
N_SO, bufp->n_desc, bufp->n_value,
namestring2);
}
else
- process_one_symbol(type, desc, valu, namestring);
+ process_one_symbol(type, bufp_n_desc, valu, namestring);
}
else
- process_one_symbol (type, desc, valu, namestring);
+ process_one_symbol (type, bufp_n_desc, valu, namestring);
}
/* We skip checking for a new .o or -l file; that should never
happen in this routine. */
@@ -3377,13 +3384,14 @@ define_symbol (valu, string, desc, type)
case 'r':
{
double d = atof (p);
- char *valu;
+ char *dbl_valu;
SYMBOL_TYPE (sym) = builtin_type_double;
- valu = (char *) obstack_alloc (symbol_obstack, sizeof (double));
- bcopy (&d, valu, sizeof (double));
- SWAP_TARGET_AND_HOST (valu, sizeof (double));
- SYMBOL_VALUE_BYTES (sym) = valu;
+ dbl_valu =
+ (char *) obstack_alloc (symbol_obstack, sizeof (double));
+ bcopy (&d, dbl_valu, sizeof (double));
+ SWAP_TARGET_AND_HOST (dbl_valu, sizeof (double));
+ SYMBOL_VALUE_BYTES (sym) = dbl_valu;
SYMBOL_CLASS (sym) = LOC_CONST_BYTES;
}
break;
@@ -3433,7 +3441,7 @@ define_symbol (valu, string, desc, type)
}
else
{
- struct type *type;
+ struct type *type_read;
synonym = *p == 't';
if (synonym)
@@ -3443,13 +3451,13 @@ define_symbol (valu, string, desc, type)
strlen (SYMBOL_NAME (sym)));
}
- type = read_type (&p);
+ type_read = read_type (&p);
if ((deftype == 'F' || deftype == 'f')
- && TYPE_CODE (type) != TYPE_CODE_FUNC)
- SYMBOL_TYPE (sym) = lookup_function_type (type);
+ && TYPE_CODE (type_read) != TYPE_CODE_FUNC)
+ SYMBOL_TYPE (sym) = lookup_function_type (type_read);
else
- SYMBOL_TYPE (sym) = type;
+ SYMBOL_TYPE (sym) = type_read;
}
switch (deftype)
@@ -4330,7 +4338,8 @@ read_struct_type (pp, type)
/* Special GNU C++ name. */
if (*++p == 'v')
{
- char *prefix, *name = 0;
+ const char *prefix;
+ char *name = 0;
struct type *context;
switch (*++p)