This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Program doesn't returns
- From: "Gary D. Thomas" <gary dot thomas at mind dot be>
- To: Jose Paul <jose at exorindia dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 25 Jul 2003 07:24:41 -0600
- Subject: [ECOS] Re: Program doesn't returns
- Organization:
- References: <033001c35262$b2eb65f0$e900a8c0@jose>
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