Author Topic: Can you remove an existing data break point in the GDB debugger plugin?  (Read 3629 times)

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
I cannot find via the C::B gui or via the existing GDB plugin how to remove/delete a data break point you have created. If someone can delete a data breakpoint, can you please point me at the GUI to do the delete or point me at the relevant file and function.
I found this after wiring up data breakpoints for the GDB/MI debugger, but could not see anywhere how to delete them once created. I have added this to the list of things to add in to the GDB/MI debugger.

Offline jordi

  • Multiple posting newcomer
  • *
  • Posts: 22
I don't sure whether I understand you question

Right click on breakpoint in the editor or in breakpoints dialog (Debug-Debugging windows-Breakpoints)

void BreakpointsDlg::OnRightClick(cb_unused wxListEvent& event)
void BreakpointsDlg::OnUpdateUI(wxUpdateUIEvent &event)

When remove is selected
void BreakpointsDlg::OnRemove(cb_unused wxCommandEvent& event)
void DebuggerGDB::DeleteBreakpoint(cb::shared_ptr<cbBreakpoint> breakpoint)

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Jordi. Sorry, but you did not understand the question and you looked up break points, not data break points. The data is the BIG one.. If you lookup the GDB manual you will get a better understanding of the low level differences, which is major and there are some gotchas for the data breakpoint that I need to get a handle on today.

I am not a GDB guru, so this may not be 100% right, but:1) data breakpoints are for reading and/or writing to a variable/memory address. This uses the data breakpoing dialog (see databreakpointdlg.cpp)
2) breakpoints are for a particular line in the code and can be unconditional or conditional as per the breakpoints dialog (see editbreakpointdlg.cpp)



Offline jordi

  • Multiple posting newcomer
  • *
  • Posts: 22
Sorry by the misunderstanding.
You are right. When you remove a data break point that has been set previously, the data break point is not in the codeblocks gui but it is enabled for that debug session.
Something to review

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
I spotted the issue of removing a data break point a week or two ago when I was trying to remove the data break point after I added support adding a data break point in the GDB/MI debugger I am working on, but I do not have it working 100%.

If you want it fixed in the existing GDB annotations plugin then please raise a ticket for it on sourceforge. (In the info please indicate that in GDB it's a watchpoint).