2000-10-26 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Thu, 26 Oct 2000 16:08:20 +0000 (16:08 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Thu, 26 Oct 2000 16:08:20 +0000 (16:08 +0000)
* stabsread.c (define_symbol): Update comment.

2000-10-26 Pierre Muller <muller@ics.u-strasbg.fr>

      * stabsread.c (define_symbol): Set the type_name of the type
of the new symbol to the symbol name for type symbol, if the
language is Pascal.

gdb/ChangeLog
gdb/stabsread.c

index 959e04ac405a600a580bd2431cc34c0469d9d57c..24e55bf3b2f0a9e95a701258bc7fa8eda1aef867 100644 (file)
@@ -1,3 +1,13 @@
+2000-10-26  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
+
+       * stabsread.c (define_symbol): Update comment.
+
+2000-10-26 Pierre Muller <muller@ics.u-strasbg.fr>
+
+       * stabsread.c (define_symbol): Set the type_name of the type
+       of the new symbol to the symbol name for type symbol, if the
+       language is Pascal.
+       
 2000-10-26  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
 
        * arch-utils.c, arch-utils.h (default_convert_from_func_ptr_addr):
index 7c374af9502c24a6f6ea5ec85a2e4060606ff0dd..fb1a1843db29e4e934e2e3d86134b49e3a40cb4a 100644 (file)
@@ -1953,6 +1953,27 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
 
                 Fortunately, this check seems not to be necessary
                 for anything except pointers or functions.  */
+              /* ezannoni: 2000-10-26. This seems to apply for
+                versions of gcc older than 2.8. This was the original
+                problem: with the following code gdb would tell that
+                the type for name1 is caddr_t, and func is char()
+                typedef char *caddr_t;
+                char *name2;
+                struct x
+                {
+                char *name1;
+                } xx;
+                char *func()
+                {
+                }
+                main () {}
+                */
+
+             /* Pascal accepts names for pointer types. */
+             if (current_subfile->language == language_pascal)
+               {
+                 TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_NAME (sym);
+               }
            }
          else
            TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_NAME (sym);