bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mixing tty and debug on same serial line


From: Art Berggreen
Subject: Re: mixing tty and debug on same serial line
Date: Mon, 09 Oct 2000 08:44:33 -0700

Paul Kinzelman wrote:
> 
> Could anybody please tell me if it's possible to run remote
> debugging (for user mode debug) over the same serial port
> on which I used to log in remotely? TIA!
> -PaulK

If you have access to the sources for both the target stub and GDB,
it is possible since we've done that for m68k based devices.
We wrote a variant of the remote.c which implements the simple serial
protocol and modified things to switch between GDB mode and device
console mode.  In device console mode we save the current tty settings
of GDB's tty and put it in raw mode.  While in this mode we just pass
characters between the debug serial interface and GDB's tty (using
select).  When the target stub gets control due to a breakpoint or other
exception, it sends a special "escape" sequence to GDB which is detected
by our custom GDB serial module which then restores the tty settings and
goes back to normal GDB mode.  When a step or continue command is sent
to the target, the GDB interface switches back to device console mode. 
This has worked well for us, but note that this may not work with xxgdb
or DDD.

Also, note that if all you want is output, the standard serial protocol
supports the $O... GDB command for output to stdout.

HTH,
Art



reply via email to

[Prev in Thread] Current Thread [Next in Thread]