0
votes

I'm trying to debug a C++ project by setting a couple breakpoints. The build completes successfully, the run is going as expected, but the debugger seems to be just ignoring the breakpoints (I am using the Debug button, not Run). The source code, the compiler and the debugger are located on a remote host.

Could anyone give me a hint on how I can solve it please?

Netbeans version: 8.0.2, Remote host OS: Centos 6.7, Remote debugger: GDB 7.2-83.el6

I'm also getting the following warning at start of debugging (not sure if it's relevant though):

&"warning: GDB: Failed to set controlling terminal: Operation not permitted\n"

Thanks in advance.

1
1) Verify that there is code for the statement. Compilers may optimize statements out (away) or combine source code statement lines. 2) Looking at the assembly language verify that the code is not elsewhere. Example: in a function with multiple returns, the compiler may only use one of them and the debugger won't stop at the others. - Thomas Matthews
Check if you can execute the same commands shown in Window -> Debugging -> Debugger Console ? - WillShackleford
Hi @Thomas, thanks for the answer. How do I verify it though? And I didn't quite understand what you meant by "looking at the assembly language", could you explain it in a bit more detail? The function is a void one, so it only modifies an object without returnig anything. I actually also created a breakpoint of type function (which should stop the debugging process once the function is entered as far as I understand), but it didn't help. - wicccked
Hi @WillShackleford, what commands are you talking about? - wicccked
Sorry I had incorrectly thought it would print the commands as it executed them, but apparently only prints the output. You can try step,cont,next, to see if they work better than the netbeans buttons. info breakpoints should show you the line and address of the breakpoints. dissassmble <address> shows disassemble arround an address. - WillShackleford

1 Answers

0
votes

I had the same problem. It seems the debugger goes crasy with overloaded functions, e.g. void print(int a), void print(double a). I simply changed the name of the functions and it worked smoothly.