]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2003-08-08 Elena Zannoni <ezannoni@redhat.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Fri, 8 Aug 2003 14:04:02 +0000 (14:04 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Fri, 8 Aug 2003 14:04:02 +0000 (14:04 +0000)
* symtab.c (lookup_symbol_aux): Make sure that is_a_field_of_this
contains something meaningful at all times.

gdb/ChangeLog
gdb/symtab.c

index dd3160299ea4737f6d5dcabc46a2038a3368524a..939eb219beea3eccbc7f4b8d5017830eee284930 100644 (file)
@@ -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.
 
index ddf8748b7d44d313ad1a08832b01811384ef5291..48afabb7fbd4c33609cdc6e96a1653fa9611339d 100644 (file)
@@ -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;