GDB does not returns
Andrew Cagney
ac131313@redhat.com
Fri Aug 8 02:27:00 GMT 2003
> Hi All,
>
> Hi Alain,
>
> Here is the program I am using.
>
> /*----------------------------------------------------
> * eCos 'Hello world' example
> * --------------------------------------------------*/
>
> #include <stdio.h>
> //#include "library_example.h"
>
> int main(int argc, char* argv[])
> {
> int i;
>
>
> for (i=0; i<10; i++)
> {
> printf("Hello world!\n\r");
> }
> return 0;
> }
I guess you're doing something like:
> target remote xxx:yyy
> load
> continue
try:
> target remote xxx:yyy
> load
> break _exit
> continue
The startup code typically calls _exit after main returns.
Perhaphs, for embedded targets, GDB should automatically set a
breakpoint on _exit.
Andrew
> I am using GDB mipsel-elf-gdb.exe build GNU gdb 20030516.
> My problem is that when I run the above program in command line it prints
> Hello world
> and is not returning to GDB.
>
> One of the ecos GUY says that if we put a break point at exit it is possible
> to exit the program.
> What command we have use to put a break
> point at exit or what settings I have to make to get back to gdb prompt?.
>
> Please let me know.
> Jose
>
>
>
>
More information about the Gdb
mailing list