From 81011383d94b2f630cd8fdad989f2e24d4889c1e Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 14 Feb 2022 23:51:15 +0100 Subject: [PATCH] sim: Add sim_dump_memory for debugging Intended to be called from the debugger tool. sim/common: * sim-memopt.c (sim_dump_memory): New function. --- sim/common/sim-memopt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c index 342188391d7..62423421cf9 100644 --- a/sim/common/sim-memopt.c +++ b/sim/common/sim-memopt.c @@ -639,6 +639,16 @@ sim_memory_uninstall (SIM_DESC sd) } } +void sim_dump_memory (SIM_DESC sd); + +/* Convenience function for use when debugging the simulator. */ + +void +sim_dump_memory (SIM_DESC sd) +{ + memory_option_handler (sd, NULL, OPTION_MEMORY_INFO, NULL, 0); + memory_option_handler (sd, NULL, OPTION_MAP_INFO, NULL, 0); +} static SIM_RC sim_memory_init (SIM_DESC sd) -- 2.30.2