[PATCH] Improve clear command's documentation

Pedro Alves pedro@palves.net
Tue May 31 14:47:20 GMT 2022


On 2022-05-31 14:42, Eli Zaretskii wrote:
>> Date: Tue, 31 May 2022 14:04:00 +0100
>> Cc: gdb-patches@sourceware.org
>> From: Pedro Alves <pedro@palves.net>
>>
>>> WDYT?
>>>
>>
>> I like this a lot.  Will you merge it, or shall I?
> 
> I'd prefer that you did, if you don't mind, so that all the changes
> would be together, or close.

Done.  Just with one small tweak -- your text used wording that assumes a breakpoint
only has one location, "deletes any breakpoint whose code location is at", etc.
I tweaked it to say "any breakpoint with a code location that is at", etc.  

If you have a multi location breakpoint, and you specify one of the locations,
gdb really deletes the whole breakpoint:

(top-gdb) info breakpoints 3
Num     Type           Disp Enb Address            What
3       breakpoint     keep y   <MULTIPLE>         
3.1                         y   0x00000000000ed06c in main(int, char**) at /home/pedro/gdb/binutils-gdb/src/gdb/gdb.c:25
3.2                         y   0x000000000086aa66 in selftests::string_view::capacity_1::main() at /home/pedro/gdb/binutils-gdb/src/gdb/unittests/basic_string_view/capacity/1.cc:167
3.3                         y   0x000000000086ae85 in selftests::string_view::cons_1::main() at /home/pedro/gdb/binutils-gdb/src/gdb/unittests/basic_string_view/cons/char/1.cc:62
...
(top-gdb) clear *0x00000000000ed06c
Deleted breakpoint 3 
(top-gdb)


More information about the Gdb-patches mailing list