Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Method/Function Breakpoints in Eclipse CDT

I am debugging executable (without source code) that was compiled for debugging. GDB has option to set breakpoints at specific function, like break division()

Is there a way to do the same thing in Eclipse CDT ??? Thanks !

like image 460
newprint Avatar asked Feb 22 '26 01:02

newprint


1 Answers

Here are two ways to do it:

(1) In the Breakpoints window (Window | Show View | Breakpoints) pick "Add Function Breakpoint" (it's in the dropdown menu). Enter your function name (and any conditions etc) in the Function Breakpoint dialog box.

(2) Open the gdb console (In Eclipse Juno: Window | View | Console. Then from the little TV picture icon, pick "gdb") You can enter arbitrary gdb commands there:

break unlink
Breakpoint 11 at 0x7ffed58b3320

info breakpoints
Num     Type           Disp Enb Address            What
11      breakpoint     keep y   0x00007ffed58b3320 <unlink>
like image 160
Howard Rubin Avatar answered Feb 23 '26 17:02

Howard Rubin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!