qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 2 00/39] Windbg supporting
@ 2018-12-05 12:52 Mikhail Abakumov
  2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 01/39] windbg: add empty windbgstub files Mikhail Abakumov
                   ` (41 more replies)
  0 siblings, 42 replies; 44+ messages in thread
From: Mikhail Abakumov @ 2018-12-05 12:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw, lprosek, dovgaluk, rkagan, pbonzini, den

An update of:

        v1: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg06222.html

We made the debugger module WinDbg (like GDB) for QEMU. This is the replacement
of the remote server in Windows kernel. Used for remote Windows kernel debugging
without debugging mode.

WinDbg is a multipurpose debugger for the Microsoft Windows computer operating
system, distributed by Microsoft. Recent versions of WinDbg have been
and are being distributed as part of the free Debugging Tools for Windows suite.

How to start debugging QEMU using WinDbg:
  Run QEMU with next option:
    -windbg pipe:<name>
  QEMU will start and pause for waiting WinDbg connection.
  Run WinDbg with next options:
    -b -k com:pipe,baud=115200,port=\\.\pipe\<name>,resets=0
  Wait for debugger connect to kernel.

Note: You can add Symbol Search Path in WinDbg
such as srv*c:\tmp*http://msdl.microsoft.com/download/symbols.

How it works:
The WinDbg debugger has the possibility of connecting to a remote debug server
(Kdsrv.exe) in the Windows kernel. Therefore, it is possible to connect
to the guest system running in the QEMU emulator. Kernel debugging is possible
only with the enabled debugging mode, may change at the same time.
Our module of WinDbg debugger for QEMU is an alternative of the remote debugging
service in the kernel. Thus, the debugger connects to the debugging module,
not to the kernel of the operating system. The module obtains all the necessary
information answering debugger requests from the QEMU emulator. At the same time
for debugging there is no need to enable debugging mode in the kernel.
This leads to hidden debugging. Our module supports all features of WinDbg
regarding remote debugging, besides interception of events and exceptions.
Supports i386 and x86_64 architectures.

Changed in v2:

 - Fix errors in crash report. (Changbin Du)

Tested-by: Ladi Prosek <lprosek@redhat.com>
---

Mikhail Abakumov (39):
      windbg: add empty windbgstub files
      windbg: add windbg's KD header file
      windbg: add -windbg option
      windbg: add helper features
      windbg: add WindbgState
      windbg: add chardev
      windbg: hook to wrmsr operation
      windbg: implement windbg_on_load
      windbg: implement find_KPCR
      windbg: implement find_kdVersion
      windbg: add windbg_search_vmaddr
      windbg: implement find_kdDebuggerDataBlock
      windbg: parsing data stream
      windbg: send data and control packets
      windbg: handler of parsing context
      windbg: init DBGKD_ANY_WAIT_STATE_CHANGE
      windbg: generate ExceptionStateChange and LoadSymbolsStateChange
      windbg: implement windbg_process_control_packet
      windbg: implement windbg_process_data_packet
      windbg: implement windbg_process_manipulate_packet
      windbg: implement kd_api_read_virtual_memory and kd_api_write_virtual_memory
      windbg: some kernel structures
      windbg: add helper functions
      windbg: [de]serialization cpu context
      windbg: [de]serialization cpu spec registers
      windbg: implement kd_api_get_context and kd_api_set_context
      windbg: implement kd_api_get_context_ex and kd_api_set_context_ex
      windbg: implement kd_api_read_control_space and kd_api_write_control_space
      windbg: implement kd_api_write_breakpoint and kd_api_restore_breakpoint
      windbg: debug exception subscribing
      windbg: implement kd_api_continue
      windbg: implement kd_api_read_io_space and kd_api_write_io_space
      windbg: implement kd_api_read_physical_memory and kd_api_write_physical_memory
      windbg: implement kd_api_get_version
      windbg: implement kd_api_read_msr and kd_api_write_msr
      windbg: implement kd_api_search_memory
      windbg: implement kd_api_fill_memory
      windbg: implement kd_api_query_memory
      windbg: maintainers


 MAINTAINERS                      |   12 
 Makefile.target                  |    3 
 cpus.c                           |   19 +
 default-configs/i386-softmmu.mak |    1 
 gdbstub.c                        |    4 
 include/exec/windbgkd.h          |  928 ++++++++++++++++++++++++++
 include/exec/windbgstub-utils.h  |  104 +++
 include/exec/windbgstub.h        |   25 +
 include/sysemu/sysemu.h          |    2 
 qemu-options.hx                  |    8 
 stubs/Makefile.objs              |    1 
 stubs/windbgstub.c               |   22 +
 target/i386/Makefile.objs        |    1 
 target/i386/cpu.h                |    5 
 target/i386/misc_helper.c        |   38 +
 target/i386/windbgstub.c         | 1368 ++++++++++++++++++++++++++++++++++++++
 vl.c                             |    8 
 windbgstub-utils.c               |  511 ++++++++++++++
 windbgstub.c                     |  545 +++++++++++++++
 19 files changed, 3595 insertions(+), 10 deletions(-)
 create mode 100644 include/exec/windbgkd.h
 create mode 100644 include/exec/windbgstub-utils.h
 create mode 100644 include/exec/windbgstub.h
 create mode 100644 stubs/windbgstub.c
 create mode 100644 target/i386/windbgstub.c
 create mode 100644 windbgstub-utils.c
 create mode 100644 windbgstub.c

--
Mikhail Abakumov

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2018-12-05 15:23 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 12:52 [Qemu-devel] [PATCH 2 00/39] Windbg supporting Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 01/39] windbg: add empty windbgstub files Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 02/39] windbg: add windbg's KD header file Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 03/39] windbg: add -windbg option Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 04/39] windbg: add helper features Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 05/39] windbg: add WindbgState Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 06/39] windbg: add chardev Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 07/39] windbg: hook to wrmsr operation Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 08/39] windbg: implement windbg_on_load Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 09/39] windbg: implement find_KPCR Mikhail Abakumov
2018-12-05 12:52 ` [Qemu-devel] [PATCH 2 10/39] windbg: implement find_kdVersion Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 11/39] windbg: add windbg_search_vmaddr Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 12/39] windbg: implement find_kdDebuggerDataBlock Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 13/39] windbg: parsing data stream Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 14/39] windbg: send data and control packets Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 15/39] windbg: handler of parsing context Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 16/39] windbg: init DBGKD_ANY_WAIT_STATE_CHANGE Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 17/39] windbg: generate ExceptionStateChange and LoadSymbolsStateChange Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 18/39] windbg: implement windbg_process_control_packet Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 19/39] windbg: implement windbg_process_data_packet Mikhail Abakumov
2018-12-05 12:53 ` [Qemu-devel] [PATCH 2 20/39] windbg: implement windbg_process_manipulate_packet Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 21/39] windbg: implement kd_api_read_virtual_memory and kd_api_write_virtual_memory Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 22/39] windbg: some kernel structures Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 23/39] windbg: add helper functions Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 24/39] windbg: [de]serialization cpu context Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 25/39] windbg: [de]serialization cpu spec registers Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 26/39] windbg: implement kd_api_get_context and kd_api_set_context Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 27/39] windbg: implement kd_api_get_context_ex and kd_api_set_context_ex Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 28/39] windbg: implement kd_api_read_control_space and kd_api_write_control_space Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 29/39] windbg: implement kd_api_write_breakpoint and kd_api_restore_breakpoint Mikhail Abakumov
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 30/39] windbg: debug exception subscribing Mikhail Abakumov
2018-12-05 14:36   ` Alex Bennée
2018-12-05 12:54 ` [Qemu-devel] [PATCH 2 31/39] windbg: implement kd_api_continue Mikhail Abakumov
2018-12-05 12:55 ` [Qemu-devel] [PATCH 2 32/39] windbg: implement kd_api_read_io_space and kd_api_write_io_space Mikhail Abakumov
2018-12-05 12:55 ` [Qemu-devel] [PATCH 2 33/39] windbg: implement kd_api_read_physical_memory and kd_api_write_physical_memory Mikhail Abakumov
2018-12-05 12:55 ` [Qemu-devel] [PATCH 2 34/39] windbg: implement kd_api_get_version Mikhail Abakumov
2018-12-05 12:55 ` [Qemu-devel] [PATCH 2 35/39] windbg: implement kd_api_read_msr and kd_api_write_msr Mikhail Abakumov
2018-12-05 12:55 ` [Qemu-devel] [PATCH 2 36/39] windbg: implement kd_api_search_memory Mikhail Abakumov
2018-12-05 12:55 ` [Qemu-devel] [PATCH 2 37/39] windbg: implement kd_api_fill_memory Mikhail Abakumov
2018-12-05 12:55 ` [Qemu-devel] [PATCH 2 38/39] windbg: implement kd_api_query_memory Mikhail Abakumov
2018-12-05 12:55 ` [Qemu-devel] [PATCH 2 39/39] windbg: maintainers Mikhail Abakumov
2018-12-05 14:30 ` [Qemu-devel] [PATCH 2 00/39] Windbg supporting no-reply
2018-12-05 14:37 ` no-reply
2018-12-05 14:38 ` no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).