All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ladi Prosek <lprosek@redhat.com>
To: Mihail Abakumov <mikhail.abakumov@ispras.ru>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	sw@weilnetz.de, Pavel Dovgalyuk <dovgaluk@ispras.ru>,
	Roman Kagan <rkagan@virtuozzo.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Denis V. Lunev" <den@openvz.org>
Subject: Re: [Qemu-devel] [PATCH v2 00/43] Windbg supporting
Date: Mon, 13 Nov 2017 13:23:55 +0100	[thread overview]
Message-ID: <CABdb737buNdep007xMsBR2ZxOpmZXiSd_fz_mcQhnrbZGP2kgw@mail.gmail.com> (raw)
In-Reply-To: <3205f50a0ec9089fcaf452911e60637b@ispras.ru>

On Wed, Nov 8, 2017 at 3:28 PM, Mihail Abakumov
<mikhail.abakumov@ispras.ru> wrote:
> Ladi Prosek писал 2017-11-08 16:43:
>
>> On Wed, Nov 8, 2017 at 12:54 PM, Mihail Abakumov
>> <mikhail.abakumov@ispras.ru> wrote:
>>>
>>> Ladi Prosek писал 2017-11-06 18:15:
>>>
>>> In your case windbg does not send packets, more specifically, does not
>>> continue to do it. What is your version of windbg. Also, windbg stub has
>>> been supported only for windbg x64, yet.
>>
>>
>> Ah, so that's a pretty important piece of information and not very
>> intuitive given the "Only i386 is supported now." sentence in the
>> cover email.
>>
>> Microsoft (R) Windows Debugger Version 10.0.15063.468 X86
>> Microsoft (R) Windows Debugger Version 10.0.15063.468 AMD64
>> Microsoft (R) Windows Debugger Version 10.0.16299.15 X86
>> Microsoft (R) Windows Debugger Version 10.0.16299.15 AMD64
>>
>> are the versions I have tried. I don't see any difference between x86
>> and amd64, all versions never connect and crash after the second
>> break.
>>
>> What guest OS are you running? Can you maybe zip up your QEMU binaries
>> and share them with me?
>>
>> Thanks,
>> Ladi
>
>
> Oh, it looks like a problem in the versions. I use the Windbg from Windows
> 7.
> Windbg version: 6.12.0002.633 AMD64. I will try to test with your version.

Looks like it's the -b switch making the difference here. It was
removed in later versions of windbg.


Windbg docs (older):

-b
(Kernel mode only) This option has two effects:
1. The debugger will break into the target computer immediately upon connection.

2. After a reboot, the debugger will break into the target computer
once the kernel is initialized. See Crashing and Rebooting the Target
Computer for details and for other methods of changing this status.


Windbg docs (newer):

-b
This option is no longer supported.


-b makes windbg send a break-in right after connecting. Apparently
there is a short time window when the break-in will work. I can
actually successfully connect with a Win10 windbg (so without -b) if I
hit Ctrl+Break shortly after the initial handshake. This also explains
why I was able to connect once during my initial testing. I was just
lucky and hit Ctrl+Break soon enough after connecting.

By initial handshake I mean this sequence (I have added a simple
logging, should be clear what it means):

Received control PACKET_TYPE_KD_RESET
Sending data 7
Sending control 6

Newer debuggers without -b will stop here. Older debuggers with -b
will continue with:

Received RESULT_BREAKIN_BYTE
Sending data 7
Received RESULT_BREAKIN_BYTE
Sending data 7
Received data PACKET_TYPE_KD_STATE_MANIPULATE (12614)
Sending control 4
Sending data 2
Received data PACKET_TYPE_KD_STATE_MANIPULATE (12592)
Sending control 4
Sending data 2
Received data PACKET_TYPE_KD_STATE_MANIPULATE (12592)
Sending control 4
Sending data 2
...


Next step, when I have time, is to find the differences between
sending the break-in early and sending it later. Also interesting
would be recording the exchange between windbg and the target when
doing regular remote kernel debugging. I would still expect to see the
"Connected to Windows 7 7601 x86 compatible target ..." output always,
even when not breaking in immediately. The handshake is likely still
missing something.

Thanks,
Ladi

  reply	other threads:[~2017-11-13 12:24 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 13:08 [Qemu-devel] [PATCH v2 00/43] Windbg supporting Mihail Abakumov
2017-10-17 13:08 ` [Qemu-devel] [PATCH v2 01/43] windbg: added empty windbgstub files Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 02/43] windbg: added windbg's KD header file Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 03/43] windbg: modified windbgkd.h Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 04/43] windbg: added '-windbg' option Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 05/43] windbg: added helper features Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 06/43] windbg: added WindbgState Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 07/43] windbg: added chardev Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 08/43] windbg: hook to wrmsr operation Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 09/43] windbg: handler of fs/gs register Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 10/43] windbg: structures for parsing data stream Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 11/43] windbg: " Mihail Abakumov
2017-10-17 13:09 ` [Qemu-devel] [PATCH v2 12/43] windbg: send data and control packets Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 13/43] windbg: handler of parsing context Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 14/43] windbg: init DBGKD_ANY_WAIT_STATE_CHANGE Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 15/43] windbg: sized data buffer Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 16/43] windbg: generate ExceptionStateChange Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 17/43] windbg: generate LoadSymbolsStateChange Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 18/43] windbg: windbg_vm_stop Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 19/43] windbg: implemented windbg_process_control_packet Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 20/43] windbg: implemented windbg_process_data_packet Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 21/43] windbg: implemented windbg_process_manipulate_packet Mihail Abakumov
2017-10-17 13:10 ` [Qemu-devel] [PATCH v2 22/43] windbg: implemented kd_api_read_virtual_memory and kd_api_write_virtual_memory Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 23/43] windbg: kernel's structures Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 24/43] windbg: implemented kd_api_get_context and kd_api_set_context Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 25/43] windbg: implemented kd_api_read_control_space and kd_api_write_control_space Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 26/43] windbg: implemented windbg_read_context Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 27/43] windbg: implemented windbg_write_context Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 28/43] windbg: implemented windbg_read_ks_regs Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 29/43] windbg: implemented windbg_write_ks_regs Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 30/43] windbg: implemented windbg_set_sr Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 31/43] windbg: implemented windbg_set_dr Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 32/43] windbg: implemented windbg_set_dr7 Mihail Abakumov
2017-10-17 13:11 ` [Qemu-devel] [PATCH v2 33/43] windbg: implemented windbg_hw_breakpoint_insert and windbg_hw_breakpoint_remove Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 34/43] windbg: implemented kd_api_write_breakpoint and kd_api_restore_breakpoint Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 35/43] windbg: debug exception subscribing Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 36/43] windbg: implemented kd_api_continue Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 37/43] windbg: implemented kd_api_read_io_space and kd_api_write_io_space Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 38/43] windbg: implemented kd_api_read_physical_memory and kd_api_write_physical_memory Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 39/43] windbg: implemented kd_api_get_version Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 40/43] windbg: implemented kd_api_read_msr and kd_api_write_msr Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 41/43] windbg: implemented kd_api_search_memory Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 42/43] windbg: implemented kd_api_fill_memory Mihail Abakumov
2017-10-17 13:12 ` [Qemu-devel] [PATCH v2 43/43] windbg: implemented kd_api_query_memory Mihail Abakumov
2017-10-17 14:11 ` [Qemu-devel] [PATCH v2 00/43] Windbg supporting no-reply
2017-10-17 15:04 ` no-reply
2017-10-23  8:31 ` Ladi Prosek
2017-11-06 15:15   ` Ladi Prosek
2017-11-06 18:41     ` Andrew Baumann
2017-11-07  8:10       ` Ladi Prosek
2017-11-07 17:23         ` Andrew Baumann
2017-11-08 11:54     ` Mihail Abakumov
2017-11-08 13:43       ` Ladi Prosek
2017-11-08 14:28         ` Mihail Abakumov
2017-11-13 12:23           ` Ladi Prosek [this message]
2017-11-14 11:37             ` Mihail Abakumov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABdb737buNdep007xMsBR2ZxOpmZXiSd_fz_mcQhnrbZGP2kgw@mail.gmail.com \
    --to=lprosek@redhat.com \
    --cc=den@openvz.org \
    --cc=dovgaluk@ispras.ru \
    --cc=mikhail.abakumov@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rkagan@virtuozzo.com \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.