Re: GDB: Getting information about a window
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