projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
testsuite: Support detection of Intel compilers via test_compiler_version.
[deliverable/binutils-gdb.git]
/
gdb
/
reverse.c
diff --git
a/gdb/reverse.c
b/gdb/reverse.c
index 07c7de428c08f80c452fdf3368d5071e7b5d652d..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
2
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 "gdb_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,16
+250,17
@@
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. */
{
/* Special case. Give target opportunity to handle. */
- target_goto_bookmark (args, from_tty);
+ target_goto_bookmark (
(gdb_byte *)
args, from_tty);
return;
}
return;
}
@@
-268,12
+269,16
@@
goto_bookmark_command (char *args, int from_tty)
/* Special case -- quoted string. Pass on to target. */
if (args[strlen (args) - 1] != args[0])
error (_("Unbalanced quotes: %s"), args);
/* Special case -- quoted string. Pass on to target. */
if (args[strlen (args) - 1] != args[0])
error (_("Unbalanced quotes: %s"), args);
- target_goto_bookmark (args, from_tty);
+ target_goto_bookmark (
(gdb_byte *)
args, from_tty);
return;
}
/* General case. Bookmark identified by bookmark number. */
num = get_number (&args);
return;
}
/* 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.02654 seconds
and
4
git commands to generate.