Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Hannes Domani via gdb-patches" <gdb-patches@sourceware.org>
To: Christian Biesinger <cbiesinger@google.com>, Tom Tromey <tom@tromey.com>
Cc: Simon Marchi <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 17:32:00 -0000	[thread overview]
Message-ID: <112628616.18983668.1579021401412@mail.yahoo.com> (raw)
In-Reply-To: <87imle7z8x.fsf_-_@tromey.com>

 Am Dienstag, 14. Januar 2020, 17:57:10 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:

> >> Update Gnulib to the latest git version
>
> I think that this patch introduced a regression on Windows, and I'm
> wondering what to do about it.
>
> After merging this in locally, we saw some gdb crashes.  I have a patch
> for the crash (will send it soon), but there's still a problem.
> Specifically, the first time I "run", gdb always thinks the executable
> has changed, even if it has not:
>
>     (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.
>
> 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.

I reported this issue some time ago:
https://sourceware.org/bugzilla/show_bug.cgi?id=25302


  reply	other threads:[~2020-01-14 17:03 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)
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 [this message]
2020-01-14 19:06     ` gnulib stat problem Tom Tromey
2020-01-14 21:10     ` gnulib stat problem (Was: [pushed] Update Gnulib to the latest git version) Eli Zaretskii
2019-12-16 18:22 ` [pushed] Update Gnulib to the latest git version Sourceware to Gerrit sync (Code Review)
2019-12-16 19:28 ` [review v16] " 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=112628616.18983668.1579021401412@mail.yahoo.com \
    --to=gdb-patches@sourceware.org \
    --cc=cbiesinger@google.com \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    --cc=ssbssa@yahoo.de \
    --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