* callback.h (struct host_callback_struct): New member lstat.
[deliverable/binutils-gdb.git] / include / gdb / callback.h
index 3fa419143aed3ff971bb27151be2853d5b0cae1e..fbaef249d9b3532309ee04f04b1591637ab7d471 100644 (file)
@@ -93,6 +93,7 @@ struct host_callback_struct
   void (*flush_stderr) PARAMS ((host_callback *));
   int (*stat) PARAMS ((host_callback *, const char *, struct stat *));
   int (*fstat) PARAMS ((host_callback *, int, struct stat *));
+  int (*lstat) PARAMS ((host_callback *, const char *, struct stat *));
   int (*ftruncate) PARAMS ((host_callback *, int, long));
   int (*truncate) PARAMS ((host_callback *, const char *, long));
 
@@ -123,8 +124,15 @@ struct host_callback_struct
   int last_errno;              /* host format */
 
   int fdmap[MAX_CALLBACK_FDS];
-  char fdopen[MAX_CALLBACK_FDS];
-  char alwaysopen[MAX_CALLBACK_FDS];
+  /* fd_buddy is used to contruct circular lists of target fds that point to
+     the same host fd.  A uniquely mapped fd points to itself; for a closed
+     one, fd_buddy has the value -1.  The host file descriptors for stdin /
+     stdout / stderr are never closed by the simulators, so they are put
+     in a special fd_buddy circular list which also has MAX_CALLBACK_FDS
+     as a member.  */
+  /* ??? We don't have a callback entry for dup, although it is trival to
+     implement now.  */
+  short fd_buddy[MAX_CALLBACK_FDS+1];
 
   /* System call numbers.  */
   CB_TARGET_DEFS_MAP *syscall_map;
@@ -181,6 +189,9 @@ extern host_callback default_callback;
 #define CB_SYS_chmod   16
 #define CB_SYS_utime   17
 #define CB_SYS_time    18
+
+/* More standard syscalls.  */
+#define CB_SYS_lstat    19
 \f
 /* Struct use to pass and return information necessary to perform a
    system call.  */
This page took 0.023246 seconds and 4 git commands to generate.