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: Program doesn't returns


This list is for details about maintaining eCos, not for questions
or problems.  Please use ecos-discuss (copied) for that purpose.

On Thu, 2003-07-24 at 22:10, Jose Paul wrote:
> Hi All,
> 
> When I tried a helloworld program in ecos using  mipsel-vr4100-elf-gdb.exe
> program is not returning to gdb> after it reaches the end of the program.
> 
> Here is the program I have tried.
> /*----------------------------------------------------
>  * eCos 'Hello world' example
>  * --------------------------------------------------*/
> 
> #include <stdio.h>
> 
> 
> int main(int argc, char* argv[])
> {
>     int i;
> 
> 
>     for (i=0; i<10; i++)
>     {
>       printf("Hello world!\n\r");
> 
>     }
>     return 0;
> }
> 
> 
> This program prints "Hello world" but it does not return to gdb>.

This is expected behaviour.  If you want to stop in GDB when the
program exits, set a breakpoint at _exit().
> 

-- 
Gary D. Thomas <gary.thomas@mind.be>


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