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]

Re: "which function is called when updating a register?"


Hi

Thanks for the reply.

  My problem is that after I building a new target, I could not see the
registers being updated except PC. For example, after I did "set $sp =
0x80001000", and then "info reg", I still saw $sp is ZERO.

  I am trying to fig out what was wrong with my build. One way to do this is
to trace the simulator execution. However I don't have a clear picture about
the interface between the simulator execution and gdb. For example, which
data structures are read by "info reg" command and which ones are touched by
the simulator. How could GDB get those register content being updated by the
simulator?

When the inferior (simulator) is resumed, GDB flushes its internal register cache (target_registers_changed). This causes GDB to always fetch the latest register values found in the simulator.


Andrew



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