* Re: GDB: error detected on stdin [not found] <BANLkTi=dK2wZ8nN86QvWpePEk0DEgLQ2jA@mail.gmail.com> @ 2011-05-24 14:32 ` Andreas Schwab 2011-05-24 19:14 ` Tom Tromey 0 siblings, 1 reply; 4+ messages in thread From: Andreas Schwab @ 2011-05-24 14:32 UTC (permalink / raw) To: Vikash Jain; +Cc: gdb, gdb-patches Vikash Jain <vikashjin@gmail.com> writes: > I'm trying to pipe commands to gdb but I get the following messages. > Will it cause any problems? How do i resolve the same? 2011-05-24 Andreas Schwab <schwab@redhat.com> * event-loop.c (handle_file_event): Don't handle POLLHUP as error. --- event-loop.c.~1.49.~ 2011-03-22 11:59:52.000000000 +0100 +++ event-loop.c 2011-05-24 16:27:28.614311098 +0200 @@ -759,7 +759,6 @@ handle_file_event (event_data data) int mask; #ifdef HAVE_POLL int error_mask; - int error_mask_returned; #endif int event_file_desc = data.integer; @@ -783,22 +782,19 @@ handle_file_event (event_data data) if (use_poll) { #ifdef HAVE_POLL + /* POLLHUP means EOF, but can be combined with POLLIN to + signal more data to read. */ error_mask = POLLHUP | POLLERR | POLLNVAL; - mask = (file_ptr->ready_mask & file_ptr->mask) | - (file_ptr->ready_mask & error_mask); - error_mask_returned = mask & error_mask; + mask = file_ptr->ready_mask & (file_ptr->mask | error_mask); - if (error_mask_returned != 0) + if ((mask & (POLLERR | POLLNVAL)) != 0) { /* Work in progress. We may need to tell somebody what kind of error we had. */ - if (error_mask_returned & POLLHUP) - printf_unfiltered (_("Hangup detected on fd %d\n"), - file_ptr->fd); - if (error_mask_returned & POLLERR) + if (mask & POLLERR) printf_unfiltered (_("Error detected on fd %d\n"), file_ptr->fd); - if (error_mask_returned & POLLNVAL) + if (mask & POLLNVAL) printf_unfiltered (_("Invalid or non-`poll'able fd %d\n"), file_ptr->fd); file_ptr->error = 1; Andreas. -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB: error detected on stdin 2011-05-24 14:32 ` GDB: error detected on stdin Andreas Schwab @ 2011-05-24 19:14 ` Tom Tromey 2011-05-25 7:59 ` Andreas Schwab 0 siblings, 1 reply; 4+ messages in thread From: Tom Tromey @ 2011-05-24 19:14 UTC (permalink / raw) To: Andreas Schwab; +Cc: Vikash Jain, gdb, gdb-patches >>>>> "Andreas" == Andreas Schwab <schwab@redhat.com> writes: Andreas> 2011-05-24 Andreas Schwab <schwab@redhat.com> Andreas> * event-loop.c (handle_file_event): Don't handle POLLHUP as error. This is ok. IIRC this fixes some PR as well. Tom ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB: error detected on stdin 2011-05-24 19:14 ` Tom Tromey @ 2011-05-25 7:59 ` Andreas Schwab 2011-05-25 8:10 ` Vikash Jain 0 siblings, 1 reply; 4+ messages in thread From: Andreas Schwab @ 2011-05-25 7:59 UTC (permalink / raw) To: Tom Tromey; +Cc: Vikash Jain, gdb, gdb-patches Tom Tromey <tromey@redhat.com> writes: >>>>>> "Andreas" == Andreas Schwab <schwab@redhat.com> writes: > > Andreas> 2011-05-24 Andreas Schwab <schwab@redhat.com> > Andreas> * event-loop.c (handle_file_event): Don't handle POLLHUP as error. > > This is ok. IIRC this fixes some PR as well. Yep, it's 8677. Andreas. -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB: error detected on stdin 2011-05-25 7:59 ` Andreas Schwab @ 2011-05-25 8:10 ` Vikash Jain 0 siblings, 0 replies; 4+ messages in thread From: Vikash Jain @ 2011-05-25 8:10 UTC (permalink / raw) To: Andreas Schwab; +Cc: Tom Tromey, gdb, gdb-patches Thanks a lot, fix worked for me. On Wed, May 25, 2011 at 1:29 PM, Andreas Schwab <schwab@redhat.com> wrote: > Tom Tromey <tromey@redhat.com> writes: > >>>>>>> "Andreas" == Andreas Schwab <schwab@redhat.com> writes: >> >> Andreas> 2011-05-24 Andreas Schwab <schwab@redhat.com> >> Andreas> * event-loop.c (handle_file_event): Don't handle POLLHUP as error. >> >> This is ok. IIRC this fixes some PR as well. > > Yep, it's 8677. > > Andreas. > > -- > Andreas Schwab, schwab@redhat.com > GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E > "And now for something completely different." > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-25 8:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <BANLkTi=dK2wZ8nN86QvWpePEk0DEgLQ2jA@mail.gmail.com>
2011-05-24 14:32 ` GDB: error detected on stdin Andreas Schwab
2011-05-24 19:14 ` Tom Tromey
2011-05-25 7:59 ` Andreas Schwab
2011-05-25 8:10 ` Vikash Jain
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox