• 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: Debugging Objective-C++ - how to?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging Objective-C++ - how to?


  • Subject: Re: Debugging Objective-C++ - how to?
  • From: Andreas Grosam <email@hidden>
  • Date: Mon, 17 Oct 2005 11:19:03 +0200


On 16.10.2005, at 18:31, Tommy Nordgren wrote:

You must at least define the C++ constructors in a separate implementation file, in order to step into constructors.
If you define the constructors in the class body, they will be inlined, and it's oviously not possible to step into
inlinedf methods.
I can't say much about Obj-C++, but when optimization is turned off, member functions defined inline should actually not be inlined by the compiler. So, when also debugging informations are available, this should work.

Beside this, whether or not a compiler/deugger manages to step through inlined functions and optimized code depends on its capabilities to create more sophisticated debugging information. With the current debug format used by Apple gcc (STABS), this seems not to be possible. The DWARF debug format seems to be superior, but it isn't implemented in Apple's gcc (it is, but it does not work with Xcode-gdb).

Another problem are breakpoints in c-tor and d-tors which is caused by gdb. I explained this in more detail in another thread already. This issue shouldn't affect stepping, though.

Maybe, there is a problem specifically to Obj-C++.

Andreas


Oct 16, 2005 kl. 6:03 PM skrev P Teeson:

Using Tiger 4.2 Xcode 2.2 Beginning developing Obj-C++ project

I am working on an Obj-C++ project but don't know how to step into the C++ methods in the debugger.
(Specifically the ctor/dtor)
The project started as a Cocoa Document project. The Cocoa file is renamed with the .mm extension.
I have a separate C++ file for the things needed there. It has an extension of .cpp.
Everything runs fine but I want to be able to step through both Obj-C and C++ code.
When debugging I can step through the Cocoa methods but cannot step into the C++ ones.


Why not? Is it because I am using the .cpp extension?
I had hoped to keep that since the reason for the C++ is portability of what will become a dll.


Yes I searched the mail archive and also CocoBuilder using "debugging Objective-C++".
I found the Clark Cox item and the Apple docn about debugging C++ from 2001 (Project Builder days).


Is there a way to debug both C++ and Obj-C in an Obj-C++ project?
If so how do I do it?

TIA and


respect....

Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


------------------------------------- This sig is dedicated to the advancement of Nuclear Power Tommy Nordgren 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:
email@hidden


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
  • Follow-Ups:
    • Re: Debugging Objective-C++ - how to? SOLVED
      • From: P Teeson <email@hidden>
References: 
 >Debugging Objective-C++ - how to? (From: P Teeson <email@hidden>)
 >Re: Debugging Objective-C++ - how to? (From: Tommy Nordgren <email@hidden>)

  • Prev by Date: Re: Speeding up XCode?
  • Next by Date: Re: Speeding up XCode?
  • Previous by thread: Re: Debugging Objective-C++ - how to?
  • Next by thread: Re: Debugging Objective-C++ - how to? SOLVED
  • Index(es):
    • Date
    • Thread