aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-08-08 14:04:02 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-08-08 14:04:02 +0000
commit9a146a111fcdf46255451553ef8be9bb571e5853 (patch)
treef61ce54dee1b6b0bb6928decafcbd57955252d06
parent3b260895e34c44f647aac36633959733e020e7fa (diff)
downloadgdb-9a146a111fcdf46255451553ef8be9bb571e5853.zip
gdb-9a146a111fcdf46255451553ef8be9bb571e5853.tar.gz
gdb-9a146a111fcdf46255451553ef8be9bb571e5853.tar.bz2
2003-08-08 Elena Zannoni <ezannoni@redhat.com>
* symtab.c (lookup_symbol_aux): Make sure that is_a_field_of_this contains something meaningful at all times.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/symtab.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dd31602..939eb21 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,4 +1,9 @@
-Mon Jul 21 20:10:16 UTC 2003 Brendan Conoboy <blc@redhat.com>
+2003-08-08 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.c (lookup_symbol_aux): Make sure that is_a_field_of_this
+ contains something meaningful at all times.
+
+Fri Aug 8 00:28:46 UTC 2003 Brendan Conoboy <blc@redhat.com>
* configure.host: Set gdb_host_cpu=arm when host_cpu=xscale.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index ddf8748..48afabb 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -945,6 +945,14 @@ lookup_symbol_aux (const char *name, const char *linkage_name,
{
struct symbol *sym;
+ /* Make sure we do something sensible with is_a_field_of_this, since
+ the callers that set this parameter to some non-null value will
+ certainly use it later and expect it to be either 0 or 1.
+ If we don't set it, the contents of is_a_field_of_this are
+ undefined. */
+ if (is_a_field_of_this != NULL)
+ *is_a_field_of_this = 0;
+
/* Search specified block and its superiors. Don't search
STATIC_BLOCK or GLOBAL_BLOCK. */
@@ -961,7 +969,6 @@ lookup_symbol_aux (const char *name, const char *linkage_name,
{
struct value *v = current_language->la_value_of_this (0);
- *is_a_field_of_this = 0;
if (v && check_field (v, name))
{
*is_a_field_of_this = 1;