projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Re-factor (i386|amd64)mpx target descriptions.
[deliverable/binutils-gdb.git]
/
gdb
/
reverse.c
diff --git
a/gdb/reverse.c
b/gdb/reverse.c
index ca51d894b72b1a741698b7898faecc9f4e316e33..a1b697f4d21ea9dca68d55d3cb83e1a2e1e25ff2 100644
(file)
--- a/
gdb/reverse.c
+++ b/
gdb/reverse.c
@@
-1,6
+1,6
@@
/* Reverse execution and reverse debugging.
/* Reverse execution and reverse debugging.
- Copyright (C) 2006-201
3
Free Software Foundation, Inc.
+ Copyright (C) 2006-201
6
Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-18,13
+18,13
@@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
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 "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:
#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. */
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 ());
b->number = ++bookmark_count;
init_sal (&b->sal);
b->pc = regcache_read_pc (get_current_regcache ());
@@
-250,13
+250,14
@@
goto_bookmark_command (char *args, int from_tty)
{
struct bookmark *b;
unsigned long num;
{
struct bookmark *b;
unsigned long num;
+ char *p = args;
if (args == NULL || args[0] == '\0')
error (_("Command requires an argument."));
if (args == NULL || args[0] == '\0')
error (_("Command requires an argument."));
- if (st
rncmp (args, "start", strlen ("start")) == 0
- || st
rncmp (args, "begin", strlen ("begin")) == 0
- || st
rncmp (args, "end", strlen ("end")) == 0
)
+ if (st
artswith (args, "start")
+ || st
artswith (args, "begin")
+ || st
artswith (args, "end")
)
{
/* Special case. Give target opportunity to handle. */
target_goto_bookmark ((gdb_byte *) args, from_tty);
{
/* Special case. Give target opportunity to handle. */
target_goto_bookmark ((gdb_byte *) args, from_tty);
@@
-274,6
+275,10
@@
goto_bookmark_command (char *args, int from_tty)
/* General case. Bookmark identified by bookmark number. */
num = get_number (&args);
/* General case. Bookmark identified by bookmark number. */
num = get_number (&args);
+
+ if (num == 0)
+ error (_("goto-bookmark: invalid bookmark number '%s'."), p);
+
ALL_BOOKMARKS (b)
if (b->number == num)
break;
ALL_BOOKMARKS (b)
if (b->number == num)
break;
@@
-285,7
+290,7
@@
goto_bookmark_command (char *args, int from_tty)
return;
}
/* Not found. */
return;
}
/* Not found. */
- error (_("goto-bookmark: no bookmark found for '%s'."),
args
);
+ error (_("goto-bookmark: no bookmark found for '%s'."),
p
);
}
static int
}
static int
This page took
0.039803 seconds
and
4
git commands to generate.