[PATCH] gdb/breakpoint: make a copy of the "commands" command's argument
Tom Tromey
tom@tromey.com
Wed Sep 16 13:42:17 GMT 2020
>>>>> "Tankut" == Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org> writes:
Tankut> When GDB reads commands from the input, its internal buffer is re-used
Tankut> for each line.
I wonder if this could be changed instead.
At least when reading from the user, a copy is already made. For
instance, readline returns an allocated string.
I recall thinking that this was hard for some reason, but I don't
remember why any more :(
Tankut> gdb/ChangeLog:
Tankut> 2020-09-11 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Tankut> * breakpoint.c (commands_command_1): Make a copy of the 'arg'
Tankut> argument.
This is ok. Thank you.
Tom
More information about the Gdb-patches
mailing list