From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3214 invoked by alias); 16 Jan 2007 19:21:27 -0000 Received: (qmail 3202 invoked by uid 22791); 16 Jan 2007 19:21:27 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.175) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 16 Jan 2007 19:21:23 +0000 Received: by ug-out-1314.google.com with SMTP id 75so1989123ugb for ; Tue, 16 Jan 2007 11:21:20 -0800 (PST) Received: by 10.82.120.14 with SMTP id s14mr1305679buc.1168975278265; Tue, 16 Jan 2007 11:21:18 -0800 (PST) Received: by 10.82.173.15 with HTTP; Tue, 16 Jan 2007 11:21:18 -0800 (PST) Message-ID: Date: Tue, 16 Jan 2007 19:21:00 -0000 From: "Itzhak Ben-Akiva" To: "Daniel Jacobowitz" , gdb@sourceware.org Subject: Re: Cross-compiling GDB/GDBSERVER In-Reply-To: <20070116165146.GA30629@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070116165146.GA30629@nevyn.them.org> X-Google-Sender-Auth: ee1b2680ca594ce1 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-01/txt/msg00262.txt.bz2 Hi Daniel, Thanks, I have already solved this problem. On 1/16/07, Daniel Jacobowitz wrote: > On Tue, Jan 16, 2007 at 10:15:27AM +0200, Itzhak Ben-Akiva wrote: > > However, when I try to connect to the gdbserver, I get the message I > > post below. gdb is trying to find the libraries in the wrong places > > instead of the right one, i.e., the toolchain build directory. What am > > I missing in the compilation? Should I set CFLAGS and LD_FLAGS to the > > path of the toolchain build directory? > > You need to either use --with-sysroot when building gdb, set > solib-absolute-prefix, or "set sysroot" if you're using GDB HEAD. That's exactly what I did. I found on the Net Dan Kegel's "how to" http://www.kegel.com/linux/gdbserver.txt. It helped me a lot. Thanks, Itzhak P.S.: I'm studying GDB Internals and the mails and patches regarding to Reverse Debugging Project. I haven't forgot it. > I added a section about this common pitfall to the manual a few weeks > ago. > > -- > Daniel Jacobowitz > CodeSourcery >