Re: [patch] Gdbserver error codes

Nathan J. Williams
2004-02-26T17:08:12Z

Daniel Jacobowitz <drow@false.org> writes:

> Thanks to Eli for making me look closer at this. Parts of remote.c
> will reject ENN; in particular, ENN will cause remote_write_bytes to return
> an error but remote_read_bytes not to. Thus the 0xffffffff gdbserver has
> been printing instead of an error message for inaccessible memory regions.

I still don't see that gdbserver will actually return an error if the
memory read fails; the target_ops read routine doesn't return an error
to the upper level, and the low transfer routines don't check the
ptrace return value and errno. I can put together my patches to
address this if there's interest.

(while I'm at it, is there anything specifying that the hex format for
returned data is lowercase hex, or is the capital-E error return the only
implicit statement of that?)

- Nathan