This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFC] pascal pointer type names
- To: ezannoni at cygnus dot com (Elena Zannoni)
- Subject: Re: [PATCH RFC] pascal pointer type names
- From: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- Date: Wed, 25 Oct 2000 22:51:25 MET DST
- Cc: gdb-patches at sourceware dot cygnus dot com, jimb at cygnus dot com
> Pierre, this code has me puzzled as well. I tried a few examples in C,
> and I am still not sure what the intended effect is. I disabled the
> code in my sandbox and I saw no differences in testsuite runs. Which
> per se is not a very meaningful data point. The code has been
> introduced in 93 and modified in 94. So I don't really know if it is
> still needed. Any old timers out there?
:-)
I suspect that you have go back to a gcc version < 2.8 or use SunOS4 cc
to see a regression when you disable the code.
As gcc-2.7.2.x might be still in use, I'd recommend against disabling
this piece of code generally (perhaps you want to update the comment that
this is fixed with gcc-2.8 and above, so we can get rid of it in 2007).
Below is an old bug report explaining the issue, which ultimately led to:
Wed May 26 10:28:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* stabsread.c (define_symbol, case 't'): Only set the name if it
is not a pointer type.
From pes Wed May 26 12:29:31 1993
Subject: Bug with printing of typedefed types introduced after 930516
To: kingdon@cygnus.com
Date: Wed, 26 May 93 12:29:31 MET DST
X-Mailer: ELM [version 2.3 PL6]
Status: OR
The change to the dbx fundamental types between 930516 and 930524 re-introduced
an old bug (I believe it was in 4.5) with typedefs. This bug is obviously not
caught by the testsuite. Here is an example:
pes@red_505$ cat dbxbug.c
/* type for name1 becomes caddr_t, func becomes char() */
typedef char *caddr_t;
char *name2;
struct x
{
char *name1;
} xx;
char *func()
{
}
main () {}
pes@red_506$ gcc -g dbxbug.c
pes@red_507$ gdbnd.bak a.out
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 930516, Copyright 1993 Free Software Foundation, Inc...
(gdb) ptype func
type = char *()
(gdb) ptype xx
type = struct x {
char *name1;
}
(gdb) q
pes@red_508$ gdbnd a.out
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 930524, Copyright 1993 Free Software Foundation, Inc...
(gdb) ptype func
type = char ()
(gdb) ptype xx
type = struct x {
caddr_t name1;
}
(gdb) q
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de