diff options
author | Joern Rennecke <joern.rennecke@arc.com> | 2004-06-25 16:48:03 +0000 |
---|---|---|
committer | Joern Rennecke <joern.rennecke@arc.com> | 2004-06-25 16:48:03 +0000 |
commit | a2ab2b41796fb0362e9f9b73c72a6e3e1bf8ce6b (patch) | |
tree | 8351d5f84e45a9fbd1820b3b05b1120798f0e2ac /include | |
parent | ea7581b984da38e087a0695a8bdec2af83a8750c (diff) | |
download | gdb-a2ab2b41796fb0362e9f9b73c72a6e3e1bf8ce6b.tar.gz |
2004-06-25 J"orn Rennecke <joern.rennecke@superh.com>
include/gdb:
* callback.h (host_callback_struct): Replace members fdopen and
alwaysopen with fd_buddy.
sim/common:
* callback.c: Changed all users.
Diffstat (limited to 'include')
-rw-r--r-- | include/gdb/ChangeLog | 6 | ||||
-rw-r--r-- | include/gdb/callback.h | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog index 3a17b1d797f..80a9e0650e7 100644 --- a/include/gdb/ChangeLog +++ b/include/gdb/ChangeLog @@ -1,3 +1,9 @@ +2004-06-25 J"orn Rennecke <joern.rennecke@superh.com> + + * callback.h (host_callback_struct): Replace members fdopen and + alwaysopen with fd_buddy. + [sim/common: * callback.c: Changed all users. ] + 2003-10-31 Kevin Buettner <kevin@redhat.com> * sim-frv.h: New file. diff --git a/include/gdb/callback.h b/include/gdb/callback.h index 3fa419143ae..aa956d05f47 100644 --- a/include/gdb/callback.h +++ b/include/gdb/callback.h @@ -123,8 +123,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; |