• 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: Getting information about a window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GDB: Getting information about a window


  • Subject: Re: GDB: Getting information about a window
  • From: Eric Gorr <email@hidden>
  • Date: Tue, 25 Aug 2009 15:00:08 -0400


On Aug 25, 2009, at 2:54 PM, Eric Gorr wrote:

I need to figure out which window the function GetUserFocusWindow has returned from within GDB

(gdb) call (WindowRef)GetUserFocusWindow()
$1 = (WindowRef) 0x1f7dc6e0


I figured that the easiest way would be to get the title of the window using something like CopyWindowTitleAsCFString, but I am uncertain how to make this kind of call from within GDB. My various attempts so far simply result in an error message mentioning KERN_PROTECTION_FAILURE, etc.


(CopyWindowTitleAsCFString takes two parameters....the first is a WindowRef and the second is a pointer to a CFStringRef. It returns an OSStatus error code.)

I'm not that adept as using GDB from the command line and was hoping that someone might have a suggestion.

Found the answer to my own question. There is a handy function called DebugPrintWindow which one can call from GDB and pass in the WindowRef and get all of the information about the window.


I would still be interested to learn if it was possible to make a call to something like CopyWindowTitleAsCFString from the GDB command line.

_______________________________________________
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: GDB: Getting information about a window
      • From: Jason Molenda <email@hidden>
References: 
 >GDB: Getting information about a window (From: Eric Gorr <email@hidden>)

  • Prev by Date: GDB: Getting information about a window
  • Next by Date: Re: Adding existing svn files to new project
  • Previous by thread: GDB: Getting information about a window
  • Next by thread: Re: GDB: Getting information about a window
  • Index(es):
    • Date
    • Thread