This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: serial port conflicts
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at codito dot com>
- To: Min ZOU <zou dot min at renesas dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 26 Jan 2005 16:16:49 +0530
- Subject: Re: serial port conflicts
- References: <41F7611C.9010009@renesas.com>
Hi,
Hi,
I have implemented a gdb stub for a SH2 target based on "sh-stub.c" from
GDB-v3.6 source. Now some basic features like step, break, cont, memory
read/write, etc. are tested successfully.
The gdb stub and gdb on host communicate via remote serial protocol.
However I have a problem to debug an application program, which accesses
the same serial port used by gdb, e.g. I/O functions like "putstring()",
"getchar()", etc. In my case, "putstring()" cannot display any message
in gdb console, and "getchar()" cannot receive any input.
1. The IO activities would finally map down into a call to write / read
/ open etc. . Modify the write / read / open in your library to take
care of the File IO extensions in the serial protocol if used with the
GDB remote protocol.
2. Use 2 different serial ports (if you have them) . One for the console
output and the other for the remote debugging. This might be simpler ;-)
HTH
cheers
Ramana
--
Ramana Radhakrishnan
GNU Tools
codito ergo sum (www.codito.com)