[Bug win32/25302] New: Mismatching fstat() function calls in gdb_bfd_open() and cache_bstat()

ssbssa at yahoo dot de sourceware-bugzilla@sourceware.org
Fri Dec 20 19:05:00 GMT 2019


            Bug ID: 25302
           Summary: Mismatching fstat() function calls in gdb_bfd_open()
                    and cache_bstat()
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: win32
          Assignee: unassigned at sourceware dot org
          Reporter: ssbssa at yahoo dot de
  Target Milestone: ---

The fstat() call in cache_bstat() (cache.c) uses the "normal" function of the
but the one in gdb_bfd_open() (gdb_bfd.c) uses the redefined variant
rpl_fstat() of gnulib.

But both of them return different values in st_mtime (timezone difference?),
which makes htab_find_with_hash() then fail to find the cached value in

It's not even possible to start a simple hello world application, gdb always

As a workaround I did push_macro/undef both fstat and stat before
gdb_bfd_open(), und pop_macro afterwards.
This works fine for me so far, but there are probably other fstat() calls which
might have a similar problem, and also the same might be true for stat() calls.

It probably started with commit c0c3707ff46ccfb78ea175dd42d628d8c90dca8b
(Update Gnulib to the latest git version).

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

More information about the Gdb-prs mailing list