From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22139 invoked by alias); 8 Aug 2003 02:27:41 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21987 invoked from network); 8 Aug 2003 02:27:36 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 8 Aug 2003 02:27:36 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 571902B86; Thu, 7 Aug 2003 22:27:34 -0400 (EDT) Message-ID: <3F330A96.8050607@redhat.com> Date: Fri, 08 Aug 2003 02:27:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jose Paul Cc: gdb@sources.redhat.com Subject: Re: GDB does not returns References: <003201c357e6$29de3970$e900a8c0@jose> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-08/txt/msg00112.txt.bz2 > Hi All, > > Hi Alain, > > Here is the program I am using. > > /*---------------------------------------------------- > * eCos 'Hello world' example > * --------------------------------------------------*/ > > #include > //#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 > > > >