X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Freverse.c;h=a1b697f4d21ea9dca68d55d3cb83e1a2e1e25ff2;hb=a14d1f4dfc08edc8fe92b17b36a55d89203fb89f;hp=541355f976ed86dce68dc8c9e7598e2f18d94832;hpb=6d3d12ebef6fa7dd6bc8c34fbc5e440ac8d0a8c6;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/reverse.c b/gdb/reverse.c index 541355f976..a1b697f4d2 100644 --- a/gdb/reverse.c +++ b/gdb/reverse.c @@ -1,6 +1,6 @@ /* Reverse execution and reverse debugging. - Copyright (C) 2006-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This file is part of GDB. @@ -142,7 +142,7 @@ save_bookmark_command (char *args, int from_tty) error (_("target_get_bookmark failed.")); /* Set up a bookmark struct. */ - b = xcalloc (1, sizeof (struct bookmark)); + b = XCNEW (struct bookmark); b->number = ++bookmark_count; init_sal (&b->sal); b->pc = regcache_read_pc (get_current_regcache ()); @@ -255,9 +255,9 @@ goto_bookmark_command (char *args, int from_tty) if (args == NULL || args[0] == '\0') error (_("Command requires an argument.")); - if (strncmp (args, "start", strlen ("start")) == 0 - || strncmp (args, "begin", strlen ("begin")) == 0 - || strncmp (args, "end", strlen ("end")) == 0) + if (startswith (args, "start") + || startswith (args, "begin") + || startswith (args, "end")) { /* Special case. Give target opportunity to handle. */ target_goto_bookmark ((gdb_byte *) args, from_tty);