From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17282 invoked by alias); 5 Jul 2002 20:56:59 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17249 invoked from network); 5 Jul 2002 20:56:57 -0000 Received: from unknown (HELO mailhost.iprg.nokia.com) (205.226.5.12) by sources.redhat.com with SMTP; 5 Jul 2002 20:56:57 -0000 Received: from darkstar.iprg.nokia.com (darkstar.iprg.nokia.com [205.226.5.69]) by mailhost.iprg.nokia.com (8.9.3/8.9.3-GLGS) with ESMTP id NAA12457; Fri, 5 Jul 2002 13:56:56 -0700 (PDT) Received: (from root@localhost) by darkstar.iprg.nokia.com (8.11.0/8.11.0-DARKSTAR) id g65Kut632315; Fri, 5 Jul 2002 13:56:55 -0700 X-mProtect: <200207052056> Nokia Silicon Valley Messaging Protection Received: from UNKNOWN (172.19.68.218, claiming to be "gkong.iprg.nokia.com") by darkstar.iprg.nokia.com smtpdVmtTJ3; Fri, 05 Jul 2002 13:56:52 PDT Message-Id: <5.1.0.14.1.20020705134259.026a0300@mailhost.iprg.nokia.com> X-Sender: gkong@mailhost.iprg.nokia.com Date: Fri, 05 Jul 2002 13:56:00 -0000 To: Quality Quorum From: "KONG, Gangfeng" Subject: Re: Remote target behind console server Cc: Daniel Jacobowitz , Andrew Cagney , In-Reply-To: References: <5.1.0.14.1.20020704143746.00a31320@mailhost.iprg.nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-SW-Source: 2002-07/txt/msg00067.txt.bz2 > > > > > 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