This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: / (slash) command : fast way to temporarily change setting(s) to run a command
On Tue, 2019-04-16 at 08:20 -0400, Simon Marchi wrote:
>
> Ah yeah, that sounds good too, I would be consistent with the fact that
> just like you can do:
>
> (gdb) p 10
> $4 = 10
> (gdb) p/x
> $5 = 0xa
>
> Does it mean that as a side-effect, "/" alone would repeat the previos
> command unaltered?
The previous command can be run by just typing Return,
so I think we can keep slash command checking that at least one
setting was given.
I thought that implementing a command that would re-run the
previous saved_command_line would mean to just look/use
saved_command_line.
But when a command runs, saved_command_line already contains
the line of the currently running command.
Slightly unexpected but not a big deal:
it is very easy to add previous_saved_command_line.
Philippe