From c2bcbb1d04bb46a130f2c84de05cbbdccc0645fc Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 15 Apr 2013 08:59:03 -0600 Subject: constify get_bookmark and goto_bookmark This makes arguments to to_get_bookmark and to_goto_bookmark const and fixes the fallout. Tested by rebuilding. The only thing of note is the new split between cmd_record_goto and record_goto -- basically separating the CLI function from a new internal API, to allow const propagation. 2014-06-26 Tom Tromey * record-full.c (record_full_get_bookmark): Make "args" const. (record_full_goto_bookmark): Make "raw_bookmark" const. * record.c (record_goto): New function. (cmd_record_goto): Use it. Now static. * record.h (record_goto): Declare. (cmd_record_goto): Remove declaration. * target-delegates.c: Rebuild. * target.h (struct target_ops) : Make parameter const. --- gdb/target-delegates.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/target-delegates.c') diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 38ca2b4..eac7018 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -742,27 +742,27 @@ delegate_make_corefile_notes (struct target_ops *self, bfd *arg1, int *arg2) } static gdb_byte * -delegate_get_bookmark (struct target_ops *self, char *arg1, int arg2) +delegate_get_bookmark (struct target_ops *self, const char *arg1, int arg2) { self = self->beneath; return self->to_get_bookmark (self, arg1, arg2); } static gdb_byte * -tdefault_get_bookmark (struct target_ops *self, char *arg1, int arg2) +tdefault_get_bookmark (struct target_ops *self, const char *arg1, int arg2) { tcomplain (); } static void -delegate_goto_bookmark (struct target_ops *self, gdb_byte *arg1, int arg2) +delegate_goto_bookmark (struct target_ops *self, const gdb_byte *arg1, int arg2) { self = self->beneath; self->to_goto_bookmark (self, arg1, arg2); } static void -tdefault_goto_bookmark (struct target_ops *self, gdb_byte *arg1, int arg2) +tdefault_goto_bookmark (struct target_ops *self, const gdb_byte *arg1, int arg2) { tcomplain (); } -- cgit v1.1