This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Single-step runaway


I have a program that gdb doesn't seem to be able to enforce a breakpoint
on. As I single step through my code gdb suddenly takes the bit in its teeth
and slips away to run the program forward as though I had issued continue.
When I reach a particular function call in my code it simply takes off and
runs to completion (it's a batch process) rather than stepping into the call
as it should. If I stepi half a dozen times I can get inside the call and
single-stepping mostly works from there forward -- but not consistently so.
As a debugger it is almost unusable with this flaw. It would be faster to
use printf.

Other gdb users tell me they have encountered erratic behaviour like this
from time to time. Is this a known bug? Why is it happening? What can be
done about it?

FYI, there is nothing exotic about the function call that runs away. It is a
statically linked library C call. That library uses C++ internally, but the
interface is an extern "C" function call that passes a straight C struct.
All the code involved is code I wrote myself and compiled at the same time.
I'm running on RedHat 7.1. Tried compiling gdb 5.3 from source, but no
difference.

Suggestions?

Thanks,

Robin
---------------------------------------------------------------------------
Robin.Rowe@MovieEditor.com   Hollywood, California
www.CinePaint.org   Free motion picture and still image editing software


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]