This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Remote target behind console server




>
> In order to check the whole system, I did install a kgdb stub of linux on my
> laptop, so that I can move it around. What I have done are:
> 1. enable the /dev/ttyS0 in /etc/inittab, then I can login through serial port
> the check whether it works. I connect it to the port 1 of my console
> server,
> then, I remotely login into it by 'telnet server-ipaddr 2001'. Works!
> SO:
> - target serial port works
> - console server works
> 2. I move the laptop target close to my development box, and I use serial cable
> to connect them directly. I start the stub on target by 'gdbstart -s
> 38400 -t
> /dev/ttyS0'. And then start the gdb on the development box. Now I can use
> gdb to debug my target box as expected.
> SO:
> - the stub on target is ok
> - the gdb on the development box is ok


I suppose that you are using null-modem cable at the point.
Yes.



> 3. Now I move the laptop target back to the console server and connect the port
> 1 to its serial port and start the stub by 'gdbstart -s 38400 -t
> /dev/ttyS0', and
> go the development box to start the gdb and try to access the target
> box by
> 'target remote server-ipaddr:2001'.
> But it fails......
>
> I don't know what's wrong.

I suppose port configuration or wrong cable or wrong baud rate, I
suppose you have to use stright cable here and in many cases authobaud
feature does not work with gdb stub.

Anyway, connect you rtarget to the terminal server, start gdb stub, do
'telnet serverip 2001' and try to figure out what is going wrong until
you see '$...#yy in response to pressing ENTER.
Hi,

You are definitely right. The baudrate is wrong, the console server seems not
to be able to auto-configure the baudrate of its ports. I use your suggestion
'telnet serverip 2001' to talk to every possible baudrate of the target from
9600 to 115200. I can not get '$...#yy' reply in any baudrate. But 9600 set did give
a me persistent reply '$s05#b8', all of the other baudrate set gave me a series
of changing replies. Late I tried 'target remote serverip:2001' with a 9600 baudrate
stub. I works!

Thank you very much for your help, I understand it better now!
GF




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]