Skip to contentSkip to conversation

WinDbg module

Qemu-devel Mihail Abakumov 6 participants 8 messages Apr 12, 2017 – Apr 13, 2017

lore
Share & tools
lore
#0 lore raw

Hello.

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

The latest build and instructions for the launch can be found here: https://github.com/ispras/qemu/releases/tag/v2.7.50-windbg

Currently only one ways to create a remote debugging connection is supported: using COM port with named pipe.

Should I prepare patches for inclusion in the master branch? Or is it too specific module and it is not needed?

Signature · 2 lines
Thanks,
Mihail Abakumov
#1 lore raw

Hi

Quoted 6 lines · Mihail Abakumov

Hello.

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

Quoted 9 lines

The latest build and instructions for the launch can be found here:
https://github.com/ispras/qemu/releases/tag/v2.7.50-windbg

Currently only one ways to create a remote debugging connection is
supported: using COM port with named pipe.

Should I prepare patches for inclusion in the master branch? Or is it too specific module and it is not needed?

Great news! A few years ago, I looked into this with a colleague to speed up debugging, but we were stuck (can't remember the blocking factor, but the lack of documentation was not helping). I think some windows driver developers would be quite happy with it, which makes it a good candidate for inclusion. Please prepare patches!

Signature · 1 line
Marc-André Lureau
#3 lore raw
In reply to Roman Kagan

Am 12.04.2017 um 18:30 schrieb Roman Kagan:

Quoted 16 lines · Mihail Abakumov
Quoted 6 lines

Hello.

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

Quoted 8 lines

The latest build and instructions for the launch can be found here:
https://github.com/ispras/qemu/releases/tag/v2.7.50-windbg

Currently only one ways to create a remote debugging connection is
supported: using COM port with named pipe.

Should I prepare patches for inclusion in the master branch? Or is it too specific module and it is not needed?

Quoted 9 lines

Please do!

Every once in a while dealing with a Windows guest problem I wished I had this. We at Virtuozzo looked into doing something like this but never got around to.

Thanks,
Roman.

Hello Mihail,

from the previous answers you can see that there is a need for WinDbg support.

If you want to prepare patches for the official QEMU, you need signed commits from all developers who contributed (Dmitry Koltunov and you?).

Make also sure that no licensed code (for example extracts from MS header files) gets added.

See http://wiki.qemu-project.org/Contribute/SubmitAPatch for more hints.

As far as I saw, WinDbg support adds several thousand lines of code. Do you want to support that code after it has been included in QEMU?

Cheers
Stefan

#5 lore raw
In reply to Mihail Abakumov
Quoted 6 lines · Mihail Abakumov

Hello.

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

Quoted 9 lines

The latest build and instructions for the launch can be found here:
https://github.com/ispras/qemu/releases/tag/v2.7.50-windbg

Currently only one ways to create a remote debugging connection is
supported: using COM port with named pipe.

Should I prepare patches for inclusion in the master branch? Or is it too specific module and it is not needed?

this would be indeed useful. We have a lot of problems with Windows debugging. In general, Windows behaviour with and without debugger is different.

Den

#2 lore raw
In reply to Mihail Abakumov
Quoted 6 lines · Mihail Abakumov

Hello.

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

Quoted 8 lines

The latest build and instructions for the launch can be found here:
https://github.com/ispras/qemu/releases/tag/v2.7.50-windbg

Currently only one ways to create a remote debugging connection is
supported: using COM port with named pipe.

Should I prepare patches for inclusion in the master branch? Or is it too specific module and it is not needed?

Please do!

Every once in a while dealing with a Windows guest problem I wished I had this. We at Virtuozzo looked into doing something like this but never got around to.

Thanks,
Roman.

#6 lore raw
In reply to Mihail Abakumov

Hi,

Quoted 5 lines · Mihail Abakumov

Hello.

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

This is awesome!

Quoted 5 lines

The latest build and instructions for the launch can be found here:
https://github.com/ispras/qemu/releases/tag/v2.7.50-windbg

Currently only one ways to create a remote debugging connection is
supported: using COM port with named pipe.

The linked v2.7.50-windbg seems to be a Windows release. Does it also work on Linux hosts with KVM?

Also,

  #ifdef TARGET_X86_64 // Unimplemented yet
  #error Unsupported Architecture
  #endif

can you estimate the amount of work to support 64-bit?

Thanks!
Ladi

Quoted 7 lines

Should I prepare patches for inclusion in the master branch? Or is it too specific module and it is not needed?

--
Thanks,
Mihail Abakumov

#7 lore raw

Ladi Prosek писал 2017-04-13 10:02:

Quoted 4 lines

The linked v2.7.50-windbg seems to be a Windows release. Does it also work on Linux hosts with KVM?

I haven't tested it yet, but it should work.

Quoted 9 lines

Also,

  #ifdef TARGET_X86_64 // Unimplemented yet
  #error Unsupported Architecture
  #endif

can you estimate the amount of work to support 64-bit?

At the moment I can't implement support for x86_64 arch. At least due to the fact that any OS Windows that I tried crashes on this architecture.

Thanks,
Mihail Abakumov

#4 lore raw
In reply to Stefan Weil

Stefan Weil писал 2017-04-12 20:55:

Quoted 42 lines

Am 12.04.2017 um 18:30 schrieb Roman Kagan:

Quoted 16 lines · Mihail Abakumov
Quoted 6 lines

Hello.

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

Quoted 8 lines

The latest build and instructions for the launch can be found here:
https://github.com/ispras/qemu/releases/tag/v2.7.50-windbg

Currently only one ways to create a remote debugging connection is
supported: using COM port with named pipe.

Should I prepare patches for inclusion in the master branch? Or is it too specific module and it is not needed?

Quoted 9 lines

Please do!

Every once in a while dealing with a Windows guest problem I wished I had this. We at Virtuozzo looked into doing something like this but never got around to.

Thanks,
Roman.

Hello Mihail,

from the previous answers you can see that there is a need for WinDbg support.

If you want to prepare patches for the official QEMU, you need signed commits from all developers who contributed (Dmitry Koltunov and you?).

Make also sure that no licensed code (for example extracts from MS header files) gets added.

See http://wiki.qemu-project.org/Contribute/SubmitAPatch for more hints.

Quoted 6 lines

As far as I saw, WinDbg support adds several thousand lines of code. Do you want to support that code after it has been included in QEMU?

Cheers
Stefan

Yes, of course. We can support it.

Thanks,
Mihail Abakumov