mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 01:45:52 +08:00
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 <tromey@redhat.com> * 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) <to_get_bookmark, to_goto_bookmark>: Make parameter const.
This commit is contained in:
18
gdb/record.c
18
gdb/record.c
@ -311,13 +311,10 @@ cmd_record_save (char *args, int from_tty)
|
||||
target_save_record (recfilename);
|
||||
}
|
||||
|
||||
/* "record goto" command. Argument is an instruction number,
|
||||
as given by "info record".
|
||||
|
||||
Rewinds the recording (forward or backward) to the given instruction. */
|
||||
/* See record.h. */
|
||||
|
||||
void
|
||||
cmd_record_goto (char *arg, int from_tty)
|
||||
record_goto (const char *arg)
|
||||
{
|
||||
ULONGEST insn;
|
||||
|
||||
@ -330,6 +327,17 @@ cmd_record_goto (char *arg, int from_tty)
|
||||
target_goto_record (insn);
|
||||
}
|
||||
|
||||
/* "record goto" command. Argument is an instruction number,
|
||||
as given by "info record".
|
||||
|
||||
Rewinds the recording (forward or backward) to the given instruction. */
|
||||
|
||||
static void
|
||||
cmd_record_goto (char *arg, int from_tty)
|
||||
{
|
||||
record_goto (arg);
|
||||
}
|
||||
|
||||
/* The "record goto begin" command. */
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user