This is the mail archive of the
mailing list for the GDB project.
interpreter-exec on mingw/cygwin gdb-7.6.2 fails
- From: Tim Sander <tim at krieglstein dot org>
- To: gdb at sourceware dot org
- Date: Thu, 05 Sep 2013 15:36:08 +0200
- Subject: interpreter-exec on mingw/cygwin gdb-7.6.2 fails
- Authentication-results: sourceware.org; auth=none
I have noticed that interpretex-exec completly fails on mingw/cygwin if
executed with "source <cmdfile>" or gdb -x cmdfile.
The content of cmdfile is for example:
interpreter-exec console "set target-async off"
After that console gets continually printed with:
(gdb) select: Bad file descriptor.
Whch comes from event-loop.c, gdb_wait_for_event,
and gdb does not seem to react any more to any input.
First (see patch below) i thought that there might be a stale handle of the
recursive called interpreter but gdb_notifier only contains one handle at this
time so it seems as if the file handle got stale/corrupted in some way during
the inner interpreter call. (Also closing this handle stops gdb execution).
I would be happy if someone would have an idea how tackle this error.
Note this is not fixed by the hack below, which fixes
albeit in a not so clean way as it just cleans up and ignores any error :-(.
But at least its better than the current state which just quits gdb.
gdb/event-loop.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index f34f153..fb394ce 100644
@@ -736,9 +736,10 @@ handle_file_event (event_data data)
printf_unfiltered (_("Error detected on fd %d\n"),
if (mask & POLLNVAL)
- printf_unfiltered (_("Invalid or non-`poll'able fd %d\n"),
+ printf_unfiltered (_("Invalid or non-`poll'able fd %d\n
- file_ptr->error = 1;
+ file_ptr->error = 0;
file_ptr->error = 0;