public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org,  Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCHv2 5/5] gdb: fix reread_symbols when an objfile has target: prefix
Date: Thu, 28 Sep 2023 12:17:23 -0600	[thread overview]
Message-ID: <87il7u2mdo.fsf@tromey.com> (raw)
In-Reply-To: <ade2c1aec5a3ecf8477dd3c11aebe90c4940bc8f.1695909469.git.aburgess@redhat.com> (Andrew Burgess's message of "Thu, 28 Sep 2023 15:00:44 +0100")

Andrew> I didn't 100% understand the issues discussed in that thread, however,
Andrew> I think the problem with the previous thread related to the changes in
Andrew> gdb_bfd.c, rather than to the change in symfile.c.  As such, I think
Andrew> this change might be acceptable, my reasoning is:

Andrew>   - the objfile::mtime field is set by a call to bfd_get_mtime (see
Andrew>     objfiles.c), which calls bfd_stat under the hood.  This will end
Andrew>     up using the system stat,

Andrew>   - In symfile.c we currently call stat directly, which will call the
Andrew>     gnulib stat, which, if I understand the above thread correctly,
Andrew>     might give a different result to the system stat in some cases,

Andrew>   - By switching to using bfd_stat in symfile.c we should now be
Andrew>     consistently calling the system stat,

The BFD cache (in gdb_bfd.c) uses fstat, so I think there would still be
a problem here.

Tom

  reply	other threads:[~2023-09-28 18:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 14:22 [PATCH 0/5] Fix using an exec file with " Andrew Burgess
2023-09-27 14:22 ` [PATCH 1/5] gdb: some additional filename styling Andrew Burgess
2023-09-27 14:22 ` [PATCH 2/5] gdb: use archive name in warning when appropriate Andrew Burgess
2023-09-27 14:22 ` [PATCH 3/5] gdb: remove use of a static buffer for building error strings Andrew Burgess
2023-09-27 14:22 ` [PATCH 4/5] gdb: remove print_sys_errmsg Andrew Burgess
2023-09-28 12:06   ` Andrew Burgess
2023-09-27 14:22 ` [PATCH 5/5] gdb: fix reread_symbols when an objfile has target: prefix Andrew Burgess
2023-09-28 14:00 ` [PATCHv2 0/5] Fix using an exec file with " Andrew Burgess
2023-09-28 14:00   ` [PATCHv2 1/5] gdb: some additional filename styling Andrew Burgess
2023-09-28 14:00   ` [PATCHv2 2/5] gdb: use archive name in warning when appropriate Andrew Burgess
2023-09-28 14:00   ` [PATCHv2 3/5] gdb: remove use of a static buffer for building error strings Andrew Burgess
2023-09-28 14:00   ` [PATCHv2 4/5] gdb: remove print_sys_errmsg Andrew Burgess
2023-09-28 14:00   ` [PATCHv2 5/5] gdb: fix reread_symbols when an objfile has target: prefix Andrew Burgess
2023-09-28 18:17     ` Tom Tromey [this message]
2023-09-29 10:20       ` Andrew Burgess
2023-10-02 14:19         ` Tom Tromey
2023-10-02 16:05           ` Andrew Burgess
2023-10-02 17:00             ` Tom Tromey
2023-10-02 19:13   ` [PATCHv2 0/5] Fix using an exec file with " 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=87il7u2mdo.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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).