Re: [rfc] expose gdb values to python

Joel Brobecker
2008-10-01T16:04:46Z

> 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