public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: GDB 8.2 branch 2018-06-11 Update
Date: Fri, 22 Jun 2018 14:21:00 -0000	[thread overview]
Message-ID: <20180622142146.GA3143@adacore.com> (raw)
In-Reply-To: <871sd3joml.fsf@tromey.com>

Hi Tom,

> Also I found out that this code in symfile.c:
> 
>       for (auto iter : new_objfiles)
> 	gdb::observers::new_objfile.notify (objfile);
> 
> ... had a bug introduced by
> 
>     commit 4c404b8be6b1d8759eed50366207fc0e2e47d2b1
>     Author: Tom Tromey <tom@tromey.com>
>     Date:   Fri Apr 7 15:58:25 2017 -0600
> 
>         Use std::vector in reread_symbols
> 
> Previously it read:
> 
> -      for (ix = 0; VEC_iterate (objfilep, new_objfiles, ix, objfile); ix++)
> -	observer_notify_new_objfile (objfile);
> 
> ... where "objfile" was used in the iteration -- so now the wrong
> objfile is being passed to the observers.
> 
> Fixing this is trivial, but I suppose a test case would be good.  Maybe
> the simplest way would be a Python test (so it can hook into the
> observer) plus a shared library?  I am actually not sure.  I guess I'm
> sort of hoping not to write it.

I'm hesitating on that one. Personally, I would accept the patch without
a testcase based on it being trivial; but on the other hand, it seems
worth giving the testcase a reasonable try, as I am hoping it might not
be an unreasonable amount of work to create it, and although the fix is
trivial, we did introduce that regression, so it's something that can
happen if we continue without a testcase.

-- 
Joel

  reply	other threads:[~2018-06-22 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11 22:56 Joel Brobecker
2018-06-12  0:19 ` Sergio Durigan Junior
2018-06-12  8:29 ` Alan Hayward
2018-06-12 12:59   ` Simon Marchi
2018-06-12 21:57 ` Philippe Waroquiers
2018-06-19  6:07 ` Tom Tromey
2018-06-22 14:21   ` Joel Brobecker [this message]
2018-06-22 20:37     ` Tom Tromey

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=20180622142146.GA3143@adacore.com \
    --to=brobecker@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).