This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: enable_break() in solib-svr4.c


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.

I didn't check the thread to see what the "quoted document" was, but
this is from the ELF gABI:

  Because position-independent code uses relative addressing between
  segments, the difference between virtual addresses in memory must match
  the difference between virtual addresses in the file. The difference
  between the virtual address of any segment in memory and the
  corresponding virtual address in the file is thus a single constant
  value for any one executable or shared object in a given process. This
  difference is the base address.

It really doesn't get any clearer than that.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]