This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Register group proposal


> -----Original Message-----
> From: Jim Kleck [mailto:jim.kleck@NetergyNet.COM]
> Sent: Tuesday, February 27, 2001 7:32 PM
> To: Andrew Cagney
> Cc: Nick Duffek; Dautrevaux@microprocess.com; gdb@sources.redhat.com;
> insight@sources.redhat.com
> Subject: Re: Register group proposal
> 
> 
> A consistent interface is *one* reason to have a particular interface.
> However, it is not the only thing to consider, nor have the "style
> advantages and disadvantages" been fully explored... at least not
> in this forum.
> 
> I would note that "struct blah *" is NOT fully opaque. Its 
> very use implies
> a control structure of some sort, and it is quite different 
> from the standard
> types provided by the language. Thus it is not using the full 
> "extensability"
> of the language.
> 
> An alternative I have not seen discussed is to have "typedef 
> void * blah"
> as the public interface (then the implementation would need to cast
> the object to the internal representation before operating on it).
> 
> Finally, in the "LONGEST" example, why replace "a = b + c;" with
> "a = add(b, c);". My inclination would be to overload the "+" so that
> no change to the users of the type are necessary.
> 

I'm afraid GDB is written in C isn't it? so overloading '+' is not really an
option. 

Regards,

	Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]