• 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
Workaround for breaking in C++ constructors and destructors? Grrrrr!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Workaround for breaking in C++ constructors and destructors? Grrrrr!


  • Subject: Workaround for breaking in C++ constructors and destructors? Grrrrr!
  • From: "Sean McBride" <email@hidden>
  • Date: Thu, 2 Mar 2006 11:23:06 -0500
  • Organization: Rogue Research

Hi all,

It seems to be a well known problem that gdb cannot reliably break in
ctors and dtors, and that the bug has been around for years.  I'm sure
it will be with us for years to come. :(

So I'm looking for a workaround... any suggestions?  Is there a way,
with the command line, to make gdb break on all versions of a ctor/dtor?

Right now my workaround is to sprinkle Debugger() calls where I need
them, but that's a huge PITA.  Also Xcode generally crashes stepping out
from __pthread_kill().

Thread 0 Crashed:
0   <<00000000>> 	0xfffeff18 objc_msgSend_rtp + 24
1   com.apple.CoreFoundation       	0x9073f5c0 _CFArrayReplaceValues + 372
2   com.apple.CoreFoundation       	0x9073f438 CFArrayAppendValue + 200
3   ...ple.Xcode.DevToolsInterface 	0x98f87734 -
[PBXDebugDataValueViewModule setContainerDV:] + 292
4   ...ple.Xcode.DevToolsInterface 	0x98f8c808 -
[PBXDebugStackFrameViewModule updateUI] + 568
5   ...ple.Xcode.DevToolsInterface 	0x98f874b8 -
[PBXDebugDataValueViewModule setModel:] + 64
6   ...ple.Xcode.DevToolsInterface 	0x98f8ba74 -
[PBXDebugStackFrameViewModule setModel:] + 116
7   com.apple.Foundation           	0x928ee808 -[NSArray
makeObjectsPerformSelector:withObject:] + 264
8   ...ple.Xcode.DevToolsInterface 	0x98f8d310 -[PBXLSModel dealloc] + 40
9   ...ple.Xcode.DevToolsInterface 	0x98f8ce80 -[PBXLSDataValue dealloc] + 416
10  ....Xcode.GDBMIDebuggingPlugin 	0x014bcef0 dyld_stub_vm_protect + 21522000

So I am absolutely stuck for some way to debug within my dtors!

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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: Workaround for breaking in C++ constructors and destructors? Grrrrr!
      • From: Jim Ingham <email@hidden>
  • Prev by Date: Re: moving project between x86 pcc get screwed up
  • Next by Date: Re: Workaround for breaking in C++ constructors and destructors? Grrrrr!
  • Previous by thread: Re: moving project between x86 pcc get screwed up
  • Next by thread: Re: Workaround for breaking in C++ constructors and destructors? Grrrrr!
  • Index(es):
    • Date
    • Thread