GDB下显示完整的长字符串

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"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值