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-ppc-devel

Re: [XenPPC] [RFC] GDB "O" packets

On Tue, 2006-08-29 at 09:32 +1000, Tony Breeds wrote:
> On Mon, Aug 28, 2006 at 09:38:08AM -0500, Hollis Blanchard wrote:
>  
> > You probably want to avoid serial_puts() if GDB is attached, no?
> > Otherwise, you'll be sending "garbage" (i.e. non-packet data) down
> the
> > serial line to GDB.
> > 
> > Rather than including gdbstub.h here, you might do something like
> this:
> >       if (in_debugger())
> >               debug_puts(sercon_handle, str);
> >       else
> >               serial_puts(sercon_handle, str);
> 
> but in_debugger() and debug_puts() need to come from somewhere and
> gdbstub.h makes sense or am I missing the point? 

Sure, but:
a) make it generic (i.e. not called GDB)
b) abstract it into a function, so it can be magically compiled out
(#define in_debugger() 0)

-- 
Hollis Blanchard
IBM Linux Technology Center


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

<Prev in Thread] Current Thread [Next in Thread>