From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20479 invoked by alias); 4 Mar 2003 03:03:35 -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 20472 invoked from network); 4 Mar 2003 03:03:34 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 4 Mar 2003 03:03:34 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18q4bP-0000Hv-00; Mon, 03 Mar 2003 23:04:31 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18q2i6-000888-00; Mon, 03 Mar 2003 22:03:18 -0500 Date: Tue, 04 Mar 2003 03:03:00 -0000 From: Daniel Jacobowitz To: Miles Bader Cc: Andrew Cagney , gdb@sources.redhat.com Subject: Re: gdbserver relocation? Message-ID: <20030304030318.GB31172@nevyn.them.org> Mail-Followup-To: Miles Bader , Andrew Cagney , gdb@sources.redhat.com References: <20030224142831.GB24793@nevyn.them.org> <20030224152608.GB2206@gnu.org> <3E5A3E20.5040706@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-03/txt/msg00072.txt.bz2 On Tue, Mar 04, 2003 at 11:27:46AM +0900, Miles Bader wrote: > Andrew Cagney writes: > > I suspect you want to send something back using qOffsets. > > Yes, that's exactly what I needed. > > What do you think of the following patch (I added the `handle_query' > target callback, and then provided a linux-low.c implementation)? It looks reasonable to me. Do you have GDB copyright papers on file? Content-Description: gdb-5.3-qoffsets-20030304.patch > + if (errno == 0) > + { > + /* Both text and data offsets produced at compile-time (and so > + used by gdb) are relative to the beginning of the program, > + with the data segment immediately following the text segment. > + However, the actual runtime layout in memory may put the data > + somewhere else, so when we send gdb a data base-address, we > + use the real data base address and subtract the compile-time > + data base-address from it (which is just the length of the > + text segment). BSS immediately follows data in both cases. */ Hmm, this only works if the executable is linked at 0 with data right after text. Is that the case for all/most uClinux targets? I don't know anything about uClinux. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer