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: RE: ctrl-c in GDB


David/Nick,

I tried that but did not work for me. However, one interesting
observation is  that  after  loading the program (without ecos
but, redboot is present),  I put  a breakpoint at 0x18 (IRQ) -
and it  did  not  hit!  I am now suspecting if there is a more
fundamental  step  that  is  missed?  Can you please give some
clues?

Regards,
Vikas

-----Original Message-----
From: David Brennan [mailto:eCos@brennanhome.com]
Sent: Friday, October 01, 2004 7:42 AM
To: Vikas K. Prasad
Cc: Nick Garnett; ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] RE: ctrl-c in GDB


Just a thought, on our i386 target we get this problem which is "fixed" 
by answering 'N' to the Give up question, and then pressing ^c again. 
That works every time for us. I'm sure there is a bug in there 
somewhere, but this fix is good enough for us now.

David Brennan

Vikas K. Prasad wrote:

>Nick/Andrew,
>
>Thank you. I built  a small program (with eCos) (using the
>standard libs) and downloaded it using redboot (built with
>stubs). Redboot is built @ 0x4000000 and program is loaded
>at 0x8000. The  program  is  simple  (only led on off in a
>while loop). I am able  to  step  and debug as shown below
>but ^C does not work. Any clues  regarding the port that I
>have done.
>
>Now that I have eliminated eCos, (only redboot and a small
>pgm working fine, if left to itself)  I  hope you can help
>me get closer to the ^c problem.
>
>(gdb) load test.elf
>0x04002ffc in ?? ()
>Loading section .text, size 0x8c lma 0x8000
>Start address 0x8000, load size 140
>Transfer rate: 1120 bits in <1 sec, 140 bytes/write.
>(gdb) b main
>Breakpoint 1 at 0x8010: file test.c, line 4.
>(gdb) c
>Continuing.
>
>Breakpoint 1, main () at test.c:4
>4               unsigned int i = 1;
>(gdb) n
>7           unsigned int *led = (unsigned int*)0x20000008;
>(gdb) n
>11                      *led = i;
>(gdb) n
>12                      i <<= 1;
>(gdb) c
>Continuing.
>
>< Upon a ^c - This is what happens.>
>Interrupted while waiting for the program.
>Give up (and stop debugging it)? (y or n) y
>
>Regards,
>Vikas
>
>-----Original Message-----
>From: Nick Garnett [mailto:nickg@ecoscentric.com]
>Sent: Thursday, September 30, 2004 2:20 PM
>To: Vikas K. Prasad
>Cc: ecos-discuss@sources.redhat.com
>Subject: Re: [ECOS] RE: ctrl-c in GDB
>
>
>"Vikas K. Prasad" <vikas.prasad@ittiam.com> writes:
>
>  
>
>>Nick,
>>
>>Thank you for giving me the direction. Here is what happens
>>when I try to put the break point in 'start()'.
>>
>>(gdb) b *0x4100190
>>Breakpoint 1 at 0x4100190
>>(gdb) c
>>Continuing.
>>
>>Breakpoint 1, 0x04100190 in start ()
>>(gdb) s
>>Single stepping until exit from function start,
>>which has no line number information.
>>
>>>From this, I am doubting if the code generation is proper.
>>    
>>
>
>As Andrew points out, this is assembly code. You need to use the "si"
>command to step through one instruction at a time. 
>
>
>  
>
>>Here is a snap shot of target.ld file. There is lots of
>>stuff generated at 0 (where my SRAM is mapped) and the
>>usual stuff at 0x4100000 (SDRAM from where I am running
>>eCos). Please help me on this. I am not getting
>>sufficient info to generate proper target.ld.
>>
>>    
>>
>
>According to your initial message you are running on the
>Excalibur/ARM922T. I suggest you make sure that everything is working
>with the standard memory layout first before making changes. Bear in
>mind that RedBoot will have set up the MMU to remap things to
>different virtual addresses from the physical ones before your RAM
>application is loaded.
>
>
>  
>

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


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