This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Heads up, deprecate read_pc(), read_fp()
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 09 Jan 2003 19:44:39 -0500
- Subject: Heads up, deprecate read_pc(), read_fp()
Just a heads up, don't know when but hopefully soon these methods can
be deprecated:
- they (like the rest of the old register cache code) rely on global state
- their behavior doesn't match their namesake:
-- read_pc() can return either PC or PC+DECR_PC_AFTER_BREAK or
PC+DECR_PC_AFTER_HW_BREAK or ?
-- read_fp() returns an almost random pointer onto the stack. A frame
starts out with frame->frame = read_pc() but then INIT_FRAME_PC,
INIT_FRAME_PC_FIRST, INIT_FRAME_EXTRA_INFO, INIT_FRAME_SAVED_REGS, or ?
go and change it :-(
I think it is pretty clear that the replacement for both of these will take:
- the register cache
- the stop reason
- a cache buffer to save any analysis data (so one can share with the
other)
as parameters.
enjoy,
Andrew