}
#ifdef USE_ELF_CORE_DUMP
+#include "exec/translate-all.h"
+
/*
* Definitions to generate Intel SVR4-like core files.
* These mostly have the same names as the SVR4 types with "target_elf_"
return (0);
}
+static int wmr_page_unprotect_regions(void *opaque, target_ulong start,
+ target_ulong end, unsigned long flags)
+{
+ if ((flags & (PAGE_WRITE | PAGE_WRITE_ORG)) == PAGE_WRITE_ORG) {
+ size_t step = MAX(TARGET_PAGE_SIZE, qemu_host_page_size);
+
+ while (1) {
+ page_unprotect(start, 0);
+ if (end - start <= step) {
+ break;
+ }
+ start += step;
+ }
+ }
+ return 0;
+}
+
typedef struct {
unsigned count;
size_t size;
cpu_list_lock();
mmap_lock();
+ /* By unprotecting, we merge vmas that might be split. */
+ walk_memory_regions(NULL, wmr_page_unprotect_regions);
+
/*
* Walk through target process memory mappings and
* set up structure containing this information.