This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: C++ ptrmemfun break if FUNCTION_BOUNDARY < 2 * BITS_PER_UNIT
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: C++ ptrmemfun break if FUNCTION_BOUNDARY < 2 * BITS_PER_UNIT
- From: Daniel Berlin <dan at www dot cgsoftware dot com>
- Date: Tue, 17 Apr 2001 15:58:43 -0400 (EDT)
- cc: Alexandre Oliva <aoliva at redhat dot com>, Jim Wilson <wilson at cygnus dot com>, <gcc at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>, <gdb at sources dot redhat dot com>
On Tue, 17 Apr 2001, Andrew Cagney wrote:
> Alexandre Oliva wrote:
> >
> > On Apr 6, 2001, Jim Wilson <wilson@cygnus.com> wrote:
> >
> > >In article <ork84ys5bq.fsf@guarana.lsd.ic.unicamp.br> you write:
> >
> > >> The C++ ABI v3 uses the least significant bit of the pfn to tell
> > >> non-virtual from virtual functions.
>
> > > There are also targets that use the low-order bit of the PC to determine
> > > processor mode.
> >
> > Good point. I think this is enough of a reason for us to have a
> > target configuration flag to switch between two different
> > representations of pointers to member functions. I wonder how GDB is
> > going to be able to tell one representation from the other... Perhaps
> > it's going to have to be hard-coded in GDB?
>
> Remember, nothing in GDB is hard coded (only half :-^).
>
And when it comes to C++ stuf, i refuse to hard code any more stuff, after
just spending months cleaning up the crud from 5 years of doing that.
> Either the v3 ABI would need to specify the exact mechanism that is
> valid for ISA foo (i.e. GDB would would be wired to assume that all MIPS
> use mechanism XYZ) or the debug/object info would need to describe the
> mechanism being used so that GDB could adjust its self accordingly.
It's easiest to do this in debug info.
At least, for dwarf (I dunno how tod ot he same in stabs).
In the type die of the ptr-to-member die, just add a GCC specific
attribute that says which bit to check for virtuality, and i'll modify
gdb to handle it right (by telling the C++ ABI abstraction layer which
bit to
check)
> > Andrew >