This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: fix file descripter mapping for sim_callback->close et al
- From: amylaar at spamcop dot net (Joern Rennecke)
- To: gdb-patches at sources dot redhat dot com
- Cc: joern dot rennecke at superh dot com
- Date: Sun, 27 Jun 2004 04:21:50 +0100 (BST)
- Subject: Re: RFA: fix file descripter mapping for sim_callback->close et al
I've found that I've missed actually marking the file descriptors as free
on startup. I've checked the attached on-liner in as an obvious fix.
2004-06-27 J"orn Rennecke <joern.rennecke@superh.com>
* callback.c (os_shutdown): Fix bug in last change: actually
mark file descriptors as available on startup.
Index: callback.c
===================================================================
RCS file: /cvs/src/src/sim/common/callback.c,v
retrieving revision 1.9
diff -p -r1.9 callback.c
*** callback.c 25 Jun 2004 16:48:03 -0000 1.9
--- callback.c 27 Jun 2004 03:12:42 -0000
*************** os_shutdown (p)
*** 453,458 ****
--- 453,459 ----
/* At the initial call of os_init, we got -1, 0, 0, 0, ... */
if (next < 0)
{
+ p->fd_buddy[i] = -1;
do_close = 0;
break;
}