This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

gdb remote debug problem


Let me describe in detail the problem I encounted.

1) On my intel redhat 7.0 machine, I installed ecos1.3.1 under /opt/ecos
directory.

Then I download the development tools for Intel x86(i386-elf). I got the

latest snapshot for binutils (binutils-010417.tar.bz2), gcc-core
(gcc-core-20010416.tar) and gcc-g++(gcc-g++-20010416.tar), insight-5.0
(insight-5.0.tar.bz2), and installed them under /src directory.

2) under /opt/ecos directory, I created ecos-pcstub directory and
cd ecos-pcstub, then ecosconfig new pc stubs, then compile it, and
under install/bin directory, I found gdb_module.bin, so I
dd conv=sync if=./gdb_module.bin of=/dev/fd0h1440, then I see the floppy

disk is written. Then I create ecos-pc under /opt/ecos directory, type
ecosconfig new pc, and compile it. Go to /opt/ecos/ecos-1.3.1/examples,
open Makefile file, let PKG_INSTALL_DIR = /opt/ecos/ecos-pc/install,
and uncomment XCC = i386-elf-gcc, then make, and I see all the examples
file are compiled successfully.

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.




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