This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Gdbarch documentation in the internals manual
- From: Stan Shebs <stanshebs at earthlink dot net>
- To: gdb at sourceware dot org
- Date: Tue, 29 Jul 2008 16:58:50 -0700
- Subject: Gdbarch documentation in the internals manual
While poking through the gdbarch description bits in the internals
manual, I noticed a general disconnect between what the manual describes
and what developers actually use. Namely, the manual usually describes
the getters, while people actually use the setters to fill in gdbarch
objects; and I didn't see anywhere where the manual says "each
gdbarch_foo also has a set_gdbarch_foo that you can use when filling in
a gdbarch". (Yes one could surmise that from studying the sources, but
the point of the manual is to reduce the need to read all the code.)
Sometimes, as with frame_align, the "gdbarch_" part is left off also.
At the very least the manual needs to mention the pairing of gdbarch_foo
/ set_gdbarch_foo pairs, and probably gdbarch_foo_p also. What I'm
wondering is, should we describe the functions in their getter form, or
switch to describing the setters, or always list both? I'm working on a
little script that will complain about discrepancies between source and
manual, so once we decide, we will have a way to catch future
inconsistencies.
Stan