public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "ssbssa at sourceware dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/31636] GDB 14 incorrectly reads/handles file timestamps on i686-w64-mingw32 hosts
Date: Fri, 12 Apr 2024 17:52:42 +0000	[thread overview]
Message-ID: <bug-31636-4717-oZ8BByugQI@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31636-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31636

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ssbssa at sourceware dot org

--- Comment #2 from Hannes Domani <ssbssa at sourceware dot org> ---
The reason is, gnulib/config.h has this define:

```
/* For 64-bit time_t on 32-bit mingw. */
#define __MINGW_USE_VC2005_COMPAT 1
```

And bfd doesn't do this, so you get different definitions of struct stat.

In bfd/bfdio.c:

```
(top-gdb) pt buf
type = struct _stati64 {
    _dev_t st_dev;
    _ino_t st_ino;
    unsigned short st_mode;
    short st_nlink;
    short st_uid;
    short st_gid;
    _dev_t st_rdev;
    long long st_size;
    __time32_t st_atime;
    __time32_t st_mtime;
    __time32_t st_ctime;
}
```

And in gdb/symfile.c:

```
(top-gdb) pt new_statbuf
type = struct _stat64 {
    _dev_t st_dev;
    _ino_t st_ino;
    unsigned short st_mode;
    short st_nlink;
    short st_uid;
    short st_gid;
    _dev_t st_rdev;
    long long st_size;
    __time64_t st_atime;
    __time64_t st_mtime;
    __time64_t st_ctime;
}
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-04-12 17:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 16:08 [Bug gdb/31636] New: " peter0x44 at disroot dot org
2024-04-12 16:09 ` [Bug gdb/31636] " peter0x44 at disroot dot org
2024-04-12 16:21 ` peter0x44 at disroot dot org
2024-04-12 17:52 ` ssbssa at sourceware dot org [this message]
2024-04-12 18:11 ` pedro at palves dot net
2024-04-13  2:18 ` peter0x44 at disroot dot org
2024-04-13  2:20 ` peter0x44 at disroot dot org
2024-04-13 11:15 ` ssbssa at sourceware dot org
2024-04-19 20:44 ` tromey at sourceware dot org

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=bug-31636-4717-oZ8BByugQI@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).