From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17644 invoked by alias); 31 Aug 2005 21:40:52 -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 17597 invoked by uid 22791); 31 Aug 2005 21:40:47 -0000 Received: from sadr.equallogic.com (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 31 Aug 2005 21:40:47 +0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id j7VLejin017970 for ; Wed, 31 Aug 2005 17:40:46 -0400 Received: from M31.equallogic.com (M31.equallogic.com [172.16.1.31]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id j7VLehje017965; Wed, 31 Aug 2005 17:40:43 -0400 Received: from pkoning.equallogic.com ([172.16.1.163]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 31 Aug 2005 17:40:43 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17174.9177.644165.5664@gargle.gargle.HOWL> Date: Wed, 31 Aug 2005 21:40:00 -0000 From: Paul Koning To: drow@false.org Cc: kevinb@redhat.com, gdb@sources.redhat.com Subject: Re: enable_break() in solib-svr4.c References: <17152.63787.724675.956910@gargle.gargle.HOWL> <20050831133045.7e6ea3ee@ironwood.lan> <17174.7612.800418.769197@gargle.gargle.HOWL> <20050831211958.GA20405@nevyn.them.org> X-SW-Source: 2005-08/txt/msg00132.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Daniel> On Wed, Aug 31, 2005 at 05:14:36PM -0400, Paul Koning wrote: >> No, it's the same issue, materializing in a second place. >> >> The same conclusion applies as before: either NetBSD is wrong -- >> it should use the bizarre and unintuitive meaning of "base >> address" that appears to be intended by the document you quoted -- >> or NetBSD is right, "base address" means "the address where the >> thing ended up" (which is the intuitive definition) and GDB is >> wrong in several places. >> >> The reason I'm picking on the meaning of "base address" is that >> "address" normally means a place, not a difference. If people >> mean difference, the normal term used is "offset" or >> "displacement" or something like that. So I find it hard to >> believe that "base address" is meant to be a difference between >> two addresses. Daniel> I didn't check the thread to see what the "quoted document" Daniel> was, but this is from the ELF gABI: Daniel> Because position-independent code uses relative addressing Daniel> between segments, the difference between virtual addresses in Daniel> memory must match the difference between virtual addresses in Daniel> the file. The difference between the virtual address of any Daniel> segment in memory and the corresponding virtual address in Daniel> the file is thus a single constant value for any one Daniel> executable or shared object in a given process. This Daniel> difference is the base address. Daniel> It really doesn't get any clearer than that. Other than the fact that it uses the word "address" in a highly unusual way, I agree, that's pretty clear. Certainly much more so than the text quoted in that earlier message. Ok then, so the conclusion is that NetBSD (in 1.6.2 and before, at least) violates this rule when it puts the load address, rather than the difference between load and file addresses, into the "base address". Given that bug, I suppose it would make sense to put a target specific workaround into gdb, i.e., "if the target is NetBSD (or "if the target is NetBSD-MIPS"??) then 'base address' is not a difference but just the load address". That should not be hard. paul