GDB下用p看一个字符串的时候默认显示是截断的,可以通过set print element 0命令显示完整的字符串。
(gdb) p this->content_->rd_ptr()
$1 = 0x1e30a20 "<?xml version=/"1.0/" encoding=/"UTF-8/"?>/r/n<adRequest customId=/"/" networkId=/"2100/" proxied=/"false/" responseFormat=/"XML/" version=/"1/">/r/n <customDistributor customDistributorCategory=/"GOLD-DIST-CBS/" custom"...
(gdb) set print element 0
(gdb) p this->content_->rd_ptr()
$2 = 0x1e30a20 "<?xml version=/"1.0/" encoding=/"UTF-8/"?>/r/n<adRequest customId=/"/" networkId=/"2100/" proxied=/"false/" responseFormat=/"XML/" version=/"1/">/r/n <customDistributor customDistributorCategory=/"GOLD-DIST-CBS/" customDistributorId=/"DianeBlog.com/" customDistributorSignature=/"WFuIGlzIGRpc3Rpbmd1aXN/"/>/r/n/r/n <capabilities>/r/n <responseContinuation acceptFormats=/"XML/" proxyRequest=/"true/"/>/r/n <!-- <supportsSlotTemplate /> -->/r/n </capabilities>/r/n/r/n <customState><![CDATA[hello from CBS]]></customState>/r/n/r/n <visitor ipV4Address=/"159.226.224.113/">/r/n <httpHeaders>/r/n <httpHeader name=/"Cookie/" value=/"freewheel=0x9d8a7vb3/"/>/r/n </httpHeaders>/r/n <bandwidthInfo bandwidth=/"928/" source=/"MEASURED/"/>/r/n </visitor>/r/n <keyValues>/r/n/t<keyValue key=/"plc/" value=/"21515/" />/r/n <keyValue key=/"plc/" value=/"21517/" />/r/n <keyValue key=/"plc/" value=/"21519/" />/r/n </keyValues>/r/n <siteSection pageViewRandom=/"839271607/" customId=/"/" id=/"21151/">/r/n <videoPlayer>/r/n <videoAsset autoPlay=/"true/" customId=/"/" id=/"2151/" videoAssetNetworkId=/"2100/" duration=/"1320/" videoPlayRandom=/"850658219/">/r/n <adSlots defaultSlotProfile=/"videoInterstitial/">/r/n <temporalAdSlot customId=/"video_slot_pre/" maxAdDuration=/"120/" maxSlotDuration=/"300/" slotProfile=/"videoInterstitial/" timePosition=/"0/" timePositionClass=/"PREROLL/" />/r/n <temporalAdSlot customId=/"video_slot_fancy_pre/" maxAdDuration=/"120/" maxSlotDuration=/"300/" slotProfile=/"videoInterstitial/" timePosition=/"0/" adUnit=/"Fancy preroll/" />/r/n <temporalAdSlot customId=/"video_slot_mid/" maxAdDuration=/"120/" maxSlotDuration=/"300/" slotProfile=/"videoInterstitial/" timePosition=/"80/" timePositionClass=/"MIDROLL/" />/r/n <temporalAdSlot customId=/"Fancy_midroll_1/" maxAdDuration=/"120/" maxSlotDuration=/"300/" slotProfile=/"videoInterstitial/" timePosition=/"100/" adUnit=/"Fancy midroll/" />/r/n <temporalAdSlot customId=/"fancy_overlay_1/" maxAdDuration=/"120/" maxSlotDuration=/"300/" slotProfile=/"videoInterstitial/" timePosition=/"230/" adUnit=/"Fancy overlay/" />/r/n <temporalAdSlot customId=/"video_slot_post/" maxAdDuration=/"120/" maxSlotDuration=/"300/" slotProfile=/"videoInterstitial/" timePosition=/"500/" timePositionClass=/"POSTROLL/" />/r/n <temporalAdSlot customId=/"video_slot_overlay/" maxAdDuration=/"120/" maxSlotDuration=/"300/" slotProfile=/"videoInterstitial/" timePosition=/"220/" timePositionClass=/"OVERLAY/" />/r/n </adSlots>/r/n </videoAsset>/r/n <adSlots>/r/n <nonTemporalAdSlot acceptCompanion=/"true/" customId=/"player_displayad_1/" width=/"728/" height=/"90/" slotProfile=/"Display/"/>/r/n </adSlots>/r/n </videoPlayer>/r/n <adSlots>/r/n <nonTemporalAdSlot acceptCompanion=/"true/" customId=/"page_displayad_1/" width=/"120/" height=/"90/" slotProfile=/"Display/"/>/r/n </adSlots>/r/n </siteSection>/r/n</adRequest>/r/n/001"