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

To: Hollis Blanchard <hollisb@xxxxxxxxxx>
Subject: Re: [XenPPC] [RFC] GDB "O" packets
From: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Aug 2006 09:32:03 +1000
Cc: XenPPC-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 28 Aug 2006 16:32:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1156775888.28490.9.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Hollis Blanchard <hollisb@xxxxxxxxxx>, XenPPC-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
References: <20060828071345.GO27551@xxxxxxxxxxxxxxxxxx> <1156775888.28490.9.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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?

> In fact, it might be worth adding another flag to the serial handles
> (see e.g. SERHND_COOKED), and intercepting inside serial_puts(). The
> only problem there is that serial_putc() would bypass this, but as you
> can see practically speaking there aren't any callers.

so something like:
void serial_puts(int handle, const char *s)
{
    struct serial_port *port = &com[handle & SERHND_IDX];
    unsigned long flags;
    char c;

    if ( (handle == -1) || !port->driver || !port->driver->putc )
        return;

    if ( (handle & SERHND_DEBUGGER) && in_debugger() ) {
        gdb_puts(s);
        return;
    }
    ....
}

Actually that seems pretty nice as it means that the debug messages get
push to gdb when console==gdb.

I'll have a play.  Thanks Hollis.

Yours Tony

   linux.conf.au       http://linux.conf.au/ || http://lca2007.linux.org.au/
   Jan 15-20 2007      The Australian Linux Technical Conference!


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

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