Page 1 of 1

Hardware Breakpoints

Posted: Tue Jun 17, 2014 2:47 am
by caibbor
I haven't found a way to add a hardware breakpoint (ie, the program will break whenever a particular variable is changed, etc). It's a GDB feature and I used it quite a bit in CodeBlocks.

If CodeLite has this functinoality, where is it?

P.S., Sorry for all the comparisons to CodeBlocks ;)



Edit: In this screenshot, I'm not sure if there's supposed to be something in this menu, but there never seems to be...

Re: Hardware Breakpoints

Posted: Tue Jun 17, 2014 11:17 am
by Jarod42
In the Debug Pane, you may add breakpoint with the 'Add' Button.
And there, you may choose between breakpoint and watchpoint.
you are looking for watchpoint.

Re: Hardware Breakpoints

Posted: Tue Jun 17, 2014 11:33 am
by eranif
caibbor wrote:If CodeLite has this functinoality, where is it?
Debugger pane -> Breakpoints tab
caibbor wrote:Edit: In this screenshot, I'm not sure if there's supposed to be something in this menu, but there never seems to be...
By default this list is empty.
You add items to it by defining some kind of "complex" expressions to watch, for example, you can choose to display a vector like this:

Code: Select all

$(variable).size()
Or, instead of std::string, you can choose to display it like this:

Code: Select all

$(variable).c_str()
These are called 'Pre Defined Types' in codelite, you can read more about this here:
http://codelite.org/LiteEditor/DebuggerSettings

Eran

Re: Hardware Breakpoints

Posted: Tue Jun 17, 2014 4:47 pm
by caibbor
Thank you both.

I expected to find this in the Watches window, turns out it's a feature of the Breakpoints window. Makes sense! (:

I expected that I should be able to click on an expression in the editor and have "Add Watchpoint" be in the context menu somewhere.