• 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: GDB Breakpoints in C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GDB Breakpoints in C++


  • Subject: Re: GDB Breakpoints in C++
  • From: "Rob Napier" <email@hidden>
  • Date: Thu, 10 Jan 2008 07:46:36 -0500

Sorry, yes, it is Objective C++. I should have made this more clear. I
was also seeing this warning:

[Switching to process 1564 thread 0xb503]
[Switching to process 1564 thread 0xb503]
Current language:  auto; currently objective-c++
Warning: the current language does not match this frame.

I'll see if I can isolate it to something smaller.

-Rob

On Jan 9, 2008 8:16 PM, Jason Molenda <email@hidden> wrote:
>
> On Jan 9, 2008, at 5:02 PM, Rob Napier wrote:
>
> > I'm debugging some C++ code in GDB using XCode3. I've set the
> > breakpoint to run the command "p connection->getType()". When the
> > breakpoint fires, I get the error "Couldn't find method getType", but
> > if I then run the command by hand, it works fine.
> >
> > I've dug into this and found that in the breakpoint-command, "ptype
> > connection" returns "struct Connection *", while if I run "ptype
> > connection" by hand I get "class Connection *". I strongly believe
> > this is the culprit.
>
> Is it possible that this is Objective C++ code?  Given a simple C++
> program like
>
> #include <unistd.h>
> class myc {
> public:
>    bool leBool() { return _b; }
>    myc() { _b = true; }
>    bool _b;
> };
> main () {
>     myc *a = new myc;
>     while (1)
>       sleep (1);
>     return a->leBool();
> }
>
> if I put a conditional breakpoint on the sleep() line,
>
> (gdb)  b 11 if a->leBool()
>
> it works.  If you can isolate a reproducible case of this issue,
> please file a bug at http://bugreport.apple.com/ .  I couldn't get it
> to occur but if I were guessing I'd guess that there could be some ObjC
> ++ "which language are we evaluating this expression in" confusion at
> the source.
>
> Thanks
>
> J
>
 _______________________________________________
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

References: 
 >GDB Breakpoints in C++ (From: "Rob Napier" <email@hidden>)
 >Re: GDB Breakpoints in C++ (From: Jason Molenda <email@hidden>)

  • Prev by Date: XCode 3.0 and Interface Builder connection problem
  • Next by Date: Re: Building framework with another framework
  • Previous by thread: Re: GDB Breakpoints in C++
  • Next by thread: IB3.0 bug? IB3 won't let me move any new objects with the mouse
  • Index(es):
    • Date
    • Thread