This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc/cp] method stub assertions
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Michael Elizabeth Chastain <mec dot gnu at mindspring dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 4 Jan 2004 20:56:08 -0500
- Subject: Re: [rfc/cp] method stub assertions
- References: <20040105005048.A159C4B35A@berman.michael-chastain.com>
On Sun, Jan 04, 2004 at 07:50:48PM -0500, Michael Chastain wrote:
> I'm working on support for hp-ux aCC.
Good luck :)
I'll re-read your analysis tomorrow when I'm more awake, but:
> *************** evaluate_subexp_standard (struct type *e
> *** 996,1006 ****
> if (METHOD_PTR_IS_VIRTUAL (fnptr))
> {
> int fnoffset = METHOD_PTR_TO_VOFFSET (fnptr);
> ! struct type *basetype;
> struct type *domain_type =
> ! TYPE_DOMAIN_TYPE (TYPE_TARGET_TYPE (VALUE_TYPE (arg1)));
> int i, j;
> ! basetype = TYPE_TARGET_TYPE (VALUE_TYPE (arg2));
> if (domain_type != basetype)
> arg2 = value_cast (lookup_pointer_type (domain_type), arg2);
> basetype = TYPE_VPTR_BASETYPE (domain_type);
> --- 997,1011 ----
> if (METHOD_PTR_IS_VIRTUAL (fnptr))
> {
> int fnoffset = METHOD_PTR_TO_VOFFSET (fnptr);
> ! struct type *basetype =
> ! basetype = TYPE_TARGET_TYPE (VALUE_TYPE (arg2));
> struct type *domain_type =
> ! TYPE_DOMAIN_TYPE (TYPE_TARGET_TYPE (VALUE_TYPE (arg1)));
> int i, j;
> !
> ! gdb_assert (basetype != NULL);
> ! gdb_assert (domain_type != NULL);
> !
> if (domain_type != basetype)
> arg2 = value_cast (lookup_pointer_type (domain_type), arg2);
> basetype = TYPE_VPTR_BASETYPE (domain_type);
>
I was trying to figure out what you changed here and why the diff
seemed confusing. Take another look at the new definition of basetype;
you added a typo.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer