• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Debugger doesn't like Objective-C++ any more?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugger doesn't like Objective-C++ any more?


  • Subject: Re: Debugger doesn't like Objective-C++ any more?
  • From: Simon Wilson <email@hidden>
  • Date: Sun, 3 Feb 2008 13:24:38 +0100

Hi David

I have had the same issue repeatedly. My projects are also 2.4 format running under 3.0.

I was recommended to switch from stabs to DWARF and that solved the issue for the most part for me.

I still occasionally run into the same issue: Xcode suddenly refuses to step into or over ObjC method calls, instead dropping me into assembly for the runtime's ObjC dispatch code. I can always solve the issue by doing a clean and re-build of the project and its frameworks. It's a PITA but doesn't occur very often (every couple of weeks) and is therefore workable.

I have also disabled in-editor debugging as it seems to occur less frequently in the 2.x-style debugger view. Xcode project version doesn't seem to affect debugger reliability.

I have no idea was causes Xcode/gdb to suddenly 'go off' ObjC debugging, but it would appear that the debugging info somehow gets out of sync with the compiled code. Nothing other than a re-build seems to fix the issue.

It would be great if Apple could provide a fix to make debugging more reliable.

Hope this helps...
Simon Wilson

On Jan 30, 2008, at 19:35, David Dunham wrote:

I've got an application that's primarily in C++, but uses Cocoa, so I've set it up as a Cocoa app. For some reason, the debugger is no longer very happy with it. I can still set breakpoints, but stepping doesn't work at all (or else gets into assembly).

I was going to try clearing caches or something, but it seems my coworker is running into exactly the same issue. Here's what it looks like when I set a breakpoint early in my C++ code:

Loading program into debugger…
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".tty /dev/ttys002
Program loaded.
sharedlibrary apply-load-rules all
run
[Switching to process 10036 local thread 0x2f1f]
Running…
mi_cmd_stack_list_frames: Not enough frames in stack.
mi_cmd_stack_list_frames: Not enough frames in stack.
(gdb)


If I set a breakpoint in applicationDidFinishLaunching: then I don't get that error, but I still have problems stepping through code.

My app still works, it's just debugging that seems broken.

Running with Xcode 3.0, project set to 2.4 format, on 10.5.1 Intel (both machines).

We've been making changes to the app of course, so it's hard to know what if anything we did might have caused this. Most relevant think I can think of is changing to 2.4 format (so we can compile on a Tiger machine).

Anyone have any clue? I didn't find much via Google...


David Dunham Macintosh Game Developer GameHouse Studios +1 206 926 5722 www.gamehouse.com "They said it couldn't be done but sometimes it doesn't work out that way." -- Casey Stengel

_______________________________________________
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

_______________________________________________ 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
  • Prev by Date: NSMutableArray access from other class
  • Next by Date: Sparkle frameworks error linking on Release
  • Previous by thread: NSMutableArray access from other class
  • Next by thread: Sparkle frameworks error linking on Release
  • Index(es):
    • Date
    • Thread