diff options
Diffstat (limited to 'gdb/tracefile-tfile.c')
-rw-r--r-- | gdb/tracefile-tfile.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c index 44c6189..3ee7243 100644 --- a/gdb/tracefile-tfile.c +++ b/gdb/tracefile-tfile.c @@ -426,7 +426,7 @@ tfile_open (const char *arg, int from_tty) bytes += TRACE_HEADER_SIZE; if (!(header[0] == 0x7f - && (strncmp (header + 1, "TRACE0\n", 7) == 0))) + && (startswith (header + 1, "TRACE0\n")))) error (_("File is not a valid trace file.")); push_target (&tfile_ops); @@ -510,22 +510,22 @@ tfile_interp_line (char *line, struct uploaded_tp **utpp, { char *p = line; - if (strncmp (p, "R ", strlen ("R ")) == 0) + if (startswith (p, "R ")) { p += strlen ("R "); trace_regblock_size = strtol (p, &p, 16); } - else if (strncmp (p, "status ", strlen ("status ")) == 0) + else if (startswith (p, "status ")) { p += strlen ("status "); parse_trace_status (p, current_trace_status ()); } - else if (strncmp (p, "tp ", strlen ("tp ")) == 0) + else if (startswith (p, "tp ")) { p += strlen ("tp "); parse_tracepoint_definition (p, utpp); } - else if (strncmp (p, "tsv ", strlen ("tsv ")) == 0) + else if (startswith (p, "tsv ")) { p += strlen ("tsv "); parse_tsv_definition (p, utsvp); |