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]
Other format: [Raw text]

Re: GDB help ?


On Fri, 20 Jun 2003 10:00:29 -0400 (EDT)
Mark Salter <msalter@redhat.com> wrote:

> >>>>> SOMARAJAN,SUNIL (HP-India,unix2) writes:
> 
> > Specifically if I do a CTRL-C and then quit gdb and enter gdb again this 
> > is what I see
> 
> > (gdb) target remote 15.11.40.75:9000
> > Remote debugging using 15.11.40.75:9000
> > 0x0000b2f0 in ?? ()
> > (gdb) load
> > Loading section .text, size 0x58d17 lma 0x108000
> > Loading section .rodata, size 0x8984 lma 0x160d18
> > Loading section .data, size 0x4fe0 lma 0x1696a0
> > Ignoring packet error, continuing...
> > Remote communication error: Connection reset by peer.
> 
> 
> > I am using eCOs2.0, x86 target
> 
> You don't need to quit gdb. After the Ctrl-C, use the
> 'kill' command. Or just reuse the 'target' command and
> answer 'y' when you are prompted about killing the
> currently running program.
> 
> It is odd that the load command fails at this point. It
> could be that the program you are running is overwriting
> some resource that the stub needs. This would explain
> why the program loads the first time, but not subsequent
> times.
> 
> --Mark
> 

When gdb sends a kill packet to the stubs, it should reset the board and restart redboot. I noticed that this behaviour does not work for all platforms.

About the communication error, It is true to say that there is some overwriting of resources.
When debugging through ethernet, redboot uses the application's ethernet driver. So if redboot is not reseted before launching the application a second time, redboot still uses code and data of the previously stopped application. The text section is the same, but the data section comes with initialisation values. That's why the load command fails at this point.

If you do not want to quit GDB, be sure that redboot is reseted between two load commands.

Hope, this will help you.

-- 
GONZALEZ Laurent
Silicomp Research Institute
Tel: 04 76 41 66 98

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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