This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: RFA: remote.c (remote_send): Do not assume what to do on error


Fernando Nasser wrote:
> 
> remote_send() makes assumptions about what the caller wants to do about
> errors reported by the stub.  And it assumes it should longjump!
> 
> I believe it should just return the error code (in the buffer) and let
> the caller decide.  The patch below makes this change and adds a test for
> the error in the only place it makes sense to do it.
> 
>         * remote.c (remote_send): Do not call error(). Do not assume what
>         the caller wants to do on an error condition.  Just return the
>         buffer with the error code.
>         (store_register_using_P): Test for write register result.

Should all calls to remote_send() be changed so that they check the
return value?

	Andrew

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