Re: [patch] Code cleanup: Make function typedef for find memory region

Tom Tromey
2010-08-31T16:51:02Z

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Tom> One case is the "bcache" case: you have a relatively simple data
Tom> structure with a defined public API. In this case, I find it it
Tom> convenient to be able to read the header file to see the entire exported
Tom> API, without being distracted by the implementation. This case is maybe
Tom> not as typical as we might like; many data types in gdb are semi-opaque
Tom> at best.

Jan> This is definitely a disagreement.

Yeah. And of course, I will follow whatever we collectively agree upon.

Jan> Such general guide should be in doc/gdbint.texinfo .

I would rather get rid of this document, if possible. Having it
separate from the source means that modifying it is usually an
afterthought. It is better, IMO, to have the comments near the source,
because that increases the likelihood that a reviewer will remember to
ask for comment updates when a patch changes something.

Tom> The second case is implementations of virtual methods.

Jan> Implementation should name the field in the interface to be able to jump
Jan> there.

I like this idea.

Tom