diff options
author | Pedro Alves <palves@redhat.com> | 2017-09-29 17:15:36 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-09-29 17:15:36 +0100 |
commit | 256642e857886f1e3da86ce2484f9df5a5a6b904 (patch) | |
tree | 80086d69d81e32f997070c0ca6700a7c38f94b27 /gdb/tracepoint.c | |
parent | b6bb34680b9c99961b6cd635853552ec6569a2a4 (diff) | |
download | gdb-256642e857886f1e3da86ce2484f9df5a5a6b904.zip gdb-256642e857886f1e3da86ce2484f9df5a5a6b904.tar.gz gdb-256642e857886f1e3da86ce2484f9df5a5a6b904.tar.bz2 |
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/tracepoint.c')
-rw-r--r-- | gdb/tracepoint.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 30e3a3a..b6e7fe5 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -3405,9 +3405,9 @@ merge_uploaded_trace_state_variables (struct uploaded_tsv **uploaded_tsvs) the remote protocol and the trace file reader. */ void -parse_trace_status (char *line, struct trace_status *ts) +parse_trace_status (const char *line, struct trace_status *ts) { - char *p = line, *p1, *p2, *p3, *p_temp; + const char *p = line, *p1, *p2, *p3, *p_temp; int end; ULONGEST val; @@ -3565,7 +3565,7 @@ Status line: '%s'\n"), p, line); } void -parse_tracepoint_status (char *p, struct breakpoint *bp, +parse_tracepoint_status (const char *p, struct breakpoint *bp, struct uploaded_tp *utp) { ULONGEST uval; @@ -3588,14 +3588,15 @@ parse_tracepoint_status (char *p, struct breakpoint *bp, an "uploaded tracepoint". */ void -parse_tracepoint_definition (char *line, struct uploaded_tp **utpp) +parse_tracepoint_definition (const char *line, struct uploaded_tp **utpp) { - char *p; + const char *p; char piece; ULONGEST num, addr, step, pass, orig_size, xlen, start; int enabled, end; enum bptype type; - char *cond, *srctype, *buf; + const char *srctype; + char *cond, *buf; struct uploaded_tp *utp = NULL; p = line; @@ -3703,9 +3704,10 @@ parse_tracepoint_definition (char *line, struct uploaded_tp **utpp) uploaded object. */ void -parse_tsv_definition (char *line, struct uploaded_tsv **utsvp) +parse_tsv_definition (const char *line, struct uploaded_tsv **utsvp) { - char *p, *buf; + const char *p; + char *buf; ULONGEST num, initval, builtin; int end; struct uploaded_tsv *utsv = NULL; @@ -3749,10 +3751,10 @@ free_current_marker (void *arg) the parsed marker definition. */ void -parse_static_tracepoint_marker_definition (char *line, char **pp, +parse_static_tracepoint_marker_definition (const char *line, const char **pp, struct static_tracepoint_marker *marker) { - char *p, *endp; + const char *p, *endp; ULONGEST addr; int end; |