debugger doesn't stop at a particular breakpoint
debugger doesn't stop at a particular breakpoint
- Subject: debugger doesn't stop at a particular breakpoint
- From: Stuart Smith <email@hidden>
- Date: Mon, 29 Jun 2009 11:51:56 -0700
- Thread-topic: debugger doesn't stop at a particular breakpoint
I¹m using Xcode 3.1.3 on 10.5.7 to debug a Mac program which is written
(mostly) in C++.
I cannot get the debugger to stop anywhere in one particular method, which
is called from a non-main thread. If I set a breakpoint the usual way, by
clicking in the gutter of the source window, the debugger does stop
execution, and the status display in the main debugger window says e.g.
³GDB: Stopped at breakpoint 31 (hit count: 1) - class::method(params) -
Line 367², which looks correct.
In this case, the method signature and line number are correct, but the back
trace and source display shows something different. The debugger has
actually stopped at the beginning of the first statement of the next method
in the file, _following_ the one I¹m trying to set breakpoints in. Typing
bt at the gdb console shows that I¹m actually at line 835 of my source file,
not line 367. Stepping in the source-level debugger backs that assertion up.
This is similar to the situation where a function is not linked into the
final executable at all breakpoints set in the gutter of the source editor
slide¹ down to the first line of code to which they can be attached. But in
this case, I know the function is called (I can print status from it). I
simply can¹t stop and trace execution within it.
If I set the breakpoint by hand at the debugger console using the method
name, the Debugger Console status is ³GDB: Stopped at breakpoint 35 (hit
count : 1) - Line:367², which is correct, aside from the missing
file/method names. The backtrace command shows what looks like a valid
backtrace, but frame #0 has no address. If I then switch to the GUI Debugger
window and click on the top of the backtrace, it shows the header file for
the base class, not the source of my method.
If I set the breakpoint by hand at the debugger console using the filename
and line number, having already set a breakpoint in the GUI at line 367,
this is what happens:
(gdb) br filename:375
Note: breakpoint 31 also set at pc 0xe3f7ce.
Breakpoint 32 at 0xe357ce: file filename, line 833.
The Debugger GUI now shows a breakpoint (in dark blue) at line 833, in
addition to the one I previously set at line 367. But according to gdb, both
breakpoints are the same and apply to line 833.
has anyone else seen this? Does anyone know a workaround? I¹ve tried
rebuilding clean, rebuilding on a different machine, all efforts exhibit the
same problem. Lazy symbol loading is turned off for this project.
Any help much appreciated,
Stuart
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden