WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] possible changes was Re: [PATCH] make domu_debug run-tim

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] possible changes was Re: [PATCH] make domu_debug run-time option + fix int3 handling for MP
From: Kip Macy <kmacy@xxxxxxxxxx>
Date: Mon, 16 May 2005 13:55:27 -0700 (PDT)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 16 May 2005 20:54:57 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <230ad531375068ef2d52b32ff9e1ef0d@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> Doesn't the gdb server have to attach to the new vm to be able to set 
> the breakpoint, leading to a race anyway? Or have you some way to 
> pre-insert an int3?

There have been times when I've messed things up really early on so I've just 
re-compiled with an int3 in locore.s. For developers who wan't to be able to 
set 
breakpoints early in boot, I've added a boot time option to the command line 
that gets handled in machdep.c:

        if ((caddr_t)xen_start_info->cmd_line)
                kern_envp = xen_setbootenv((caddr_t)xen_start_info->cmd_line);

        boothowto |= xen_boothowto(kern_envp);

        if (boothowto & RB_GDB_PAUSE)
            __asm__("int $0x3;");

This way the VM got paused very early on in boot so that when the gdbserver got 
to attaching to it it hadn't gotten very far.

==========================================================================

But my recent jaunt through xm has lead me to a cleaner solution:

gopts.opt('paused', short='p',
          fn=set_true, default=0,
          use='Leave the domain paused after it is created.')


So I think we're good.

Thanks.


                                        -Kip

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel