It seems that breakpoints in sharedlibraries cannot be disabled/deleted when they were set before the process is launched. It correctly halts the program, but when they are hit, it looks like it doesnt correctly call into MIEngine.
Program correctly halts on sharedlibrary breakpoint:
-exec info br
<-- C (evaluate-20): {"command":"evaluate","arguments":{"expression":"-exec info br","frameId":1000,"context":"repl"},"type":"request","seq":20}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (14481) <-1046-interpreter-exec console \"info br\"\n"},"seq":570}
1: (14481) <-1046-interpreter-exec console "info br"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (14482) ->~\"Num Type Disp Enb Address What\\n\"\n"},"seq":572}
1: (14482) ->~"Num Type Disp Enb Address What\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (14483) ->~\"2 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7\\n\"\n"},"seq":574}
1: (14483) ->~"2 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (14484) ->~\"\\tbreakpoint already hit 1 time\\n\"\n"},"seq":576}
1: (14484) ->~"\tbreakpoint already hit 1 time\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (14502) ->1046^done\n"},"seq":578}
1: (14502) ->1046^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (14503) ->(gdb)\n"},"seq":580}
1: (14503) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (14503) 1046: elapsed time 22\n"},"seq":582}
1: (14503) 1046: elapsed time 22
--> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"Num Type Disp Enb Address What\n2 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7\n\tbreakpoint already hit 1 time\n\n"},"seq":584}
Num Type Disp Enb Address What
2 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7
breakpoint already hit 1 time
But when I click the same breakpoint to delete it, nothing happens:
<-- C (setBreakpoints-29): {"command":"setBreakpoints","arguments":{"source":{"name":"lib.cpp","path":"/home/pro/temp/lib.cpp","sources":[],"checksums":[]},"lines":[],"breakpoints":[],"sourceModified":false},"type":"request","seq":29}
--> R (setBreakpoints-29): {"type":"response","request_seq":29,"success":true,"command":"setBreakpoints","body":{"breakpoints":[]},"seq":651}
Clicking the same sourcelocation again, recreates it:
<-- C (setBreakpoints-30): {"command":"setBreakpoints","arguments":{"source":{"name":"lib.cpp","path":"/home/pro/temp/lib.cpp","sources":[],"checksums":[]},"lines":[7],"breakpoints":[{"line":7}],"sourceModified":false},"type":"request","seq":30}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (248841) <-1049-break-insert -f lib.cpp:7\n"},"seq":654}
1: (248841) <-1049-break-insert -f lib.cpp:7
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (248845) ->1049^done,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00007ffff7fc4192\",func=\"Ctor::Ctor()\",file=\"/home/pro/temp/lib.cpp\",fullname=\"/home/pro/temp/lib.cpp\",line=\"7\",thread-groups=[\"i1\"],times=\"0\",original-location=\"lib.cpp:7\"}\n"},"seq":656}
1: (248845) ->1049^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x00007ffff7fc4192",func="Ctor::Ctor()",file="/home/pro/temp/lib.cpp",fullname="/home/pro/temp/lib.cpp",line="7",thread-groups=["i1"],times="0",original-location="lib.cpp:7"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (248846) ->(gdb)\n"},"seq":658}
1: (248846) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (248846) 1049: elapsed time 4\n"},"seq":660}
1: (248846) 1049: elapsed time 4
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (248851) Send Event AD7BreakpointBoundEvent\n"},"seq":662}
1: (248851) Send Event AD7BreakpointBoundEvent
--> R (setBreakpoints-30): {"type":"response","request_seq":30,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":2,"verified":true,"line":7,"BoundBreakpoints":[]}]},"seq":664}
--> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":2,"verified":true,"line":7,"BoundBreakpoints":[]}},"seq":666}
But it now exists 2 times:
-exec info br
<-- C (evaluate-31): {"command":"evaluate","arguments":{"expression":"-exec info br","frameId":1000,"context":"repl"},"type":"request","seq":31}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (292385) <-1050-interpreter-exec console \"info br\"\n"},"seq":669}
1: (292385) <-1050-interpreter-exec console "info br"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (292386) ->[~\]()"Num Type Disp Enb Address What\\n\"\n"},"seq":671}
1: (292386) ->~"Num Type Disp Enb Address What\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (292387) ->[~\]()"2 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7\\n\"\n"},"seq":673}
1: (292387) ->~"2 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (292388) ->[~\]()"\\tbreakpoint already hit 1 time\\n\"\n"},"seq":675}
1: (292388) ->~"\tbreakpoint already hit 1 time\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (292388) ->[~\]()"3 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7\\n\"\n"},"seq":677}
1: (292388) ->~"3 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (292388) ->1050^done\n"},"seq":679}
1: (292388) ->1050^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (292389) ->(gdb)\n"},"seq":681}
1: (292389) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (292389) 1050: elapsed time 4\n"},"seq":683}
1: (292389) 1050: elapsed time 4
--> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"Num Type Disp Enb Address What\n2 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7\n\tbreakpoint already hit 1 time\n3 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7\n\n"},"seq":685}
Num Type Disp Enb Address What
2 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7
breakpoint already hit 1 time
3 breakpoint keep y 0x00007ffff7fc4192 in Ctor::Ctor() at /home/pro/temp/lib.cpp:7
It seems that breakpoints in sharedlibraries cannot be disabled/deleted when they were set before the process is launched. It correctly halts the program, but when they are hit, it looks like it doesnt correctly call into MIEngine.
Program correctly halts on sharedlibrary breakpoint:
But when I click the same breakpoint to delete it, nothing happens:
Clicking the same sourcelocation again, recreates it:
But it now exists 2 times: