Re: Buggy debugger?
Re: Buggy debugger?
- Subject: Re: Buggy debugger?
- From: Jim Ingham <email@hidden>
- Date: Tue, 11 Nov 2003 14:15:52 -0800
Why do you think the code being executed is three lines below the line
number you get from Xcode or from gdb's where?
BTW - one obvious thing to watch out for is that you haven't
accidentally turned optimization on for this file. The most certain
way to tell this is to rebuild the file and watch the cc command line
for this file in the detailed build log. It should either have -O0
explicitly in it, or no -O? at all. If it has -O3 or -Os, then you are
going to be debugging optimized code, and one of the things the
optimizer does is make the mapping between source lines and assembly
code get complicated - the execution of source lines gets scrambled out
of order, broken into separate pieces, and intermingled with the
execution of other source lines. If you don't know this is what is
going on, you will think the debugger is confused about the source to
code mapping, but it is telling you the truth, it is just that the
mapping is confusing...
Jim
On Nov 11, 2003, at 1:06 PM, Jim Rankin wrote:
Maybe I'm just doing something silly, but I'm running the debugger on
a project of mine that I had no problem debugging in PB/Jaguar, but
now the debugger breakpoints seem to always be off by about 3 lines in
one particular implementation file. It looks like the line selected
is always three lines above the actual code that's being executed.
For what it's worth, typing "where" in the GDB drawer gives the same
(incorrect) line number as selected in the graphical debugger.
I did a clean and rebuild, but the problem persists. What might cause
this behavior? Am I just doing something silly? Is there an easy way
to fix it?
Thanks,
-jimbo
Excelsior! XML Marshaller for Cocoa
http://www.homepage.mac.com/jimbokun/Excelsior.html
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
--
Jim Ingham email@hidden
Developer Tools
Apple Computer
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.