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]

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


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