[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2 31/39] windbg: implement kd_api_continue
From: |
Mikhail Abakumov |
Subject: |
[Qemu-devel] [PATCH 2 31/39] windbg: implement kd_api_continue |
Date: |
Wed, 05 Dec 2018 15:54:56 +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 | 15 +++++++++++++++
windbgstub.c | 5 +++++
3 files changed, 21 insertions(+)
diff --git a/include/exec/windbgstub-utils.h b/include/exec/windbgstub-utils.h
index 85b7322b82..2843ad055e 100644
--- a/include/exec/windbgstub-utils.h
+++ b/include/exec/windbgstub-utils.h
@@ -73,6 +73,7 @@ void kd_api_get_context(CPUState *cs, PacketData *pd);
void kd_api_set_context(CPUState *cs, PacketData *pd);
void kd_api_write_breakpoint(CPUState *cs, PacketData *pd);
void kd_api_restore_breakpoint(CPUState *cs, PacketData *pd);
+void kd_api_continue(CPUState *cs, PacketData *pd);
void kd_api_read_control_space(CPUState *cs, PacketData *pd);
void kd_api_write_control_space(CPUState *cs, PacketData *pd);
void kd_api_clear_all_internal_breakpoints(CPUState *cs, PacketData *pd);
diff --git a/windbgstub-utils.c b/windbgstub-utils.c
index ea96c0598c..8aa258e9fd 100644
--- a/windbgstub-utils.c
+++ b/windbgstub-utils.c
@@ -10,6 +10,7 @@
*/
#include "exec/windbgstub-utils.h"
+#include "sysemu/sysemu.h"
static const char *kd_api_names[] = {
"DbgKdReadVirtualMemoryApi",
@@ -311,6 +312,20 @@ void kd_api_restore_breakpoint(CPUState *cs, PacketData
*pd)
}
}
+void kd_api_continue(CPUState *cs, PacketData *pd)
+{
+ uint32_t status = ldl_p(&pd->m64.u.Continue2.ContinueStatus);
+ uint32_t trace = ldl_p(&pd->m64.u.Continue2.ControlSet.TraceFlag);
+ int ssFlag = trace ? SSTEP_ENABLE | SSTEP_NOIRQ | SSTEP_NOTIMER : 0;
+
+ if (NT_SUCCESS(status)) {
+ cpu_single_step(cs, ssFlag);
+ if (!runstate_needs_reset()) {
+ vm_start();
+ }
+ }
+}
+
void kd_api_clear_all_internal_breakpoints(CPUState *cs, PacketData *pd)
{
}
diff --git a/windbgstub.c b/windbgstub.c
index 0e4ad6d009..d64bbc3f34 100644
--- a/windbgstub.c
+++ b/windbgstub.c
@@ -183,6 +183,11 @@ static void windbg_process_manipulate_packet(WindbgState
*state)
kd_api_restore_breakpoint(cs, data);
break;
+ case DbgKdContinueApi:
+ case DbgKdContinueApi2:
+ kd_api_continue(cs, data);
+ return;
+
case DbgKdReadControlSpaceApi:
kd_api_read_control_space(cs, data);
break;
- [Qemu-devel] [PATCH 2 22/39] windbg: some kernel structures, (continued)
- [Qemu-devel] [PATCH 2 22/39] windbg: some kernel structures, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 23/39] windbg: add helper functions, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 24/39] windbg: [de]serialization cpu context, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 25/39] windbg: [de]serialization cpu spec registers, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 26/39] windbg: implement kd_api_get_context and kd_api_set_context, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 27/39] windbg: implement kd_api_get_context_ex and kd_api_set_context_ex, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 28/39] windbg: implement kd_api_read_control_space and kd_api_write_control_space, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 29/39] windbg: implement kd_api_write_breakpoint and kd_api_restore_breakpoint, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 30/39] windbg: debug exception subscribing, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 31/39] windbg: implement kd_api_continue,
Mikhail Abakumov <=
- [Qemu-devel] [PATCH 2 33/39] windbg: implement kd_api_read_physical_memory and kd_api_write_physical_memory, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 32/39] windbg: implement kd_api_read_io_space and kd_api_write_io_space, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 34/39] windbg: implement kd_api_get_version, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 36/39] windbg: implement kd_api_search_memory, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 35/39] windbg: implement kd_api_read_msr and kd_api_write_msr, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 37/39] windbg: implement kd_api_fill_memory, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 38/39] windbg: implement kd_api_query_memory, Mikhail Abakumov, 2018/12/05
- [Qemu-devel] [PATCH 2 39/39] windbg: maintainers, Mikhail Abakumov, 2018/12/05
- Re: [Qemu-devel] [PATCH 2 00/39] Windbg supporting, no-reply, 2018/12/05
- Re: [Qemu-devel] [PATCH 2 00/39] Windbg supporting, no-reply, 2018/12/05