diff options
author | Yao Qi <yao@codesourcery.com> | 2014-01-10 13:59:26 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-01-24 21:31:26 +0800 |
commit | 5d6df423905215fc5ef796f20525cd84f92c3a8e (patch) | |
tree | 430208f5130633a20b478c56ed1605d172508709 /gdb/ada-lang.c | |
parent | d9d94ac86ba0193c897d1fc80b551996ae959d50 (diff) | |
download | gdb-5d6df423905215fc5ef796f20525cd84f92c3a8e.zip gdb-5d6df423905215fc5ef796f20525cd84f92c3a8e.tar.gz gdb-5d6df423905215fc5ef796f20525cd84f92c3a8e.tar.bz2 |
Change len's type to ULONGEST: remote_write_bytes_aux
Hi,
This patch changes the type of 'len' from ssize_t to ULONGEST.
At the beginning Siddhesh Poyarekar proposed this patch
[PATCH] Memory reads and writes should have size_t length
https://sourceware.org/ml/gdb-patches/2012-05/msg01073.html
to change type of 'len' to size_t. However, after Jan's review, we
decide to change it to ssize_t, because callers of these functions
may pass signed type to them.
AFAICS, the target layer is a boundary. In one side, we pass size_t
or ssize_t to target related APIs, and in the other side, the
implementation side, we used LONGEST (ULONGEST in latest code) because
of to_xfer_partial.
Since remote_write_bytes_aux and remote_write_bytes belong to the
implementation of remote target, we should use ULONGEST for len, IMO.
Regression tested on x86_64-linux. Is it OK?
gdb:
2014-01-24 Yao Qi <yao@codesourcery.com>
* remote.c (remote_write_bytes_aux): Change type of 'len' to
ULONGEST. Don't check 'len' is negative.
(remote_write_bytes): Change type of 'len' to ULONGEST.
Diffstat (limited to 'gdb/ada-lang.c')
0 files changed, 0 insertions, 0 deletions