Re: objc_exception_throw (solved) (update)
Re: objc_exception_throw (solved) (update)
- Subject: Re: objc_exception_throw (solved) (update)
- From: "Joan Lluch (casa)" <email@hidden>
- Date: Tue, 1 Jul 2008 11:01:07 +0200
El 30/06/2008, a las 23:11, Christopher Friesen escribió:
On Jun 30, 2008, at 1:06 PM, Joan Lluch (casa) wrote:
So well, the problem was that some time ago I had set several of my
source files to "Objective C++" (by changing their extension
to .mm) in order to use the new/delete operators. By renaming back
the files to .m and using malloc/sizeof/free instead all the
problems went away. In fact, the calls the debugger refused to
trace, were precisely the ones where a language change occurred.
This included calls from my code to the frameworks, and I suppose
that "step over" was also failing because of this.
It sounds like the debugger isn't detecting that you are in an ObjC+
+ file, but it could be something else too. Enable the GDB log in
Xcode->Preferences 'Debugging' with a path of '/tmp/XCGDLog'.
Reproduce the problem and attach the log to your bug report.
The developer-tools documentation carelessly states that you can
use Objective-C and Objective-C++ as you want with no restrictions
It is expected to work and the documentation is telling you this. My
Objective-C++ code steps fine so it's not like it is completely
busted, but my code it's not representative of all possible code
that could be written. Please file a bug report with clear steps to
reproduce the problem. If you attach a sample project that shows the
issue it can be much easier to track down the issue if you happen to
be experiencing an edge case instead of an easily reproducible bug
Cheers,
Christopher Friesen
Apple
I am having a hard time trying to reproduce the problem in a
consistent way (or alt all) in a small project. Definitely I did not
succeed at making the problem appear in any of the Xcode example
projects that I tested, so it must be related to my project or my
project settings. With the purpose to extend the general knowledge
base I post what I have found so far, in case someone can give me a
clue to what to look at next.
1- I found that by changing again all my files to .mm but leaving the
main.m file as is (I mean leaving it with the .m extension) the
problem disappears. So now I recreate or eliminate the problem by
simply adding .mm or .m to the "main" file. (With .mm the debugger
fails to trace the call stack properly. With .m the debugger goes
normal)
2- With the .mm extension in the "main" file (which would produce the
debugger to fail), I am able to fix the problem by simply adding a
breakpoint somewhere before my code is first called, for example at
[NSApplication run] . Even if I set such breakpoint to continue
automatically, the problem remains fixed.
3- So far, having or not the problem does not have anything to do with
what exceptions I intentionally provoke in my code. So far, the
debugger only misbehaves when the "main" file has an .mm extension,
and goes well when the extension is .m or I set a breakpoint somewhere
before my code is executed.
Any thoughts of what I can look at so that I can post a proper
(simpler case) bug report to Apple ? _______________________________________________
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