In vmx.c, in the vmexit handler (reason = EXIT_REASON_EXCEPTION_NMI) I found this code: switch ( vector ) { case TRAP_debug: case TRAP_int3: if ( !v->domain->debugger_attached ) goto exit_and_crash; domain_pause_for_debugger(); Now, I don''t understand who updates debugger_attached for a HVM guest. (I worked with windbg in order to debug a windows HVM, and I guess EXIT_REASON_EXCEPTION_NMI is the exit reason for breakpoints I placed) Can anyone clear this for me? Thanks, Guy. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
See XEN_DOMCTL_setdebugging. -- Keir On 11/11/07 10:11, "Guy Zana" <guy@neocleus.com> wrote:> In vmx.c, in the vmexit handler (reason = EXIT_REASON_EXCEPTION_NMI) > I found this code: > > switch ( vector ) > { > case TRAP_debug: > case TRAP_int3: > if ( !v->domain->debugger_attached ) > goto exit_and_crash; > domain_pause_for_debugger(); > > Now, I don''t understand who updates debugger_attached for a HVM guest. > (I worked with windbg in order to debug a windows HVM, and I guess > EXIT_REASON_EXCEPTION_NMI is the exit reason for breakpoints I placed) > > Can anyone clear this for me? > > Thanks, > Guy. > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Oh, I see that there is a ptrace() implementation that uses the setdebugging hypercall. Does it really support HVMs? Is that OS dependant? What happens in Windows? Btw, what''s that condition doing in the vmexit handler? Why not reflect the exception back to the guest instead of crashing the domain? Thanks, Guy. ________________________________ From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] Sent: Sunday, November 11, 2007 5:51 PM To: Guy Zana; xen-devel@lists.xensource.com Subject: Re: [Xen-devel] HVM guest debugging See XEN_DOMCTL_setdebugging. -- Keir On 11/11/07 10:11, "Guy Zana" <guy@neocleus.com> wrote: In vmx.c, in the vmexit handler (reason = EXIT_REASON_EXCEPTION_NMI) I found this code: switch ( vector ) { case TRAP_debug: case TRAP_int3: if ( !v->domain->debugger_attached ) goto exit_and_crash; domain_pause_for_debugger(); Now, I don''t understand who updates debugger_attached for a HVM guest. (I worked with windbg in order to debug a windows HVM, and I guess EXIT_REASON_EXCEPTION_NMI is the exit reason for breakpoints I placed) Can anyone clear this for me? Thanks, Guy. ________________________________ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel