[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 10/39] windbg: implement find_kdVersion
From: |
Mikhail Abakumov |
Subject: |
[Qemu-devel] [PATCH v3 10/39] windbg: implement find_kdVersion |
Date: |
Thu, 06 Dec 2018 14:59:34 +0300 |
User-agent: |
StGit/0.17.1-dirty |
Signed-off-by: Mikhail Abakumov <address@hidden>
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
target/i386/windbgstub.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/target/i386/windbgstub.c b/target/i386/windbgstub.c
index 15a90e521c..dc58f5a8cc 100644
--- a/target/i386/windbgstub.c
+++ b/target/i386/windbgstub.c
@@ -16,6 +16,7 @@
#define OFFSET_KPCR_SELF 0x18
#else /* TARGET_I386 */
#define OFFSET_KPCR_SELF 0x1C
+#define OFFSET_KPCR_VERSION 0x34
#endif /* TARGET_I386 */
#ifdef TARGET_X86_64
@@ -64,6 +65,16 @@ static bool find_kdDebuggerDataBlock(CPUState *cs)
#else /* TARGET_I386 */
static bool find_kdVersion(CPUState *cs)
{
+ if (!kdVersion.is_init && KPCR.is_init) {
+ kdVersion.addr = VMEM_ADDR(cs, KPCR.addr + OFFSET_KPCR_VERSION);
+ if (!kdVersion.addr) {
+ return false;
+ }
+ kdVersion.is_init = true;
+
+ DPRINTF("find kdVersion " FMT_ADDR, kdVersion.addr);
+ }
+
return kdVersion.is_init;
}
#endif /* TARGET_I386 */
- [Qemu-devel] [PATCH v3 00/39] Windbg supporting, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 01/39] windbg: add empty windbgstub files, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 02/39] windbg: add windbg's KD header file, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 03/39] windbg: add -windbg option, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 04/39] windbg: add helper features, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 05/39] windbg: add WindbgState, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 06/39] windbg: add chardev, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 07/39] windbg: hook to wrmsr operation, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 08/39] windbg: implement windbg_on_load, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 09/39] windbg: implement find_KPCR, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 10/39] windbg: implement find_kdVersion,
Mikhail Abakumov <=
- [Qemu-devel] [PATCH v3 11/39] windbg: add windbg_search_vmaddr, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 12/39] windbg: implement find_kdDebuggerDataBlock, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 13/39] windbg: parsing data stream, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 14/39] windbg: send data and control packets, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 15/39] windbg: handler of parsing context, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 16/39] windbg: init DBGKD_ANY_WAIT_STATE_CHANGE, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 17/39] windbg: generate ExceptionStateChange and LoadSymbolsStateChange, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 18/39] windbg: implement windbg_process_control_packet, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 19/39] windbg: implement windbg_process_data_packet, Mikhail Abakumov, 2018/12/06
- [Qemu-devel] [PATCH v3 20/39] windbg: implement windbg_process_manipulate_packet, Mikhail Abakumov, 2018/12/06