summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/remote-utils.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-09-29 17:15:36 +0100
committerPedro Alves <palves@redhat.com>2017-09-29 17:15:36 +0100
commit256642e857886f1e3da86ce2484f9df5a5a6b904 (patch)
tree80086d69d81e32f997070c0ca6700a7c38f94b27 /gdb/gdbserver/remote-utils.c
parentb6bb34680b9c99961b6cd635853552ec6569a2a4 (diff)
downloadbinutils-gdb-256642e857886f1e3da86ce2484f9df5a5a6b904.tar.gz
Constify unpack_varlen_hex & fix fallout
I ran into non-const unpack_varlen_hex while working on something else, and decided to just fix it first. Ends up constifying a good deal of remote packet parsing. gdb/ChangeLog: 2017-09-29 Pedro Alves <palves@redhat.com> * common/rsp-low.c (unpack_varlen_hex): Constify. * common/rsp-low.h (unpack_varlen_hex): Constify. * linux-nat.c (linux_child_static_tracepoint_markers_by_strid): Constify. * remote.c (remote_set_permissions, read_ptid) (remote_current_thread, remote_get_threads_with_qthreadinfo) (remote_static_tracepoint_marker_at) (remote_static_tracepoint_markers_by_strid) (stop_reply_extract_thread, remote_parse_stop_reply): Constify. * tracepoint.c (parse_trace_status, parse_tracepoint_status) (parse_tracepoint_definition, parse_tsv_definition) (parse_static_tracepoint_marker_definition): Constify. * tracepoint.h (parse_static_tracepoint_marker_definition) (parse_trace_status, parse_tracepoint_status) (parse_tracepoint_definition, parse_tsv_definition): Constify. gdb/gdbserver/ChangeLog: 2017-09-29 Pedro Alves <palves@redhat.com> * ax.c (gdb_parse_agent_expr): Constify. * ax.h (gdb_parse_agent_expr): Constify. * mem-break.c (add_breakpoint_condition, add_breakpoint_commands): Constify. * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify. * remote-utils.c (hex_or_minus_one, read_ptid): Constify. * remote-utils.h (read_ptid): Constify. * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont) (process_point_options, process_serial_event): Constify. * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc) (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp) (cmd_qtbuffer): Constify.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r--gdb/gdbserver/remote-utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 761604683cb..66e065225b1 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -533,7 +533,7 @@ write_ptid (char *buf, ptid_t ptid)
}
static ULONGEST
-hex_or_minus_one (char *buf, char **obuf)
+hex_or_minus_one (const char *buf, const char **obuf)
{
ULONGEST ret;
@@ -554,10 +554,10 @@ hex_or_minus_one (char *buf, char **obuf)
/* Extract a PTID from BUF. If non-null, OBUF is set to the to one
passed the last parsed char. Returns null_ptid on error. */
ptid_t
-read_ptid (char *buf, char **obuf)
+read_ptid (const char *buf, const char **obuf)
{
- char *p = buf;
- char *pp;
+ const char *p = buf;
+ const char *pp;
ULONGEST pid = 0, tid = 0;
if (*p == 'p')