This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Include putpkt in TRY_CATCH. PR gdb/15275
- From: Gareth McMullin <gareth at blacksphere dot co dot nz>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 28 Mar 2013 15:38:07 -0700
- Subject: Re: Include putpkt in TRY_CATCH. PR gdb/15275
- References: <CAL8qUbrD=fgMP7nE0O8tX=AXifUpQXas25o_4SfK4p79rfoUpw at mail dot gmail dot com> <CAL8qUbqjtBKJFJZ6dPS78Zh8Eb3b33U9JXTmn1pS3Le93xt7Rw at mail dot gmail dot com> <20130325195832 dot GA15218 at host2 dot jankratochvil dot net> <515478BE dot 3030801 at redhat dot com>
On Thu, Mar 28, 2013 at 10:07 AM, Pedro Alves <palves@redhat.com> wrote:
> So, per Gareth's analysis, with tcp, where this is not reproducible,
> we don't error out on sends, but instead detect the error on the
> subsequent readchar. When that read fails, we throw the target away,
> and throw TARGET_CLOSE_ERROR. He was suggesting making ser-unix.c
> fake success too on failed writes, so we'd get to readchar detecting
> the error on serial ports too. But, why not let the error
> propagate out of serial_write, and catch it at the remote level
> instead of delaying the inevitable? IOW, throw away the target
> if writing fails too.
I like this approach, it is a better solution. Thank you.
Gareth