summaryrefslogtreecommitdiff
path: root/gdb/record-full.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-04-19 15:32:55 +0000
committerPedro Alves <palves@redhat.com>2013-04-19 15:32:55 +0000
commit1016d2d11a157ae44dd2f29620bbfd9d459ab7c8 (patch)
treef86e5b02eeda3e2000328e064dc4eeb86be94063 /gdb/record-full.c
parent3b0b4cc40ad6020112bc02ccd539fb0d9b0c6ede (diff)
downloadgdb-1016d2d11a157ae44dd2f29620bbfd9d459ab7c8.tar.gz
-Wpointer-sign: bookmarks.
Bookmarks are opaque to the core code -- by design, the target is free to use any sort of blob as bookmark identifier. The record target chooses to use strings for bookmarks. This adds casts following that direction, fixing -Wpointer-sign warnings. gdb/ 2013-04-19 Pedro Alves <palves@redhat.com> * record-full.c (record_full_get_bookmark): Change local 'ret' type to char * and add cast to gdb_byte *. (record_full_goto_bookmark): Handle 'bookmark' argument as a string. * reverse.c (goto_bookmark_command): Add casts to gdb_byte *.
Diffstat (limited to 'gdb/record-full.c')
-rw-r--r--gdb/record-full.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/record-full.c b/gdb/record-full.c
index 03d287d0f03..aa3ad8532d4 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -1844,7 +1844,7 @@ record_full_can_execute_reverse (void)
static gdb_byte *
record_full_get_bookmark (char *args, int from_tty)
{
- gdb_byte *ret = NULL;
+ char *ret = NULL;
/* Return stringified form of instruction count. */
if (record_full_list && record_full_list->type == record_full_end)
@@ -1859,14 +1859,16 @@ record_full_get_bookmark (char *args, int from_tty)
fprintf_unfiltered (gdb_stdlog,
"record_full_get_bookmark returns NULL\n");
}
- return ret;
+ return (gdb_byte *) ret;
}
/* "to_goto_bookmark" method for process record and prec over core. */
static void
-record_full_goto_bookmark (gdb_byte *bookmark, int from_tty)
+record_full_goto_bookmark (gdb_byte *raw_bookmark, int from_tty)
{
+ char *bookmark = (char *) raw_bookmark;
+
if (record_debug)
fprintf_unfiltered (gdb_stdlog,
"record_full_goto_bookmark receives %s\n", bookmark);
@@ -1883,7 +1885,7 @@ record_full_goto_bookmark (gdb_byte *bookmark, int from_tty)
/* Pass along to cmd_record_full_goto. */
}
- cmd_record_goto ((char *) bookmark, from_tty);
+ cmd_record_goto (bookmark, from_tty);
return;
}