This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
A consistent get/unwind frame naming schema
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 12 Jun 2003 09:29:41 -0400
- Subject: A consistent get/unwind frame naming schema
It's been noted (and I know my self) that the frame's current naming
schema isn't exactly consistent. It came about because there was a
consistent naming schema but I didn't notice it until after adding
several new functions. Anyway, it would probably be a good idea to
clean it up before 6 - the change is mindless, just tedious.
So, I'd like to suggest the following.
Prefixes:
get_frame_WHAT*:
get WHAT from the THIS frame
(functionaly equivalent to THIS->next->unwind->what)
frame_unwind_WHAT*:
unwind THIS frame's WHAT from the NEXT frame
safe_*
safer version of various functions, doesn't throw an error
(leave this for later?) (*frame*_p instead?)
put_frame_WHAT*
put a value into this frame
(unsafe, need to invalidate the frame / regcache afterwards)
(better name more strongly hinting at its unsafeness)
Suffixes:
void *frame*_WHAT:
read WHAT's value into the buffer parameter
ULONGEST *frame*_WHAT_unsigned:
return an unsigned value
(the alternative is *frame_unsigned_WHAT)
LONGEST *frame*_WHAT_signed
return WHAT signed value
What:
*frame*_memory* (frame, coreaddr, len [, buf])
extract/return memory
*frame*_register* (frame, regnum [, buf])
extract/return register
*frame*_{pc,sp,...} (frame)
resume address, innner most stack address, ...
At least it is consistent.
Andrew