Link to home
Start Free TrialLog in
Avatar of gsdctech
gsdctech

asked on

Breakpoint not working properly in DDD

Hello,

When i set the breakpoints, the execution stops exactly at the breakspoint where it is set, but there is no green arrow in that position, beacause of which, i am unable to print the value of the variable at those positions.


test.jpg
Avatar of F. Dominicus
F. Dominicus
Flag of Germany image

I'm sorry  but that  does not make sense. you are at the breakpoint then you can go  on the  variable and right-click then you can choose e.g display *var_name and the variable will be displayed, or you can use the gdb command line and type in what you like to inspect there. Unfortunatly gdb can not show variables which are held in registers. That makes debugging sort of pain sometimes....

Regards
Friedrich
Avatar of gsdctech
gsdctech

ASKER

But in the snapshot which i have shown, the program has halted at the breakpoint and am trying to print the variable modulated signal, but i get the error "No symbol in current context", as if it is not at the breakpoint location.

ASKER CERTIFIED SOLUTION
Avatar of F. Dominicus
F. Dominicus
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, rebuild without any optimisation if possible
Duncan... what do you mean by "without any optimisation"
Make sure there is no -O option given to gcc
Or the Sun compiler, if you're using that
ahh ok... it was run in debug mode, not optimal mode.