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]

Re: gdb remote debug problem


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.
> 
> 


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