Reputation: 7136
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 !
Upvotes: 3
Views: 2791
Reputation: 360
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>
Upvotes: 4
Reputation: 9645
I am not sure how useful it is for you to debug without the source code, but here is a way to do it.
Assuming you have the executable loaded into an Eclipse project:
EDIT: here is the screen-shot:
Upvotes: 3