• 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: .mm file inherits from .cpp file -- debugger hosed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .mm file inherits from .cpp file -- debugger hosed


  • Subject: Re: .mm file inherits from .cpp file -- debugger hosed
  • From: Jim Ingham <email@hidden>
  • Date: Wed, 28 Jul 2004 12:45:42 -0700

Please file a bug.

Jim

On Jul 28, 2004, at 12:04 PM, Andrew Duncan wrote:

THE SETUP: BaseClass.h declares C++ class; BaseClass.cpp defines. DerivedClass.h declares a C++ subclass, DerivedClass.mm defines. Why .mm? Because DerivedClass methods make Cocoa calls.

THE SYMPTOM: Debugging a DerivedClass method, clicking the disclosure triangle for "this" shows nothing. This is the real problem. Related side-effects include this error message to the system console:

Xcode[2892] [PBXGDB_Adaptor(0xb4ddac0) errorForMICommand:errorMessage:]:
error in executing MI command: PBXGDB_MIGetChildrenVarObjCommand;
'-var-list-children "var2" 2'; error msg:
Type BaseClass has no component named BaseClass.


and the same error to the debugger console. Some time after this, the debugger console says

  Current language:  auto; currently objective-c++
  Warning: the current language does not match this frame.

I can reproduce this in a test project with just these two classes.

MORE INFO: What's this about BaseClass having component BaseClass? A hint comes from debugging a BaseClass method called on a DerivedClass instance. Clicking the disclosure triangle shows a member called "BaseClass", whose own triangle discloses the BaseClass fields. And below that, the DerivedClass fields are shown.

TRIED WORKAROUNDS: Unfortunately, changing BaseClass.cpp to BaseClass.mm and/or changing its file type to "sourcecode.cpp.objcpp" has no effect on this problem.

Not being able to examine the fields of "this" (or any other objects with this inheritance style) is crippling my development. I may have to move to CodeWarrior unless I find a workaround. Suggestions?

Andrew
email@hidden
http://www.andrewduncan.ws
_______________________________________________
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 - gdb
_______________________________________________
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.



References: 
 >.mm file inherits from .cpp file -- debugger hosed (From: Andrew Duncan <email@hidden>)

  • Prev by Date: .mm file inherits from .cpp file -- debugger hosed
  • Next by Date: Re: a couple of questions
  • Previous by thread: .mm file inherits from .cpp file -- debugger hosed
  • Next by thread: searching in headers
  • Index(es):
    • Date
    • Thread