From mboxrd@z Thu Jan 1 00:00:00 1970 From: Weilong Li To: elf@florence.buici.com Cc: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] gdb remote debug problem Date: Thu, 26 Apr 2001 00:59:00 -0000 Message-id: <3AE7FDF2.31688126@mtu.edu> References: <3AE2D640.8C628E5D@mtu.edu> <20010422100422.A15832@buici.com> X-SW-Source: 2001-04/msg00426.html Elf, thanks a lot for help. I just discovered the problem. The target machine is so old that its serial port is rusted, and I tried anoter target, it is working. Weilong elf@florence.buici.com wrote: > I've done exactly the same thing with success. I encountered some odd > behavior when I didn't use exactly the software versions recommended > by the eCos team. I used: > > binutils-2.11.90.0.1 > gcc-core-2.95.2 > gcc-g++-2.95.2 > insight-5.0 > > though the behavior you describe seems to indicate that the tools are > correctly built. > > The most important thing to check is that your serial connection is > correct. It is worthwhile to use minicom (or a similar package) to > test the physical, serial link. > > -*- > > [deletia] > > > 3) Then I used the floppy disk to boot another computer, it is > > intel 486 machine, I connected it with my intel redhat 7.0 machine using > > > > a null modem cable. I saw the following things show on intel 486 > > machine: > > > > ++$T0508:a4370000;04:e00f0000;#19++$T0508:a43700019 > > > > So it seems the gdb stub on my target machine is working. > > Then on intel redhat 7.0 machine, under directory > > /opt/ecos/ecos-1.3.1/examples, > > I typed i386-elf-gdb -nw hello, then the following shows: > > > > GNU gdb 5.0 > > Copyright 2000 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and you > > are > > welcome to change it and/or distribute copies of it under certain > > conditions. > > Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for > > details. > > This GDB was configured as "--host=i586-pc-linux-gnu > > --target=i386-elf"... > > (gdb) set remotebaud 38400 > > (gdb) target remote /dev/ttyS0 > > Remote debugging using /dev/ttyS0 > > Ignoring packet error, continuing... > > Ignoring packet error, continuing... > > Ignoring packet error, continuing... > > Couldn't establish connection to remote target > > Malformed response to offset query, timeout > > (gdb) load > > You can't do that when your target is `exec' > > > > If I type i386-elf-gdb hello instead, > > the graphic window shows up since I installed insight, > > > > I saw the source code of atexit.cxx is shown in the window, under Run > > menu, > > I click on "connect to target" menuitem, and set target be "remote > > serial", > > and baud rate is 38400, and port is /dev/ttyS0, I clicked Ok, nothing > > happens, > > then I click "connect to target" menuitem under Run menu again, then > > a dialog shows "Successfully connected". Then I click on "ok" button on > > this > > dialog, but the insight will exit and shows me "segmentation fault". > > > > Anyway, I cannot connect to the target to do remote debugging, I guess > > there is something wrong with physical connection to the target machine. > > > > On the host (intel Redhat 7.0 machine), there are two ports with D9 > > interface, I don't know how to distinguish between com1 and com2, so I > > just tried both of them, and got the same results above.(on my target > > machine, > > there is only one D9 interface). > > > > > > Please tell me what is wrong and what should I do so that I can > > do remote debugging. thanks a lot. > > > >