This is the mail archive of the
mailing list for the GDB project.
Re: Register group proposal
Nick Duffek wrote:
> On 21-Feb-2001, Andrew Cagney wrote:
> >Rather than a simple integer, should reggroup be made an object vis
> >``struct reggroup *''?
> Perhaps so. It's not a struct at the moment, though, and even if it were,
> declaring it as such implies that clients of the interface have access to
> fields of the struct, which either (a) is untrue or (b) leaks internal
> information across the interface.
> I'd rather typedef it to something that'll cause compile-time errors if
> it's used as anything other than an opaque handle. That change probably
> would require more discussion, so for now I'd prefer to use an int.
I'm sorry but you've lost me here.
Have a look at ui-out.h, ui-file.h, gdbarch.h, ... They have all used
``struct foo *'' to implement an opaque type. In all cases it isn't
possible to get to the inner workings.
Regarding typedefs. Per my e-mail
encouraging a tangled web of includes.