"which function is called when updating a register?"

Andrew Cagney cagney@gnu.org
Sun Jul 18 20:38:00 GMT 2004


> Hi
> 
>   I set breakpoints on both:
> 
> 	-- gdbsim_fetch_register and
>       -- gdbsim_store_register
> 
>   when single stepping the instruction execution, I noticed that
> gdbsim_fetech_register was called but gdbsim_store_register.
> 
>   Which function is actually called to update a register content within gdb
> using a built-in simulator?

GDB rarely has the need to write to the inferiors registers (if it did 
gdbsim_store_register would be called though).  Try something like:
	set $pc = 0
When the simulator is running a program it updates registers locally and 
directly.

Andrew




More information about the Gdb mailing list