This is the mail archive of the gdb-patches@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: Regression on prelinked-sepdebug-shlibs


On Jan 4, 2010, at 7:10 PM, Jan Kratochvil wrote:

Hi Jan,

> On Mon, 04 Jan 2010 16:23:22 +0100, Tristan Gingold wrote:
>> can you try and/or comment this patch before I officially submit it ?  No sepdebug.exp regressions.
> 
> it works (for the reproducer I provided - you could not run it?)

In fact not easily.  The RH machine on which I can run this test hasn't access to my home and I haven't
taken the time to put a new gdb repo.

> after
> removing:
> 
> +  /* In most cases, the offsets are 0.  In this case we return NULL to reduce
> +     overhead.  */
> +  for (i = 0; i < objfile->num_sections; i++)
> +    if (objfile->section_offsets->offsets[i])
> +      break;
> +  if (i >= objfile->num_sections)
> +    return NULL;
> 
> These offsets are for file vs. memory displacement.  If I have .so prelinked at
> 0x3404200190 it gets loaded at 0x3404200190 so
> objfile->section_offsets->offsets[*] will be 0 but still the .so.debug file is
> 0x0-based and the .so.debug file needs to be relocated to 0x3404200190.

Yes, that's right.

But without that sepdebug.exp fails: by default (default_symfile_offsets), addresses from addr_info are
used as offsets.  So if I put the vma into address, the addresses of the separate debug file are doubled.
The convertion of addr to offset in syms_from_objfile is *not* done for mainline sym files - but I don't
know why.

Unless I still don't understand something it looks like we need to coordinate to submit this patch.
IIUC you haven't yet committed all your PIE patches.  Could you simply add it to your own patches set ?

Tristan.


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