From: Simon Marchi <simon.marchi@efficios.com>
To: Tom Tromey <tom@tromey.com>,
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb: reset/recompute objfile section offsets in reread_symbols
Date: Wed, 20 May 2020 15:43:46 -0400 [thread overview]
Message-ID: <303c6a2a-9510-8ee4-8af2-81f3f65d2f57@efficios.com> (raw)
In-Reply-To: <877dx6o0ur.fsf@tromey.com>
On 2020-05-20 3:36 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Simon> This patch fixes this by making reread_symbols clear the
> Simon> `section_offsets` vector, and re-create it by calling `sym_offsets`.
> Simon> This is analogous to what syms_from_objfile_1 does. I didn't seem
> Simon> absolutely necessary, but I also made it clear the various
> Simon> `sect_index_*` fields, since their values no longer make sense (they
> Simon> describe the old executable, and are indices in the now cleared
> Simon> sections/section_offsets arrays).
>
> This makes sense to me.
Thanks, I'll push the patch then.
> Simon> I don't really like the approach taken by reread_symbols, trying to
> Simon> reset everything manually on the objfile object, instead of, for
> Simon> example, creating a new one from scratch.
>
> A long time ago, Jan had a patch to do exactly this.
> I couldn't easily find it; there was some opposition to it at the time,
> but I still think it's a better approach.
Here's the thread:
https://sourceware.org/legacy-ml/gdb-patches/2009-06/msg00679.html
Simon
prev parent reply other threads:[~2020-05-20 19:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 19:22 Simon Marchi
2020-05-20 19:24 ` Christian Biesinger
2020-05-20 19:34 ` Simon Marchi
2020-05-20 19:36 ` Tom Tromey
2020-05-20 19:43 ` Simon Marchi [this message]
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=303c6a2a-9510-8ee4-8af2-81f3f65d2f57@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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