On Sat Mar 15, 2025 at 7:19 AM AEST, Richard Henderson wrote: > On 3/14/25 00:41, Nicholas Piggin wrote: >> Add an accessor for gdb physical memory access mode which sets the >> the .debug attribute for the MemTxAttribute, and also returns success >> to the caller. >> >> GDB with PhyMemMode will now report failure from memory accesses outside >> valid system memory addresses, and it is also able to write to ROMs as >> GDB virtual memory access can. >> >> Signed-off-by: Nicholas Piggin <npig...@gmail.com> >> --- >> docs/devel/loads-stores.rst | 11 +++++++++++ >> include/exec/cpu-common.h | 3 +++ >> gdbstub/system.c | 7 +------ >> system/physmem.c | 16 ++++++++++++++++ >> 4 files changed, 31 insertions(+), 6 deletions(-) >> > > I think you might as well put this function in gdbstub/system.c > and not export (or document) it.
A possible advantage this way is gdbstub not knowing precise details of the memory transaction (i.e., .debug = 1), but I can do that. Will submit a v2. Thanks, Nick