Use the IDA and LLDB explore WebCore C + + class inheritance
原文:http://www.phonesdevelopers.com/1781016/
The surgery class named PluginWidgetIOS use lldb can get:
- (lldb)?image?lookup?-r?-s?PluginWidgetIOS??
- 7?symbols?match?the?regular?expression?‘PluginWidgetIOS‘?in?/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/PrivateFrameworks/WebKit.framework/WebKit:??
- ????????Address:?WebKit[0x0003a5a0]?(WebKit.TEXT.text?+?231680)??
- ????????Summary:?WebKit
PluginWidgetIOS::~PluginWidgetIOS() Address: WebKit[0x0003a5b0] (WebKit.__TEXT.__text + 231696) </span>
PluginWidgetIOS::~PluginWidgetIOS()????????Address:?WebKit[0x0003a6f0]?(WebKit.TEXT.text?+?232016)??
</li>
<li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: #6ce26c; list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;" data-iceapw="8" data-iceapc="1">
<span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;" data-iceapw="8"> Summary: WebKit - ????????Summary:?WebKit
PluginWidgetIOS::platformLayer() const Address: WebKit[0x0003a750] (WebKit.__TEXT.__text + 232112) </span>
PluginWidgetIOS::willProvidePluginLayer()?const????????Address:?WebKit[0x0003a7b0]?(WebKit.TEXT.text?+?232208)??
</li>
<li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: #6ce26c; list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;" data-iceapw="9" data-iceapc="1">
<span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;" data-iceapw="9"> Summary: WebKit - ????????Summary:?WebKit
PluginWidgetIOS::attachPluginLayer() Address: WebKit[0x0003a810] (WebKit.__TEXT.__text + 232304) </span>
PluginWidgetIOS::detachPluginLayer()????????Address:?WebKit[0x001335e0]?(WebKit.DATA.data?+?560)??
</li>
<li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: #6ce26c; list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; margin: 0px !important; padding: 0px 3px 0px 10px !important;" data-iceapw="8" data-iceapc="1">
<span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;" data-iceapw="8"> Summary: WebKit - ????????Summary:?vtable?for?PluginWidgetIOS??
Useful?information:
- Address:?WebKit[0x001335e0]?(WebKit.DATA.data?+?560)??
- ????????Summary:?vtable?for?PluginWidgetIOS??
IDA Open WebCore static library, goto (shortcuts?g) vtable address where 0x1335e0, you can see:
- data:001335E0?;?`vtable?for‘PluginWidgetIOS??
- data:001335E0?ZTV15PluginWidgetIOS?db????0??????????;?DATA?XREF:?nlsymbolptr:ZTV15PluginWidgetIOSptro??
- data:001335E1?????????????????db????0??
- data:001335E2?????????????????db????0??
- data:001335E3?????????????????db????0??
- data:001335E4?????????????????db????0??
- data:001335E5?????????????????db????0??
- data:001335E6?????????????????db????0??
- data:001335E7?????????????????db????0??
- data:001335E8?????????????????dd?offset?ZN15PluginWidgetIOSD1Ev?;?PluginWidgetIOS::~PluginWidgetIOS()??
- data:001335EC?????????????????dd?offset?ZN15PluginWidgetIOSD0Ev?;?PluginWidgetIOS::~PluginWidgetIOS()??
- data:001335F0?????????????????dd?offset?ZN7WebCore6Widget12setFrameRectERKNS7IntRectE?;?WebCore::Widget::setFrameRect(WebCore::IntRect??const&)??
- data:001335F4?????????????????dd?offset?ZN7WebCore6Widget5paintEPNS15GraphicsContextERKNS7IntRectE?;?WebCore::Widget::paint(WebCore::GraphicsContext?,WebCore::IntRect??const&)??
- data:001335F8?????????????????dd?offset?ZN12PluginWidget14invalidateRectERKN7WebCore7IntRectE?;?PluginWidget::invalidateRect(WebCore::IntRect??const&)??
- data:001335FC?????????????????dd?offset?ZN7WebCore6Widget8setFocusEb?;?WebCore::Widget::setFocus(bool)??
- data:00133600?????????????????dd?offset?ZN7WebCore6Widget4showEv?;?WebCore::Widget::show(void)??
- data:00133604?????????????????dd?offset?ZN7WebCore6Widget4hideEv?;?WebCore::Widget::hide(void)??
- data:00133608?????????????????dd?offset?ZN7WebCore6Widget16setParentVisibleEb?;?WebCore::Widget::setParentVisible(bool)??
- data:0013360C?????????????????dd?offset?ZNK7WebCore6Widget11isFrameViewEv?;?WebCore::Widget::isFrameView(void)??
- data:00133610?????????????????dd?offset?ZNK7WebCore6Widget12isPluginViewEv?;?WebCore::Widget::isPluginView(void)??
- data:00133614?????????????????dd?offset?ZNK7WebCore14PluginViewBase16isPluginViewBaseEv?;?WebCore::PluginViewBase::isPluginViewBase(void)??
- data:00133618?????????????????dd?offset?ZNK7WebCore6Widget11isScrollbarEv?;?WebCore::Widget::isScrollbar(void)??
- data:0013361C?????????????????dd?offset?ZN7WebCore6Widget9setParentEPNS_10ScrollViewE?;?WebCore::Widget::setParent(WebCore::ScrollView?)??
- data:00133620?????????????????dd?offset?ZN7WebCore6Widget11handleEventEPNS5EventE?;?WebCore::Widget::handleEvent(WebCore::Event?*)??
- data:00133624?????????????????dd?offset?ZN7WebCore6Widget12notifyWidgetENS18WidgetNotificationE?;?WebCore::Widget::notifyWidget(WebCore::WidgetNotification)??
- data:00133628?????????????????dd?offset?ZN7WebCore6Widget17frameRectsChangedEv?;?WebCore::Widget::frameRectsChanged(void)??
- data:0013362C?????????????????dd?offset?ZN7WebCore6Widget22widgetPositionsUpdatedEv?;?WebCore::Widget::widgetPositionsUpdated(void)??
- data:00133630?????????????????dd?offset?ZN7WebCore6Widget25transformsAffectFrameRectEv?;?WebCore::Widget::transformsAffectFrameRect(void)??
- data:00133634?????????????????dd?offset?ZNK7WebCore6Widget23convertToContainingViewERKNS7IntRectE?;?WebCore::Widget::convertToContainingView(WebCore::IntRect??const&)??
- data:00133638?????????????????dd?offset?ZNK7WebCore6Widget25convertFromContainingViewERKNS7IntRectE?;?WebCore::Widget::convertFromContainingView(WebCore::IntRect??const&)??
- data:0013363C?????????????????dd?offset?ZNK7WebCore6Widget23convertToContainingViewERKNS8IntPointE?;?WebCore::Widget::convertToContainingView(WebCore::IntPoint??const&)??
- data:00133640?????????????????dd?offset?ZNK7WebCore6Widget25convertFromContainingViewERKNS8IntPointE?;?WebCore::Widget::convertFromContainingView(WebCore::IntPoint??const&)??
- data:00133644?????????????????dd?offset?ZNK7WebCore6Widget13axObjectCacheEv?;?WebCore::Widget::axObjectCache(void)??
- data:00133648?????????????????dd?offset?ZNK15PluginWidgetIOS13platformLayerEv?;?PluginWidgetIOS::platformLayer(void)??
- data:0013364C?????????????????dd?offset?ZNK15PluginWidgetIOS22willProvidePluginLayerEv?;?PluginWidgetIOS::willProvidePluginLayer(void)??
- data:00133650?????????????????dd?offset?ZN15PluginWidgetIOS17attachPluginLayerEv?;?PluginWidgetIOS::attachPluginLayer(void)??
- data:00133654?????????????????dd?offset?ZN15PluginWidgetIOS17detachPluginLayerEv?;?PluginWidgetIOS::detachPluginLayer(void)??
- data:00133658?????????????????dd?offset?ZN7WebCore14PluginViewBase12scriptObjectEPN3JSC14JSGlobalObjectE?;?WebCore::PluginViewBase::scriptObject(JSC::JSGlobalObject?*)??
- data:0013365C?????????????????dd?offset?ZN7WebCore14PluginViewBase27privateBrowsingStateChangedEb?;?WebCore::PluginViewBase::privateBrowsingStateChanged(bool)??
- data:00133660?????????????????dd?offset?ZN7WebCore14PluginViewBase12getFormValueERN3WTF6StringE?;?WebCore::PluginViewBase::getFormValue(WTF::String?&)??
- data:00133664?????????????????dd?offset?ZN7WebCore14PluginViewBase6scrollENS15ScrollDirectionENS17ScrollGranularityE?;?WebCore::PluginViewBase::scroll(WebCore::ScrollDirection,WebCore::ScrollGranularity)??
- data:00133668?????????????????dd?offset?ZN7WebCore14PluginViewBase19horizontalScrollbarEv?;?WebCore::PluginViewBase::horizontalScrollbar(void)??
- data:0013366C?????????????????dd?offset?ZN7WebCore14PluginViewBase17verticalScrollbarEv?;?WebCore::PluginViewBase::verticalScrollbar(void)??
- data:00133670?????????????????dd?offset?ZN7WebCore14PluginViewBase16wantsWheelEventsEv?;?WebCore::PluginViewBase::wantsWheelEvents(void)??
- __data:00133674?????????????????align?10h??
This is virtual function table PluginWidgetIOS.?You can see from the comment after the semicolon function directly perform address point to the Widget, PluginWidget, PluginViewBase the function can the know PluginWidgetIOS is their direct or indirect subclass.
Reuse of the lldb image lookup these three classes, you can see the inheritance chain:
PluginWidgetIOS-> PluginViewBase-> PluginWidget-> Widget
The because the virtual list PluginWidget does not appear PluginViewBase the the Widget virtual table does not appear PluginWidget and PluginViewBase.?Of course, these three classes in the open source can find inheritance.
?
[转]Use the IDA and LLDB explore WebCore C + + class inheritance,古老的榕树,5-wow.com
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。