* Function used by GDB to access target sim memory
@ 2019-08-18 17:55 William Tambe
2019-08-18 18:04 ` William Tambe
2019-08-19 19:18 ` Pedro Alves
0 siblings, 2 replies; 3+ messages in thread
From: William Tambe @ 2019-08-18 17:55 UTC (permalink / raw)
To: gdb
What function does GDB use to access the simulator memory when "target
sim" is in use ?
For instance, to implement the access to the simulator registers, one must use:
CPU_REG_FETCH()
CPU_REG_STORE()
Are there similar functions for accessing the simulator memory ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Function used by GDB to access target sim memory
2019-08-18 17:55 Function used by GDB to access target sim memory William Tambe
@ 2019-08-18 18:04 ` William Tambe
2019-08-19 19:18 ` Pedro Alves
1 sibling, 0 replies; 3+ messages in thread
From: William Tambe @ 2019-08-18 18:04 UTC (permalink / raw)
To: gdb
To expand on my previous email, I am looking to implement an address
translation layer between GDB and the simulator memory.
Is there a way to set a function that gets called when a request to
access the simulator memory occur ?
On Sun, Aug 18, 2019 at 12:55 PM William Tambe <tambewilliam@gmail.com> wrote:
>
> What function does GDB use to access the simulator memory when "target
> sim" is in use ?
>
> For instance, to implement the access to the simulator registers, one must use:
> CPU_REG_FETCH()
> CPU_REG_STORE()
>
> Are there similar functions for accessing the simulator memory ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Function used by GDB to access target sim memory
2019-08-18 17:55 Function used by GDB to access target sim memory William Tambe
2019-08-18 18:04 ` William Tambe
@ 2019-08-19 19:18 ` Pedro Alves
1 sibling, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2019-08-19 19:18 UTC (permalink / raw)
To: William Tambe, gdb
On 8/18/19 6:55 PM, William Tambe wrote:
> What function does GDB use to access the simulator memory when "target
> sim" is in use ?
The interface between gdb and the sim is all in gdb/remote-sim.c.
Sounds like you're looking for gdbsim_xfer_memory.
>
> For instance, to implement the access to the simulator registers, one must use:
> CPU_REG_FETCH()
> CPU_REG_STORE()
>
> Are there similar functions for accessing the simulator memory ?
>
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-19 19:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-18 17:55 Function used by GDB to access target sim memory William Tambe
2019-08-18 18:04 ` William Tambe
2019-08-19 19:18 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox