From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tom@tromey.com>
Cc: cbiesinger@google.com, simon.marchi@polymtl.ca,
gdb-patches@sourceware.org, palves@redhat.com
Subject: Re: gnulib stat problem (Was: [pushed] Update Gnulib to the latest git version)
Date: Tue, 14 Jan 2020 21:10:00 -0000 [thread overview]
Message-ID: <834kwx6cte.fsf@gnu.org> (raw)
In-Reply-To: <87imle7z8x.fsf_-_@tromey.com> (message from Tom Tromey on Tue, 14 Jan 2020 09:56:46 -0700)
> From: Tom Tromey <tom@tromey.com>
> CC: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org, palves@redhat.com
> Date: Tue, 14 Jan 2020 09:56:46 -0700
>
> (gdb) file ./t.exe
> Reading symbols from ./t.exe...
> (gdb) run
> `C:\home\tromey\t.exe' has changed; re-reading symbols.
> Starting program: C:\home\tromey\t.exe
>
> I believe what is happening here is that gdb is using the gnulib stat
> (or fstat or whatever), which adjusts for timezone; but BFD is using
> plain stat, which does not. However, gdb will end up comparing an
> time_t coming from the gnulib stat with a time_t coming from
> bfd_get_mtime, which causes this problem.
Been there, done that, have scars to prove.
> I suppose the principled answer is to change BFD and the rest of the
> tree to use gnulib. This seems like a pain, so I'd rather avoid it.
> Also, if binutils doesn't want this, we'll still have the bug.
>
> Another idea would be to avoid bfd_get_mtime entirely in gdb. I don't
> know how feasible this is, given that (I think) we need it to call
> through the iovec.
>
> Maybe gdb could *only* use bfd_get_mtime when it matters. This would
> mean changing gdb_bfd_open to create a BFD before checking the cache,
> but maybe that's not very expensive.
>
> I'd appreciate your thoughts on the topic.
Regardless of what we do about this particular issue, maybe you could
report this to bug-gnulib, as one more evidence how redefining 'stat'
in Gnulib causes problems. Because my report about a similar problem,
here:
https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00205.html
didn't convince the Gnulib developers.
Thanks.
next prev parent reply other threads:[~2020-01-14 19:46 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-17 6:05 [review] Update Gnulib to the latest git version Christian Biesinger (Code Review)
2019-11-17 20:19 ` [review v2] " Christian Biesinger (Code Review)
2019-11-17 20:30 ` [review v3] " Christian Biesinger (Code Review)
2019-11-18 2:32 ` [review v4] " Christian Biesinger (Code Review)
2019-11-18 19:14 ` [review v5] " Christian Biesinger (Code Review)
2019-11-18 19:16 ` Christian Biesinger (Code Review)
2019-11-18 19:36 ` Simon Marchi (Code Review)
2019-11-18 20:02 ` [review v6] " Christian Biesinger (Code Review)
2019-11-18 20:03 ` [review v7] " Christian Biesinger (Code Review)
2019-11-18 20:03 ` Christian Biesinger (Code Review)
2019-11-18 20:12 ` [review v8] " Christian Biesinger (Code Review)
2019-11-18 20:50 ` [review v9] " Christian Biesinger (Code Review)
2019-11-18 20:59 ` [review v10] " Christian Biesinger (Code Review)
2019-11-18 21:10 ` Simon Marchi (Code Review)
2019-11-18 21:12 ` Simon Marchi (Code Review)
2019-11-18 21:17 ` [review v11] " Christian Biesinger (Code Review)
2019-11-18 21:18 ` Christian Biesinger (Code Review)
2019-11-21 22:33 ` [review v12] " Christian Biesinger (Code Review)
2019-11-22 23:47 ` Christian Biesinger (Code Review)
2019-11-25 23:34 ` [review v13] " Christian Biesinger (Code Review)
2019-11-26 4:40 ` Simon Marchi (Code Review)
2019-11-26 13:51 ` Tom Tromey (Code Review)
2019-11-26 17:28 ` Christian Biesinger (Code Review)
2019-12-06 20:18 ` Pedro Alves (Code Review)
2019-12-06 20:22 ` Christian Biesinger (Code Review)
2019-12-09 18:57 ` [review v14] " Christian Biesinger (Code Review)
2019-12-13 22:25 ` Tom Tromey (Code Review)
2019-12-16 18:17 ` [review v15] " Christian Biesinger (Code Review)
2019-12-16 18:18 ` Christian Biesinger (Code Review)
2019-12-16 18:22 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-16 18:22 ` Sourceware to Gerrit sync (Code Review)
2020-01-14 17:03 ` gnulib stat problem (Was: [pushed] Update Gnulib to the latest git version) Tom Tromey
2020-01-14 17:32 ` Hannes Domani via gdb-patches
2020-01-14 19:06 ` gnulib stat problem Tom Tromey
2020-01-14 21:10 ` Eli Zaretskii [this message]
2019-12-16 19:28 ` [review v16] Update Gnulib to the latest git version Pedro Alves (Code Review)
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=834kwx6cte.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=cbiesinger@google.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=simon.marchi@polymtl.ca \
--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