Call strprefix instead of strncmp in event parsing
authorDon Breazeal <donb@codesourcery.com>
Wed, 30 Sep 2015 16:58:34 +0000 (09:58 -0700)
committerDon Breazeal <donb@codesourcery.com>
Wed, 30 Sep 2015 17:14:45 +0000 (10:14 -0700)
This fixes a typo that used strncmp instead of strprefix when
checking for an exec event in a stop reply packet.

gdb/ChangeLog:

* remote.c (remote_parse_stop_reply): Call strprefix instead
of strncmp.

gdb/ChangeLog
gdb/remote.c

index 3d883a1327e488fb55a6355f3682fb2705037f48..2c2aa9ee7f23bfd215630399b0aa2d2d8dbb7bed 100644 (file)
@@ -1,3 +1,8 @@
+2015-09-30  Don Breazeal  <donb@codesourcery.com>
+
+       * remote.c (remote_parse_stop_reply): Call strprefix instead
+       of strncmp.
+
 2015-09-30  Simon Marchi  <simon.marchi@ericsson.com>
 
        * gdbarch.sh (struct gdbarch_info): Change tdep_info's type to void *.
index ea6ff6bd744caf6f7b295f6c1cf9c28a2953c248..f40f79160fca6b0a03e3300481dcea10e0d9e584 100644 (file)
@@ -6227,7 +6227,7 @@ Packet: '%s'\n"),
              event->ws.kind = TARGET_WAITKIND_VFORK_DONE;
              p = skip_to_semicolon (p1 + 1);
            }
-         else if (strncmp (p, "exec", p1 - p) == 0)
+         else if (strprefix (p, p1, "exec"))
            {
              ULONGEST ignored;
              char pathname[PATH_MAX];