This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]Fix that GDB will get hang on Windows when using pipe to get stdout and stderr from stub


On Monday, July 16 2012, Terry Guo wrote:

>> 
>> Thanks.  These are all no-brainers, so I think the patch is still good
>> to go in.
>
> Sorry to bother you again. I realized I haven't gdb write permission. Could
> you please help me to commit it at your convenient time? The attachment is
> the patch against the latest gdb trunk.

Hello Terry,

I only read the thread now, so sorry for coming with comments after
Eli's approval.  Anyway, it's just a small nit.

> diff --git a/gdb/ser-base.c b/gdb/ser-base.c
> index 2f12dfc..152b1aa 100644
> --- a/gdb/ser-base.c
> +++ b/gdb/ser-base.c
> @@ -25,6 +25,7 @@
>  
>  #include "gdb_select.h"
>  #include "gdb_string.h"
> +#include "gdb_assert.h"
>  #include <sys/time.h>
>  #ifdef USE_WIN32API
>  #include <winsock2.h>
> @@ -242,6 +243,64 @@ ser_base_wait_for (struct serial *scb, int timeout)
>      }
>  }
>  
> +/* Read any error output we might have.  */
> +
> +static void
> +ser_base_read_error_fd (struct serial *scb, int close_fd)
> +{
> +  if (scb->error_fd != -1)
> +    {
> +      ssize_t s;
> +      char buf[GDB_MI_MSG_WIDTH + 1];
> +
> +      for (;;)
> +        {
> +         char *current;

I notice you are not following the convention of converting 8 spaces to
a TAB character here and everywhere else.  Can you please fix it?  After
that, I can commit the patch for (if you don't have the permission yet).

-- 
Sergio


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]