GDB: don't cache the memory map

Issue #5004
This commit is contained in:
Christian Prochaska 2023-09-20 14:18:53 +02:00 committed by Christian Helmuth
parent d77cb2b1fc
commit f0b734886e
3 changed files with 22 additions and 1 deletions

View File

@ -1 +1 @@
3b5bd5ce53f96a52eb48eca9c95066e307636367
a8c8d04deda7e71e478139c13462d27372f61df3

View File

@ -0,0 +1,20 @@
memory_map.patch
Always request the current memory map instead of
caching the first received map, so 'info mem'
can be used to get the memory maps of different
inferiors.
diff --git a/gdb/memattr.c b/gdb/memattr.c
index fafd909..258aca3 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -105,7 +105,7 @@ require_user_regions (int from_tty)
static void
require_target_regions (void)
{
- if (mem_use_target () && !target_mem_regions_valid)
+ if (mem_use_target () /*&& !target_mem_regions_valid*/)
{
target_mem_regions_valid = true;
target_mem_region_list = target_memory_map ();

View File

@ -6,3 +6,4 @@ noux_build.patch
gdbserver_genode.patch
call_dummy_location.patch
non_stop.patch
memory_map.patch