This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] expose gdb values to python
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Thiago Jung Bauermann <bauerman at br dot ibm dot com>, gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Wed, 1 Oct 2008 09:04:05 -0700
- Subject: Re: [rfc] expose gdb values to python
- References: <1221199426.24580.26.camel@localhost.localdomain> <m3skrv92wf.fsf@fleche.redhat.com> <20081001054741.GE3665@adacore.com> <m3ljx8l5cf.fsf@fleche.redhat.com>
> Joel> My initial reaction to this question is that the Value object
> Joel> should follow the same semantics as the debugger.
>
> By this I take you to mean the semantics of the currently selected
> language...?
Yes. I think it should mean the currently-selected language when
the value is created?
> This is the bad case:
>
> class B1 { int x; };
> class B2 { int x; };
> class D : B1, B2 { };
>
> I think the current proposal is to try to follow the current language,
> and then have the user cast 'v' to B1 or B2 if needed.
Argh! Multiple inheritance. I see the problem, now. The proposal
makes sense.
> I think we can do this, but there is a cost, namely conflicts between
> methods on Value and field names in the inferior will have to be
> resolved in favor of the method. So, robust programs will always have
> to use the [] syntax anyway.
In that case, I don't see much value in my request. Oh well!
--
Joel