From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19697 invoked by alias); 4 Sep 2007 10:46:45 -0000 Received: (qmail 19652 invoked from network); 4 Sep 2007 10:46:29 -0000 Received: from unknown (202.108.59.148) by sourceware.org with QMTP; 4 Sep 2007 10:46:29 -0000 Received: (qmail 20977 invoked from network); 4 Sep 2007 18:41:54 +0800 Received: from unknown (HELO xchen) (Authenticated?user:?xchen@sunrisetelecom.com.cn@[219.142.163.192]) (envelope-sender ) by 0 (qmail-ldap-1.03) with SMTP for ; 4 Sep 2007 18:41:54 +0800 From: "xchen" To: "'Daniel Jacobowitz'" Cc: Subject: Re: (Rising Spam Alert)Re: (Rising Spam Alert)Re: (Rising Spam Alert)Re: wrong lib address Date: Tue, 04 Sep 2007 10:46:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <20070903144930.GA7463@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00021.txt.bz2 Message-ID: <20070904104600.1ZjoFtqkufAPr3-02-SXXAf3ZLSqeCOm6pPR-ZXf6Qg@z> Hi Daniel, Huh! I set solib-absolute-prefix /opt/montavista/pro/devkit/ppc/8xx/target and create /mnt/cf/shared/lib under this path. All library can be loaded successfully. Thank you very much. But there is another error when I debug the program. When the program step to the system(), it hang and display "Detaching after fork from child process 275." (gdb) n 95 char bDhcpFail=3D0; (gdb) n 100 if (g_profile->ipSetup.ucImode =3D=3D MODE_STATIC) (gdb) n 122 sprintf(cRdBuf, "dhcpcd -t 10"); (gdb) n 123 rc =3D system(cRdBuf); (gdb) n Detaching after fork from child process 275. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Waitting for a long time =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Remote communication error: No route to host. I use x86 gdb debug the test program which include system call, it didn't display "Detaching after fork from child process xxx".=20 8 printf("please show me\n"); (gdb) n please show me 9 system("ls"); (gdb) n hellogdb hellogdb.c makefile 10 return 0; (gdb) n 11 } Thx, Xi -----=D3=CA=BC=FE=D4=AD=BC=FE----- =B7=A2=BC=FE=C8=CB: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.o= rg] =B4=FA=B1=ED 'Daniel Jacobowitz' =B7=A2=CB=CD=CA=B1=BC=E4: 2007=C4=EA9=D4=C23=C8=D5 22:50 =CA=D5=BC=FE=C8=CB: xchen =B3=AD=CB=CD: gdb@sourceware.org =D6=F7=CC=E2: (Rising Spam Alert)Re: (Rising Spam Alert)Re: (Rising Spam Al= ert)Re: wrong lib address On Mon, Sep 03, 2007 at 06:30:58PM +0800, xchen wrote: >=20=20 > Hi Daniel >=20 > I have resolved this problem. I misunderstood the mean of=20 > solib-absolute-prefix. And now I use solib-search-path to load the library. > Bad luck! New errors occured include Malformed packet(b) (missing=20 > colon) and Invalid remote reply when I continue to debug my peogram.=20 > Belowed is the snapshot >=20 > (gdb) set solib-absolute-prefix /root/ > (gdb) set solib-search-path > /opt/montavista/pro/devkit/ppc/8xx/target/lib/:/opt/montavista/pro/dev > kit/pp > c/8xx/target/usr/lib/ No. Don't use solib-search-path for this. Use: set solib-absolute-prefix /opt/montavista/pro/devkit/ppc/8xx/target > (gdb) n > warning: Invalid remote reply: n8003 You are using MontaVista's gdbserver. You should be using their GDB, too. This only works with both. -- Daniel Jacobowitz CodeSourcery