Advanced GDB question: menu item enabling / disabling debugging
Advanced GDB question: menu item enabling / disabling debugging
- Subject: Advanced GDB question: menu item enabling / disabling debugging
- From: Eric Gorr <email@hidden>
- Date: Fri, 25 Sep 2009 10:34:22 -0400
I am certain this is possible to do with GDB, but I am not sure how to
do it and was hoping to get some assistance from a GDB wizard.
The application I am working with is a Carbon application built with
PowerPlant.
When PowerPlant's LEventDispatcher::UpdateMenus function is called, I
can see it come through and enable the Undo menu item in the Edit
menu. However, when the menu is actually shown, the Undo menu option
is disabled. I am having a hard time tracking down exactly where this
is happening largely due to the size of complexity of the code base.
I figure what must be happening is that after MacEnableMenuItem is
called to enable the menu item that either DisableMenuItem or
DisableItem is being called to disable it again. But, again, I am
having trouble figuring out where this is happening.
What I would like to do is the following:
1. Set a break point on DisableMenuItem & DisableItem - easy to do,
just enter 'b DisableMenuItem' from the GDB command line
2. Set a condition on this break point to only fire when the menu item
text of the menu item being disabled is 'Undo' - hard...???
3. When the conditional break point fires, get a backtrace - easy,
from the GDB command line:
commands n
backtrace
end
where n is the break point # determined in #1
I would also like to print out the name of the menu item being
disabled - hard...?
I figure with the backtrace, I will be able to easily determine
exactly what is happening.
If I could simply figure out how to print out the name of the menu
item being disabled in #3, that would be sufficient. I would get a lot
of output, but setting the condition in #2 would not be necessary and
I can simply search through the log output.
If you have any other suggestions, I would be interested.
Thank you.
_______________________________________________
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