Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>,
	Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Reinitialize objfile::section_offsets during objfile reload
Date: Mon, 27 Jan 2020 19:07:00 -0000	[thread overview]
Message-ID: <f9d4914e-2932-2894-6a11-d0517125f2d1@redhat.com> (raw)
In-Reply-To: <875zgy6vo5.fsf@tromey.com>

On 1/26/20 4:15 PM, Tom Tromey wrote:

> Andrew> One thing I did wonder about while looking at this fix is whether it
> Andrew> would be possible to combine at least parts of syms_from_objfile_1
> Andrew> with the core of reread_symbols.  I did have a go at doing this but
> Andrew> gave up in the end due to the subtle differences between the two.
> Andrew> Still, I think that with some more effort this might be possible, and
> Andrew> this could be a nice clean up.
> 
> A long time ago, Jan had a patch along these lines.
> I believe what his did was just throw away the logic in reread_symbols
> in favor of simply creating a new objfile.  I wonder if it's too late to
> do this now, since objfiles are exposed to Python.

IIRC, that patch walked all the places that store objfile pointers,
to recreate the objfiles.  IMO, an approach that avoids that would be
better.

> 
> Anyway, IMO, if there are subtle differences, they are probably bugs of
> some sort; and unifying these code paths seems like clearly the right
> thing to do.

Agreed.

Thanks,
Pedro Alves


      parent reply	other threads:[~2020-01-27 19:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26 11:31 Andrew Burgess
2020-01-26 16:33 ` Tom Tromey
2020-01-26 21:51   ` Tom Tromey
2020-01-27 20:32     ` Pedro Alves
2020-01-27 19:07   ` Pedro Alves [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=f9d4914e-2932-2894-6a11-d0517125f2d1@redhat.com \
    --to=palves@redhat.com \
    --cc=andrew.burgess@embecosm.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