From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Andrew Cagney Cc: Jim Blandy , Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] gdb extension for Harvard architectures Date: Wed, 03 Oct 2001 16:17:00 -0000 Message-id: References: <3BB4D843.A92818B9@cygnus.com> <3BB512A9.6050801@cygnus.com> <3BB5195F.6050603@cygnus.com> <3BBB50C0.BD01BF20@cygnus.com> <3BBB5391.4010001@cygnus.com> <3BBB86B6.8090809@cygnus.com> X-SW-Source: 2001-10/msg00073.html Andrew Cagney writes: > > - that we make GDB evaluate expressions like `(int *) &main' differently > > from the way the compiler does. > > and that this isn't defined at all. It does have a loose definition on > unified address space architectures. Is is defined --- not by the standard, but by GCC. It is very important that GDB's expression evaluation match GCC's. > > Those set off warning bells, for me. You can special-case this stuff > > to make the naive user's behavior do the right thing want all you > > want. If you've ever had Microsoft Word correct your capitalization > > or automatically munge your paragraph formatting, you know what the > > resulting systems feel like to use. > > Have a look at the way GDB vs GCC implements ``func + 4'' for AIX. We > do this now. And indeed, that discrepancy is undesirable, right? We should not introduce more.