This is the mail archive of the gdb@sourceware.org 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]

Re: Modifying a verboten register


On Thu, May 04, 2006 at 09:15:10AM -0600, Shaun Jackman wrote:
> >Right here, use the flushregs command in GDB.
> 
> Great! Thanks for pointing this command out to me. I've used this hack
> to modify the $cpsr and $pc to set the core back to a good frame. GDB
> still has its old frame in its cache though. Is there a command to
> re-read the frame from the new register values?

Definitely a bug.

I'm not entirely sure, but if someone wants to experiment, I think that
this would work:

  - Search for every call to registers_changed.
  - Replace it with observer_notify_target_changed (&current_target);
    (or something more specific if the current function takes a
    struct target_ops *, I suppose, but that's not important at the
    moment).
  - Delete any flush_cached_frames calls right before the former
    calls to registers_changed, since they are now unnecessary.

I can't think of any situation where the registers may have changed
without invalidating the frame cache.

-- 
Daniel Jacobowitz
CodeSourcery


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