[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 38/39] windbg: implement kd_api_query_memory
From: |
Mikhail Abakumov |
Subject: |
[Qemu-devel] [PATCH v3 38/39] windbg: implement kd_api_query_memory |
Date: |
Thu, 06 Dec 2018 15:02:11 +0300 |
User-agent: |
StGit/0.17.1-dirty |
Signed-off-by: Mikhail Abakumov <address@hidden>
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
include/exec/windbgstub-utils.h | 1 +
windbgstub-utils.c | 10 ++++++++++
windbgstub.c | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/include/exec/windbgstub-utils.h b/include/exec/windbgstub-utils.h
index 8192a7b849..bddb52d3db 100644
--- a/include/exec/windbgstub-utils.h
+++ b/include/exec/windbgstub-utils.h
@@ -86,6 +86,7 @@ void kd_api_write_msr(CPUState *cs, PacketData *pd);
void kd_api_search_memory(CPUState *cs, PacketData *pd);
void kd_api_clear_all_internal_breakpoints(CPUState *cs, PacketData *pd);
void kd_api_fill_memory(CPUState *cs, PacketData *pd);
+void kd_api_query_memory(CPUState *cs, PacketData *pd);
void kd_api_get_context_ex(CPUState *cs, PacketData *pd);
void kd_api_set_context_ex(CPUState *cs, PacketData *pd);
void kd_api_unsupported(CPUState *cs, PacketData *pd);
diff --git a/windbgstub-utils.c b/windbgstub-utils.c
index 9b4f6f00b8..799fd95a7a 100644
--- a/windbgstub-utils.c
+++ b/windbgstub-utils.c
@@ -479,6 +479,16 @@ void kd_api_fill_memory(CPUState *cs, PacketData *pd)
g_free(mem);
}
+void kd_api_query_memory(CPUState *cs, PacketData *pd)
+{
+ DBGKD_QUERY_MEMORY *mem = &pd->m64.u.QueryMemory;
+
+ /* TODO: Needs test memory. */
+ stl_p(&mem->AddressSpace, DBGKD_QUERY_MEMORY_PROCESS);
+ stl_p(&mem->Flags, DBGKD_QUERY_MEMORY_READ | DBGKD_QUERY_MEMORY_WRITE |
+ DBGKD_QUERY_MEMORY_EXECUTE);
+}
+
void kd_api_unsupported(CPUState *cs, PacketData *pd)
{
WINDBG_ERROR("Caught unimplemented api %s",
kd_api_name(pd->m64.ApiNumber));
diff --git a/windbgstub.c b/windbgstub.c
index daf6d37aa1..23ad05f12b 100644
--- a/windbgstub.c
+++ b/windbgstub.c
@@ -236,6 +236,10 @@ static void windbg_process_manipulate_packet(WindbgState
*state)
kd_api_fill_memory(cs, data);
break;
+ case DbgKdQueryMemoryApi:
+ kd_api_query_memory(cs, data);
+ break;
+
case DbgKdGetContextExApi:
kd_api_get_context_ex(cs, data);
break;
- [Qemu-devel] [PATCH v3 28/39] windbg: implement kd_api_read_control_space and kd_api_write_control_space, (continued)
- [Qemu-devel] [PATCH v3 28/39] windbg: implement kd_api_read_control_space and kd_api_write_control_space, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 30/39] windbg: debug exception subscribing, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 29/39] windbg: implement kd_api_write_breakpoint and kd_api_restore_breakpoint, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 31/39] windbg: implement kd_api_continue, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 32/39] windbg: implement kd_api_read_io_space and kd_api_write_io_space, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 33/39] windbg: implement kd_api_read_physical_memory and kd_api_write_physical_memory, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 35/39] windbg: implement kd_api_read_msr and kd_api_write_msr, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 34/39] windbg: implement kd_api_get_version, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 36/39] windbg: implement kd_api_search_memory, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 37/39] windbg: implement kd_api_fill_memory, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 38/39] windbg: implement kd_api_query_memory,
Mikhail Abakumov <=
- [Qemu-devel] [PATCH v3 39/39] windbg: maintainers, Mikhail Abakumov, 2018/12/06
- Re: [Qemu-devel] [PATCH v3 00/39] Windbg supporting, no-reply, 2018/12/06