Mail Archives: djgpp/1998/03/03/08:53:25
On 2 Mar 98 Dan was found to have commented thusly:
>
> "the selected breakpoint is invalid, probably this file is not compiled
> with debugging information or for this line is no code generated.
> (breakpoint at line 63 in file blaster.cpp "
>
Don't mess with breakpoint setting. Just start a step (press F7
only) and see if the trace bar that highlights the current line
lights up the line that reads main(). If you don't get an error
message and the bar shows up, it is almost a certainty that you have
successfully compiled with the debug code in there.
Now re-build the whole thing. Don't do any editing at all once you
have re-built. Now set your breakpoint(s). Keep in mind, that not
all lines in your source translate as code where a breakpoint can be
inserted. For example, if you have the expression:
while (1) <-- no breakpoint allowed here
{
your loop
I don't believe you can put a breakpoint at the line indicated.
There are many lines for which this is possible.
You should also probably turn off any optimizations during debugging,
then turn them on when the debugging is done. Make sure that
function inlining is turned off especially. I have never debugged
with these things set, so it is any guess on my part how the debugger
behaves with them set.
> Now, someone told me that i can't set the -s switch together with the -g
> switch, so i'm guessing that maybe this is my problem. but I have no
> idea how to check if i have this switch on, and if it is on, i don't
> know how to turn it off. If anyone could please help me out I would
> really appreciate it.
>
> Daniel
>
This is the -s switch to gcc? You don't need that at all. RHide
deals very well with gcc and gdb and knows what to do in making code
you can work with. You might benefit by (re-)reading sections 5.1
and espeically 5.5 of the RHide documentation, especially since the
author took the time to write it.
Mitch Halloran
Research (Bio)chemist
Duzen Laboratories Group
Ankara TURKEY
mitch AT duzen DOT com DOT tr
other job title: Sequoia's (dob 12-20-95) daddy
- Raw text -