• 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: Setting watchpoints in GDB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting watchpoints in GDB


  • Subject: Re: Setting watchpoints in GDB
  • From: Paul Sargent <email@hidden>
  • Date: Sun, 24 Oct 2004 23:59:12 +0100


On 24 Oct 2004, at 20:53, Jonas Maebe wrote:

On 24 okt 2004, at 18:42, Paul Sargent wrote:

So I thought I'd set a watchpoint on the pointer stored in my class. Looking through the whole of the Xcode UI and the Xcode documentation I can see no mention of watchpoints. So, after hitting a breakpoint in my init routine, I set one up using the gdb console command 'watch <expression>', then hit continue. At which point my Cocoa app just freezes, and I'm unable to interrupt execution using the pause button in Xcode. The only thing to do is to kill the process.

The most reliable way to work with watchpoints in gdb (on any platform) is (in my experience):

p &<expression>
watch *(int*)<value printed as result of previous command>

Otherwise you get problems with variables going out of scope etc. Change "(int*)" to whatever the type of the data you are watching.

I really wasn't expecting that to work but it did. Thanks

Thing is..... OMG how slow is it? It says it's adding a hardware watchpoint. If that's hardware.....!!!!! I have a feeling what I was seeing before as a hang was just a very slow running program.

Anyway, it did the job.

Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
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: Setting watchpoints in GDB
      • From: Jonas Maebe <email@hidden>
References: 
 >Setting watchpoints in GDB (From: Paul Sargent <email@hidden>)
 >Re: Setting watchpoints in GDB (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: More about cross compiling
  • Next by Date: Re: Setting watchpoints in GDB
  • Previous by thread: Re: Setting watchpoints in GDB
  • Next by thread: Re: Setting watchpoints in GDB
  • Index(es):
    • Date
    • Thread