This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb and binutils branch master updated. 2d7bb7580ac174127f8ae127ebc4156a91035fc0


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  2d7bb7580ac174127f8ae127ebc4156a91035fc0 (commit)
      from  fd9edc908915788839e7605e2fe4c00f4b3eb3db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2d7bb7580ac174127f8ae127ebc4156a91035fc0

commit 2d7bb7580ac174127f8ae127ebc4156a91035fc0
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Wed Dec 3 02:33:13 2014 -0500

    callback.h:struct host_callback_struct compilation error on Windows hosts.
    
    On Windows, a recent gnulib update imported the lstat module, and
    this caused a remote-sim.c build failure in struct host_callback_struct:
    
        In file included from /[...]/gdb/remote-sim.c:34:0:
        /[...]/gdb/../include/gdb/callback.h:93:9: error: duplicate member '_stati64'
           int (*lstat) (host_callback *, const char *, struct stat *);
                 ^
    What happens it that gnulib's stat.h makes the following defines:
    
         /* Large File Support on native Windows.  */
         #if 1
         # define stat _stati64
         #endif
    
    and then:
    
        #if 1
        # if ! 0
        /* mingw does not support symlinks, therefore it does not have lstat.  But
           without links, stat does just fine.  */
        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
        #   define lstat stat
        #  endif
    
    So, the following fields in struct host_callback_struct...
    
          int (*stat) (host_callback *, const char *, struct stat *);
          int (*fstat) (host_callback *, int, struct stat *);
          int (*lstat) (host_callback *, const char *, struct stat *);
    
    ... get translated to...
    
          int (*_stati64) (host_callback *, const char *, struct _stati64 *);
          int (*_fstati64) (host_callback *, int, struct _stati64 *);
          int (*_stati64) (host_callback *, const char *, struct _stati64 *);
    
    ... which causes two fields to have the same name.
    
    This patch fixes the issue by renaming the stat-related fields
    by adding a "to_" prefix, similar to what is done in GDB's
    target_ops vector.
    
    include/gdb/ChangeLog:
    
    	* callback.h (struct host_callback_struct) <to_stat>: Renamed
    	from "stat".
    	<to_fstat>: Renamed from "fstat".
    	<to_lstat>: Renamed from "lstat".
    
    sim/common/ChangeLog:
    
    	* sim-io.c (sim_io_stat, sim_io_fstat): Adjust calls to "stat"
    	and "fstat" callbacks by calls to "to_stat" and "to_fstat" (resp)
    	callbacks following renaming in callback.h.
    	* syscall.c (cb_syscall): Likewise.  Adjust calls to "lstat"
    	callback by call to "to_lstat" callback
    
    sim/cris/ChangeLog:
    
    	* traps.c (cris_break_13_handler): Adjust call to "fstat" callback
    	by call to "to_fstat" following renaming in callback.h.
    
    sim/h8300/ChangeLog:
    
    	* compile.c (sim_resume):  Adjust calls to "stat" and "fstat"
    	callbacks by calls to "to_stat" and "to_fstat" (resp) callbacks
    	following renaming in callback.h.

-----------------------------------------------------------------------

Summary of changes:
 include/gdb/ChangeLog  |    7 +++++++
 include/gdb/callback.h |    6 +++---
 sim/common/ChangeLog   |    8 ++++++++
 sim/common/sim-io.c    |    4 ++--
 sim/common/syscall.c   |    6 +++---
 sim/cris/ChangeLog     |    5 +++++
 sim/cris/traps.c       |    2 +-
 sim/h8300/ChangeLog    |    6 ++++++
 sim/h8300/compile.c    |    5 +++--
 9 files changed, 38 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
gdb and binutils


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]