summaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-10-26 16:08:20 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-10-26 16:08:20 +0000
commitf4a870dba863de8c251205cc6632ed7880be9da4 (patch)
tree84be8edbfff4bb56a60e01cc901a0a558254565d /gdb/stabsread.c
parentddf33bc06d4d5b5030d80edf60b3d0efbed496a3 (diff)
downloadgdb-f4a870dba863de8c251205cc6632ed7880be9da4.tar.gz
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.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 7c374af9502..fb1a1843db2 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -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);