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]
Other format: [Raw text]

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


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