Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christian Biesinger <cbiesinger@google.com>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb: reset/recompute objfile section offsets in reread_symbols
Date: Wed, 20 May 2020 14:24:16 -0500	[thread overview]
Message-ID: <CAPTJ0XEur76p4C6og4FomWTWubY4jwLaBwteN-U8dtG6vWHhxA@mail.gmail.com> (raw)
In-Reply-To: <20200520192226.2889993-1-simon.marchi@efficios.com>

On Wed, May 20, 2020 at 2:22 PM Simon Marchi via Gdb-patches
<gdb-patches@sourceware.org> wrote:
> diff --git a/gdb/symfile.c b/gdb/symfile.c
> index dd8192a67fbb..b02a9235663b 100644
> --- a/gdb/symfile.c
> +++ b/gdb/symfile.c
> @@ -2543,6 +2543,11 @@ reread_symbols (void)
>              will need to be called (see discussion below).  */
>           obstack_free (&objfile->objfile_obstack, 0);
>           objfile->sections = NULL;
> +         objfile->section_offsets.clear ();
> +         objfile->sect_index_bss = -1;
> +         objfile->sect_index_data = -1;
> +         objfile->sect_index_rodata = -1;
> +         objfile->sect_index_text = -1;

Would it make sense to have a reset() function on objfile instead,
that handles all necesary clearing of members?

Christian


  reply	other threads:[~2020-05-20 19:24 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 [this message]
2020-05-20 19:34   ` Simon Marchi
2020-05-20 19:36 ` Tom Tromey
2020-05-20 19:43   ` Simon Marchi

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=CAPTJ0XEur76p4C6og4FomWTWubY4jwLaBwteN-U8dtG6vWHhxA@mail.gmail.com \
    --to=cbiesinger@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.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