h*****g 发帖数: 9 | 1 When I used gdb debug C++ program, I encountered the follow problem.
Source code: myprogram.cc
executable code: myprogram
I used CC compiler to compile.
****************************
> gdb myprogram
> break myprogram.cc:myfunction
(Here, myfunction is a function in myprogram.cc)
Function "myfunction" not defined.
****************************
So the problem is that gdb always gives me "Function "myfunction" not defined"
message when I try to set a breakpoint at that function.
Is there anyone can | f********h 发帖数: 149 | 2 did you turn on debug by -g in compliation?
【在 h*****g 的大作中提到】 : When I used gdb debug C++ program, I encountered the follow problem. : Source code: myprogram.cc : executable code: myprogram : I used CC compiler to compile. : **************************** : > gdb myprogram : > break myprogram.cc:myfunction : (Here, myfunction is a function in myprogram.cc) : Function "myfunction" not defined. : ****************************
|
|