aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1998-09-16 21:59:01 +0000
committerStu Grossman <grossman@cygnus>1998-09-16 21:59:01 +0000
commit082a0803b1bf95835f61b30582a1ece85dba2c13 (patch)
tree83c268d45c67c055f6aed7a489b91b60a84ff9ab
parent9c682261653618cc4fed8adbe6ff2b1628e12b1d (diff)
downloadfsf-binutils-gdb-082a0803b1bf95835f61b30582a1ece85dba2c13.zip
fsf-binutils-gdb-082a0803b1bf95835f61b30582a1ece85dba2c13.tar.gz
fsf-binutils-gdb-082a0803b1bf95835f61b30582a1ece85dba2c13.tar.bz2
* stabsread.c (resolve_symbol_reference): Return 1 on success, 0 on
failure. * (define_symbol): Check return value from resolve_symbol_reference, and drop symbol if it fails.
-rw-r--r--gdb/ChangeLog23
-rw-r--r--gdb/stabsread.c11
2 files changed, 29 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3712db9..e7f0f8d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,26 @@
+Wed Sep 16 14:57:14 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
+
+ * stabsread.c (resolve_symbol_reference): Return 1 on success, 0 on
+ failure.
+ * (define_symbol): Check return value from resolve_symbol_reference,
+ and drop symbol if it fails.
+
+Tue Sep 15 15:24:16 1998 Stu Grossman <grossman@fencer.cygnus.com>
+
+ * stabsread.c: Make all complaints static.
+ * Fix formatting of live range splitting code.
+ * (resolve_symbol_reference define_symbol resolve_live_range): Change
+ errors to complaints so that bad live range symbols won't abort the
+ entire symbol table. Handle errors by aborting just the current
+ symbol.
+ * (ref_init): Goes away. Folded into ref_add().
+ * (REF_MAP_SIZE): Put parens around parameter so that args like
+ `1 + 2' get handled correctly (yes, this was a real bug).
+ * (ref_add): Remove check for allocation failures. Not necessary
+ when using xrealloc(). Fix pointer arithmetic problem when clearing
+ memory. This and the previous patch prevent random SEGV's when there
+ are lots of live range symbols.
+
Tue Sep 15 14:02:01 1998 Nick Clifton <nickc@cygnus.com>
* remote-rdi.c: Prevent multiple attempts to close the remote
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 4e48280..f1575ad 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1044,7 +1044,7 @@ resolve_cfront_continuation (objfile, sym, p)
/* This routine fixes up symbol references/aliases to point to the original
- symbol definition. */
+ symbol definition. Returns 0 on failure, non-zero on success. */
static int
resolve_symbol_reference (objfile, sym, p)
@@ -1133,8 +1133,8 @@ resolve_symbol_reference (objfile, sym, p)
/* Get to the end of the list. */
for (temp = SYMBOL_ALIASES (ref_sym);
- temp->next;
- temp = temp->next);
+ temp->next;
+ temp = temp->next)
;
temp->next = alias;
}
@@ -1146,7 +1146,7 @@ resolve_symbol_reference (objfile, sym, p)
SYMBOL_NAME (sym) = SYMBOL_NAME (ref_sym);
/* Done! */
- return 0;
+ return 1;
}
/* Structure for storing pointers to reference definitions for fast lookup
@@ -1392,7 +1392,8 @@ define_symbol (valu, string, desc, type, objfile)
if (refnum >= 0)
ref_add (refnum, sym, string, SYMBOL_VALUE (sym));
else
- resolve_symbol_reference (objfile, sym, string);
+ if (!resolve_symbol_reference (objfile, sym, string))
+ return NULL;
/* S..P contains the name of the symbol. We need to store
the correct name into SYMBOL_NAME. */