From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29715 invoked by alias); 28 Aug 2003 10:51:37 -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 29669 invoked from network); 28 Aug 2003 10:51:36 -0000 Received: from unknown (HELO mailout3.samsung.com) (203.254.224.33) by sources.redhat.com with SMTP; 28 Aug 2003 10:51:36 -0000 Received: from custom-daemon.mailout3.samsung.com by mailout3.samsung.com (iPlanet Messaging Server 5.2 HotFix 1.17 (built Jun 23 2003)) id <0HKB00E01STY3D@mailout3.samsung.com> for gdb@sources.redhat.com; Thu, 28 Aug 2003 19:51:34 +0900 (KST) Received: from ep_mmp2 (localhost [127.0.0.1]) by mailout3.samsung.com (iPlanet Messaging Server 5.2 HotFix 1.17 (built Jun 23 2003)) with ESMTP id <0HKB003GUSTXP3@mailout3.samsung.com> for gdb@sources.redhat.com; Thu, 28 Aug 2003 19:51:34 +0900 (KST) Received: from balarama ([107.108.3.145]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 HotFix 1.17 (built Jun 23 2003)) with ESMTPA id <0HKB008DCSTWE2@mmp2.samsung.com> for gdb@sources.redhat.com; Thu, 28 Aug 2003 19:51:33 +0900 (KST) Date: Thu, 28 Aug 2003 10:51:00 -0000 From: Balarama Krishna Subject: Re: Problem using gdbserver To: gdb@sources.redhat.com Message-id: <019301c36d51$635eed90$91036c6b@sisodomain.com> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT X-Priority: 3 X-MSMail-priority: Normal References: <004801c36bdb$5bdff680$91036c6b@sisodomain.com> <20030826141736.GA21856@nevyn.them.org> <014401c36d30$c70c8490$91036c6b@sisodomain.com> X-SW-Source: 2003-08/txt/msg00309.txt.bz2 The problem is solved by using the command "(gdb) file " instead of "(gdb) symbol-file " and by interchanging the order of execution of this command and "(gdb) target remote 107.108.3.197:2020" > Hi, > > The set up for GDB as remote debugger (target=arm-linux, host=i386) is > successful. > The following is my sample test program "test.c" > /******************************************************/ > #include > int main() > { > int i; > printf("Hello World \n"); > for(i=0; i<3; i++) > printf("Checking counter %d \n", i); > return 0; > } > /***************************************************/ > > I compiled the above program using arm-linux-gcc with -g option and kept in > the target. > These are the following snap shots while debugging this program > > /********************************* TARGET*********************** *****/ > [root@Linux /mnt]$./gdbserver 107.108.3.197:2020 test > Process test created; pid = 227 > Remote debugging from host 107.108.4.244 > Hellotest (227): undefined instruction: pc=02000354 > Code: e59f003c ebffffc8 (e7ffdefe) e50b3010 e51b3010 > World > test (227): undefined instruction: pc=02000358 > Code: ebffffc8 e3a03000 (e7ffdefe) e51b3010 e3530002 > > Child terminated with signal = 4 > > Child terminated with signal = 0x4 > GDBserver exiting > [root@Linux /mnt]$ > > /**** ******************************HOST********************* ******/ > (gdb) target remote 107.108.3.197:2020 > Remote debugging using 107.108.3.197:2020 > 0x40002560 in ?? () > (gdb) symbol-file test > Reading symbols from test...done. > (gdb) list > 1 #include > 2 > 3 int main() > 4 { > 5 > 6 int i; > 7 > 8 printf("Hello World \n"); > 9 > 10 > (gdb) list > 11 for(i=0; i<3; i++) > 12 printf("Checking counter %d \n", i); > 13 > 14 return 0; > 15 } > 16 > (gdb) break 11 > Breakpoint 1 at 0x2000354: file test.c, line 11. > (gdb) cont > Continuing. > > Breakpoint 1, main () at test.c:11 > 11 for(i=0; i<3; i++) > (gdb) n > > Program received signal SIGILL, Illegal instruction. > 0x02000358 in main () at test.c:11 > 11 for(i=0; i<3; i++) > (gdb) n > > Program terminated with signal SIGILL, Illegal instruction. > The program no longer exists. > (gdb) > > /*************************************************************************** > ******/ > > I don't know why things are going wrong. Am I missing some thing?? One can > observe that "Hello World" is printed seperately on the Target. Any kind of > help is appreciated in this regard. > > Thanks & Regards, > Balaram. > > >