dwarf2read.c: Add cast
[deliverable/binutils-gdb.git] / gdb / reverse.c
index 30a0328246032b9190c16c33d6f79e44a3b0f011..ec8e4fc4591c41bfb7d7247feb71dd1e22b8cf1d 100644 (file)
@@ -1,6 +1,6 @@
 /* Reverse execution and reverse debugging.
 
-   Copyright (C) 2006-2014 Free Software Foundation, Inc.
+   Copyright (C) 2006-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include <string.h>
 #include "target.h"
 #include "top.h"
 #include "cli/cli-cmds.h"
 #include "cli/cli-decode.h"
 #include "cli/cli-utils.h"
 #include "inferior.h"
+#include "infrun.h"
 #include "regcache.h"
 
 /* User interface:
@@ -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);
This page took 0.025361 seconds and 4 git commands to generate.