aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-01-18 00:46:13 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2021-01-18 00:46:13 -0500
commitaa2838ccc592ea63f2b1d378bccd9388c18a8b96 (patch)
tree7feecd2ac1dc0770ebb2da3c65a6e000e5e27f45 /gdb/remote.c
parentb5c8f22d280c74ead1351e0f6e56a529f3b866b5 (diff)
downloadgdb-aa2838ccc592ea63f2b1d378bccd9388c18a8b96.zip
gdb-aa2838ccc592ea63f2b1d378bccd9388c18a8b96.tar.gz
gdb-aa2838ccc592ea63f2b1d378bccd9388c18a8b96.tar.bz2
gdb: const-ify hostio methods parameter in remote.c
gdb/ChangeLog: * remote.c (class remote_target) <remote_hostio_send_command, remote_hostio_parse_result>: Constify parameter. (remote_hostio_parse_result): Likewise. (remote_target::remote_hostio_send_command): Adjust. (remote_target::remote_hostio_pread_vFile): Adjust. (remote_target::fileio_readlink): Adjust. (remote_target::fileio_fstat): Adjust. Change-Id: I6b585b99937e6526a0a7e06261d2193114589912
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 17b0cab..b4c6fc2 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -705,7 +705,7 @@ public: /* Remote specific methods. */
ULONGEST offset, int *remote_errno);
int remote_hostio_send_command (int command_bytes, int which_packet,
- int *remote_errno, char **attachment,
+ int *remote_errno, const char **attachment,
int *attachment_len);
int remote_hostio_set_filesystem (struct inferior *inf,
int *remote_errno);
@@ -11969,8 +11969,8 @@ remote_buffer_add_int (char **buffer, int *left, ULONGEST value)
-1 is returned, the other variables may not be initialized. */
static int
-remote_hostio_parse_result (char *buffer, int *retcode,
- int *remote_errno, char **attachment)
+remote_hostio_parse_result (const char *buffer, int *retcode,
+ int *remote_errno, const char **attachment)
{
char *p, *p2;
@@ -12026,12 +12026,12 @@ remote_hostio_parse_result (char *buffer, int *retcode,
int
remote_target::remote_hostio_send_command (int command_bytes, int which_packet,
- int *remote_errno, char **attachment,
+ int *remote_errno, const char **attachment,
int *attachment_len)
{
struct remote_state *rs = get_remote_state ();
int ret, bytes_read;
- char *attachment_tmp;
+ const char *attachment_tmp;
if (packet_support (which_packet) == PACKET_DISABLE)
{
@@ -12242,7 +12242,7 @@ remote_target::remote_hostio_pread_vFile (int fd, gdb_byte *read_buf, int len,
{
struct remote_state *rs = get_remote_state ();
char *p = rs->buf.data ();
- char *attachment;
+ const char *attachment;
int left = get_remote_packet_size ();
int ret, attachment_len;
int read_len;
@@ -12406,7 +12406,7 @@ remote_target::fileio_readlink (struct inferior *inf, const char *filename,
{
struct remote_state *rs = get_remote_state ();
char *p = rs->buf.data ();
- char *attachment;
+ const char *attachment;
int left = get_remote_packet_size ();
int len, attachment_len;
int read_len;
@@ -12445,7 +12445,7 @@ remote_target::fileio_fstat (int fd, struct stat *st, int *remote_errno)
char *p = rs->buf.data ();
int left = get_remote_packet_size ();
int attachment_len, ret;
- char *attachment;
+ const char *attachment;
struct fio_stat fst;
int read_len;