aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracefile-tfile.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-07-09 09:00:42 -0600
committerTom Tromey <tom@tromey.com>2023-07-10 13:02:11 -0600
commitd3a05ac8957b3e654f9f04aa7ae3a1bd24e496b7 (patch)
tree187c0523b572a1a7ab1431c9369c1ccd88f101c5 /gdb/tracefile-tfile.c
parentebd4fd0a4fe6b35560cdf94d6d0b30801d954126 (diff)
downloadbinutils-d3a05ac8957b3e654f9f04aa7ae3a1bd24e496b7.zip
binutils-d3a05ac8957b3e654f9f04aa7ae3a1bd24e496b7.tar.gz
binutils-d3a05ac8957b3e654f9f04aa7ae3a1bd24e496b7.tar.bz2
Constify tfile_interp_line
This adds 'const' to tfile_interp_line. Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/tracefile-tfile.c')
-rw-r--r--gdb/tracefile-tfile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c
index d3304b0..59055e7 100644
--- a/gdb/tracefile-tfile.c
+++ b/gdb/tracefile-tfile.c
@@ -424,7 +424,7 @@ int trace_regblock_size;
static std::string trace_tdesc;
static void tfile_append_tdesc_line (const char *line);
-static void tfile_interp_line (char *line,
+static void tfile_interp_line (const char *line,
struct uploaded_tp **utpp,
struct uploaded_tsv **utsvp);
@@ -574,15 +574,15 @@ tfile_target_open (const char *arg, int from_tty)
file. */
static void
-tfile_interp_line (char *line, struct uploaded_tp **utpp,
+tfile_interp_line (const char *line, struct uploaded_tp **utpp,
struct uploaded_tsv **utsvp)
{
- char *p = line;
+ const char *p = line;
if (startswith (p, "R "))
{
p += strlen ("R ");
- trace_regblock_size = strtol (p, &p, 16);
+ trace_regblock_size = strtol (p, nullptr, 16);
}
else if (startswith (p, "status "))
{