From: Tristan Gingold <gingold@adacore.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Regression on prelinked-sepdebug-shlibs
Date: Tue, 05 Jan 2010 11:02:00 -0000 [thread overview]
Message-ID: <B2737BE1-C74D-43F4-95C5-3FA5479D5F0E@adacore.com> (raw)
In-Reply-To: <20100104181009.GA15630@host0.dyn.jankratochvil.net>
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.
next prev parent reply other threads:[~2010-01-05 11:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-25 20:05 Jan Kratochvil
2010-01-04 9:50 ` Tristan Gingold
2010-01-04 10:24 ` Jan Kratochvil
2010-01-04 11:54 ` Tristan Gingold
2010-01-04 15:22 ` Tristan Gingold
2010-01-04 18:10 ` Jan Kratochvil
2010-01-05 11:02 ` Tristan Gingold [this message]
2010-01-05 16:15 ` Jan Kratochvil
2010-01-06 11:20 ` Tristan Gingold
2010-01-06 16:38 ` Tristan Gingold
2010-01-06 18:05 ` Jan Kratochvil
2010-01-06 19:16 ` Daniel Jacobowitz
2010-01-07 11:02 ` Tristan Gingold
2010-01-07 11:10 ` Jan Kratochvil
2010-01-07 11:18 ` Tristan Gingold
2010-01-07 13:42 ` Daniel Jacobowitz
2010-01-07 14:21 ` Tristan Gingold
2010-01-07 14:26 ` Daniel Jacobowitz
2010-01-07 14:37 ` Tristan Gingold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B2737BE1-C74D-43F4-95C5-3FA5479D5F0E@adacore.com \
--to=gingold@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox