Bug 433548 - [breakpoints] Thread-specific bp created from gdb console gets deleted and re-created
Summary: [breakpoints] Thread-specific bp created from gdb console gets deleted and re...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.4.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-25 15:59 EDT by Marc Khouzam CLA
Modified: 2020-09-04 15:18 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2014-04-25 15:59:34 EDT
1- start any program
2- create a thread-specific bp in the gdb console (e.g., break 5 thread 1)
=> the breakpoint gets created a second time and the original one is deleted.

The issue has been there for a while now it seems.

The problem seems to be that MIBreakpointsManager has an internal mapping (fBreakpointThreads) that tracks what platform bp apply to what threads.  That mapping is not updated by MIBreakpointsSynchronizer, so when MIBreakpointsManager looks a the bp created from the gdb console, it does not match its internal map and gets re-installed.

Not a big problem as the result is still correct. 


03,473 [MI]  34-interpreter-exec console "break 200 thread 1"
703,476 [MI]  ~"Breakpoint 2 at 0x400ef0: file ../src/DSFTestApp.cpp, line 200.\n"
703,480 [MI]  =breakpoint-created,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0\
x0000000000400ef0",func="main(int, char**)",file="../src/DSFTestApp.cpp",fullname="/home/lmckhou/run\
time-TestDSF/DSFTestApp/src/DSFTestApp.cpp",line="200",thread-groups=["i1"],thread="1",thread="1",ti\
mes="0",original-location="/home/lmckhou/runtime-TestDSF/DSFTestApp/src/DSFTestApp.cpp:200"}
703,482 [MI]  34^done
703,484 [MI]  (gdb) 
703,639 [MI]  35-break-insert -p 1 -f /home/lmckhou/runtime-TestDSF/DSFTestApp/src/DSFTestApp.cpp:20\
0
703,640 [MI]  35^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x00000000004\
00ef0",func="main(int, char**)",file="../src/DSFTestApp.cpp",fullname="/home/lmckhou/runtime-TestDSF\
/DSFTestApp/src/DSFTestApp.cpp",line="200",thread-groups=["i1"],thread="1",thread="1",times="0",orig\
inal-location="/home/lmckhou/runtime-TestDSF/DSFTestApp/src/DSFTestApp.cpp:200"}
703,641 [MI]  (gdb) 
703,649 [MI]  36-break-delete 2
703,649 [MI]  36^done