国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁(yè) > news >正文

大連商城網(wǎng)站制作公司b站免費(fèi)版入口

大連商城網(wǎng)站制作公司,b站免費(fèi)版入口,易語(yǔ)言怎么做視頻網(wǎng)站,企業(yè)年報(bào)系統(tǒng)GDB中print方法并不能直接打印STL容器中保存的變量,其實(shí)只要http://www.yolinux.com/TUTORIALS/src/dbinit_stl_views-1.03.txt這個(gè)文件保存為~/.gdbinit 就可以使用它提供的方法方便調(diào)試容器 指定啟動(dòng)文件:~/.gdbinit,下面的方法任選其一?!?article class="baidu_pl">

GDB中print方法并不能直接打印STL容器中保存的變量,其實(shí)只要http://www.yolinux.com/TUTORIALS/src/dbinit_stl_views-1.03.txt這個(gè)文件保存為~/.gdbinit 就可以使用它提供的方法方便調(diào)試容器

指定啟動(dòng)文件:~/.gdbinit,下面的方法任選其一。
1、調(diào)用GDB時(shí),指定啟動(dòng)文件。

# gdb -command=~/.gdbinit a.out 

2、運(yùn)行GDB后,指定啟動(dòng)文件。
2.1、“source /.gdbinit”,臨時(shí)導(dǎo)入/.gdbinit文件。
2.2、添加“add-auto-load-safe-path /.gdbinit”到/.gdbinit文件中,使該文件可以被加載;
2.3、添加“set auto-load safe-path ./”到./.gdbinit文件中,相當(dāng)于禁用了安全路徑的保護(hù);

http://www.yolinux.com/TUTORIALS/src/dbinit_stl_views-1.03.txt內(nèi)容如下:

cat ~/.gdbinit
#                                                                                                        
#   STL GDB evaluators/views/utilities - 1.03
#
#   The new GDB commands:                                                         
# 	    are entirely non instrumental                                             
# 	    do not depend on any "inline"(s) - e.g. size(), [], etc
#       are extremely tolerant to debugger settings
#                                                                                 
#   This file should be "included" in .gdbinit as following:
#   source stl-views.gdb or just paste it into your .gdbinit file
#
#   The following STL containers are currently supported:
#
#       std::vector<T> -- via pvector command
#       std::list<T> -- via plist or plist_member command
#       std::map<T,T> -- via pmap or pmap_member command
#       std::multimap<T,T> -- via pmap or pmap_member command
#       std::set<T> -- via pset command
#       std::multiset<T> -- via pset command
#       std::deque<T> -- via pdequeue command
#       std::stack<T> -- via pstack command
#       std::queue<T> -- via pqueue command
#       std::priority_queue<T> -- via ppqueue command
#       std::bitset<n> -- via pbitset command
#       std::string -- via pstring command
#       std::widestring -- via pwstring command
#
#   The end of this file contains (optional) C++ beautifiers
#   Make sure your debugger supports $argc
#
#   Simple GDB Macros writen by Dan Marinescu (H-PhD) - License GPL
#   Inspired by intial work of Tom Malnar, 
#     Tony Novac (PhD) / Cornell / Stanford,
#     Gilad Mishne (PhD) and Many Many Others.
#   Contact: dan_c_marinescu@yahoo.com (Subject: STL)
#
#   Modified to work with g++ 4.3 by Anders Elton
#   Also added _member functions, that instead of printing the entire class in map, prints a member.#
# std::vector<>
#define pvectorif $argc == 0help pvectorelseset $size = $arg0._M_impl._M_finish - $arg0._M_impl._M_startset $capacity = $arg0._M_impl._M_end_of_storage - $arg0._M_impl._M_startset $size_max = $size - 1endif $argc == 1set $i = 0while $i < $sizeprintf "elem[%u]: ", $ip *($arg0._M_impl._M_start + $i)set $i++endendif $argc == 2set $idx = $arg1if $idx < 0 || $idx > $size_maxprintf "idx1, idx2 are not in acceptable range: [0..%u].\n", $size_maxelseprintf "elem[%u]: ", $idxp *($arg0._M_impl._M_start + $idx)endendif $argc == 3set $start_idx = $arg1set $stop_idx = $arg2if $start_idx > $stop_idxset $tmp_idx = $start_idxset $start_idx = $stop_idxset $stop_idx = $tmp_idxendif $start_idx < 0 || $stop_idx < 0 || $start_idx > $size_max || $stop_idx > $size_maxprintf "idx1, idx2 are not in acceptable range: [0..%u].\n", $size_maxelseset $i = $start_idxwhile $i <= $stop_idxprintf "elem[%u]: ", $ip *($arg0._M_impl._M_start + $i)set $i++endendendif $argc > 0printf "Vector size = %u\n", $sizeprintf "Vector capacity = %u\n", $capacityprintf "Element "whatis $arg0._M_impl._M_startend
enddocument pvectorPrints std::vector<T> information.Syntax: pvector <vector> <idx1> <idx2>Note: idx, idx1 and idx2 must be in acceptable range [0..<vector>.size()-1].Examples:pvector v - Prints vector content, size, capacity and T typedefpvector v 0 - Prints element[idx] from vectorpvector v 1 2 - Prints elements in range [idx1..idx2] from vector
end #
# std::list<>
#define plistif $argc == 0help plistelseset $head = &$arg0._M_impl._M_nodeset $current = $arg0._M_impl._M_node._M_nextset $size = 0while $current != $headif $argc == 2printf "elem[%u]: ", $sizep *($arg1*)($current + 1)endif $argc == 3if $size == $arg2printf "elem[%u]: ", $sizep *($arg1*)($current + 1)endendset $current = $current._M_nextset $size++endprintf "List size = %u \n", $sizeif $argc == 1printf "List "whatis $arg0printf "Use plist <variable_name> <element_type> to see the elements in the list.\n"endend
enddocument plistPrints std::list<T> information.Syntax: plist <list> <T> <idx>: Prints list size, if T defined all elements or just element at idxExamples:plist l - prints list size and definitionplist l int - prints all elements and list sizeplist l int 2 - prints the third element in the list (if exists) and list size
enddefine plist_memberif $argc == 0help plist_memberelseset $head = &$arg0._M_impl._M_nodeset $current = $arg0._M_impl._M_node._M_nextset $size = 0while $current != $headif $argc == 3printf "elem[%u]: ", $sizep (*($arg1*)($current + 1)).$arg2endif $argc == 4if $size == $arg3printf "elem[%u]: ", $sizep (*($arg1*)($current + 1)).$arg2endendset $current = $current._M_nextset $size++endprintf "List size = %u \n", $sizeif $argc == 1printf "List "whatis $arg0printf "Use plist_member <variable_name> <element_type> <member> to see the elements in the list.\n"endend
enddocument plist_memberPrints std::list<T> information.Syntax: plist <list> <T> <idx>: Prints list size, if T defined all elements or just element at idxExamples:plist_member l int member - prints all elements and list sizeplist_member l int member 2 - prints the third element in the list (if exists) and list size
end#
# std::map and std::multimap
#define pmapif $argc == 0help pmapelseset $tree = $arg0set $i = 0set $node = $tree._M_t._M_impl._M_header._M_leftset $end = $tree._M_t._M_impl._M_headerset $tree_size = $tree._M_t._M_impl._M_node_countif $argc == 1printf "Map "whatis $treeprintf "Use pmap <variable_name> <left_element_type> <right_element_type> to see the elements in the map.\n"endif $argc == 3while $i < $tree_sizeset $value = (void *)($node + 1)printf "elem[%u].left: ", $ip *($arg1*)$valueset $value = $value + sizeof($arg1)printf "elem[%u].right: ", $ip *($arg2*)$valueif $node._M_right != 0set $node = $node._M_rightwhile $node._M_left != 0set $node = $node._M_leftendelseset $tmp_node = $node._M_parentwhile $node == $tmp_node._M_rightset $node = $tmp_nodeset $tmp_node = $tmp_node._M_parentendif $node._M_right != $tmp_nodeset $node = $tmp_nodeendendset $i++endendif $argc == 4set $idx = $arg3set $ElementsFound = 0while $i < $tree_sizeset $value = (void *)($node + 1)if *($arg1*)$value == $idxprintf "elem[%u].left: ", $ip *($arg1*)$valueset $value = $value + sizeof($arg1)printf "elem[%u].right: ", $ip *($arg2*)$valueset $ElementsFound++endif $node._M_right != 0set $node = $node._M_rightwhile $node._M_left != 0set $node = $node._M_leftendelseset $tmp_node = $node._M_parentwhile $node == $tmp_node._M_rightset $node = $tmp_nodeset $tmp_node = $tmp_node._M_parentendif $node._M_right != $tmp_nodeset $node = $tmp_nodeendendset $i++endprintf "Number of elements found = %u\n", $ElementsFoundendif $argc == 5set $idx1 = $arg3set $idx2 = $arg4set $ElementsFound = 0while $i < $tree_sizeset $value = (void *)($node + 1)set $valueLeft = *($arg1*)$valueset $valueRight = *($arg2*)($value + sizeof($arg1))if $valueLeft == $idx1 && $valueRight == $idx2printf "elem[%u].left: ", $ip $valueLeftprintf "elem[%u].right: ", $ip $valueRightset $ElementsFound++endif $node._M_right != 0set $node = $node._M_rightwhile $node._M_left != 0set $node = $node._M_leftendelseset $tmp_node = $node._M_parentwhile $node == $tmp_node._M_rightset $node = $tmp_nodeset $tmp_node = $tmp_node._M_parentendif $node._M_right != $tmp_nodeset $node = $tmp_nodeendendset $i++endprintf "Number of elements found = %u\n", $ElementsFoundendprintf "Map size = %u\n", $tree_sizeend
enddocument pmapPrints std::map<TLeft and TRight> or std::multimap<TLeft and TRight> information. Works for std::multimap as well.Syntax: pmap <map> <TtypeLeft> <TypeRight> <valLeft> <valRight>: Prints map size, if T defined all elements or just element(s) with val(s)Examples:pmap m - prints map size and definitionpmap m int int - prints all elements and map sizepmap m int int 20 - prints the element(s) with left-value = 20 (if any) and map sizepmap m int int 20 200 - prints the element(s) with left-value = 20 and right-value = 200 (if any) and map size
enddefine pmap_memberif $argc == 0help pmap_memberelseset $tree = $arg0set $i = 0set $node = $tree._M_t._M_impl._M_header._M_leftset $end = $tree._M_t._M_impl._M_headerset $tree_size = $tree._M_t._M_impl._M_node_countif $argc == 1printf "Map "whatis $treeprintf "Use pmap <variable_name> <left_element_type> <right_element_type> to see the elements in the map.\n"endif $argc == 5while $i < $tree_sizeset $value = (void *)($node + 1)printf "elem[%u].left: ", $ip (*($arg1*)$value).$arg2set $value = $value + sizeof($arg1)printf "elem[%u].right: ", $ip (*($arg3*)$value).$arg4if $node._M_right != 0set $node = $node._M_rightwhile $node._M_left != 0set $node = $node._M_leftendelseset $tmp_node = $node._M_parentwhile $node == $tmp_node._M_rightset $node = $tmp_nodeset $tmp_node = $tmp_node._M_parentendif $node._M_right != $tmp_nodeset $node = $tmp_nodeendendset $i++endendif $argc == 6set $idx = $arg5set $ElementsFound = 0while $i < $tree_sizeset $value = (void *)($node + 1)if *($arg1*)$value == $idxprintf "elem[%u].left: ", $ip (*($arg1*)$value).$arg2set $value = $value + sizeof($arg1)printf "elem[%u].right: ", $ip (*($arg3*)$value).$arg4set $ElementsFound++endif $node._M_right != 0set $node = $node._M_rightwhile $node._M_left != 0set $node = $node._M_leftendelseset $tmp_node = $node._M_parentwhile $node == $tmp_node._M_rightset $node = $tmp_nodeset $tmp_node = $tmp_node._M_parentendif $node._M_right != $tmp_nodeset $node = $tmp_nodeendendset $i++endprintf "Number of elements found = %u\n", $ElementsFoundendprintf "Map size = %u\n", $tree_sizeend
enddocument pmap_memberPrints std::map<TLeft and TRight> or std::multimap<TLeft and TRight> information. Works for std::multimap as well.Syntax: pmap <map> <TtypeLeft> <TypeRight> <valLeft> <valRight>: Prints map size, if T defined all elements or just element(s) with val(s)Examples:pmap_member m class1 member1 class2 member2 - prints class1.member1 : class2.member2pmap_member m class1 member1 class2 member2 lvalue - prints class1.member1 : class2.member2 where class1 == lvalue
end#
# std::set and std::multiset
#define psetif $argc == 0help psetelseset $tree = $arg0set $i = 0set $node = $tree._M_t._M_impl._M_header._M_leftset $end = $tree._M_t._M_impl._M_headerset $tree_size = $tree._M_t._M_impl._M_node_countif $argc == 1printf "Set "whatis $treeprintf "Use pset <variable_name> <element_type> to see the elements in the set.\n"endif $argc == 2while $i < $tree_sizeset $value = (void *)($node + 1)printf "elem[%u]: ", $ip *($arg1*)$valueif $node._M_right != 0set $node = $node._M_rightwhile $node._M_left != 0set $node = $node._M_leftendelseset $tmp_node = $node._M_parentwhile $node == $tmp_node._M_rightset $node = $tmp_nodeset $tmp_node = $tmp_node._M_parentendif $node._M_right != $tmp_nodeset $node = $tmp_nodeendendset $i++endendif $argc == 3set $idx = $arg2set $ElementsFound = 0while $i < $tree_sizeset $value = (void *)($node + 1)if *($arg1*)$value == $idxprintf "elem[%u]: ", $ip *($arg1*)$valueset $ElementsFound++endif $node._M_right != 0set $node = $node._M_rightwhile $node._M_left != 0set $node = $node._M_leftendelseset $tmp_node = $node._M_parentwhile $node == $tmp_node._M_rightset $node = $tmp_nodeset $tmp_node = $tmp_node._M_parentendif $node._M_right != $tmp_nodeset $node = $tmp_nodeendendset $i++endprintf "Number of elements found = %u\n", $ElementsFoundendprintf "Set size = %u\n", $tree_sizeend
enddocument psetPrints std::set<T> or std::multiset<T> information. Works for std::multiset as well.Syntax: pset <set> <T> <val>: Prints set size, if T defined all elements or just element(s) having valExamples:pset s - prints set size and definitionpset s int - prints all elements and the size of spset s int 20 - prints the element(s) with value = 20 (if any) and the size of s
end#
# std::dequeue
#define pdequeueif $argc == 0help pdequeueelseset $size = 0set $start_cur = $arg0._M_impl._M_start._M_curset $start_last = $arg0._M_impl._M_start._M_lastset $start_stop = $start_lastwhile $start_cur != $start_stopp *$start_curset $start_cur++set $size++endset $finish_first = $arg0._M_impl._M_finish._M_firstset $finish_cur = $arg0._M_impl._M_finish._M_curset $finish_last = $arg0._M_impl._M_finish._M_lastif $finish_cur < $finish_lastset $finish_stop = $finish_curelseset $finish_stop = $finish_lastendwhile $finish_first != $finish_stopp *$finish_firstset $finish_first++set $size++endprintf "Dequeue size = %u\n", $sizeend
enddocument pdequeuePrints std::dequeue<T> information.Syntax: pdequeue <dequeue>: Prints dequeue size, if T defined all elementsDeque elements are listed "left to right" (left-most stands for front and right-most stands for back)Example:pdequeue d - prints all elements and size of d
end#
# std::stack
#define pstackif $argc == 0help pstackelseset $start_cur = $arg0.c._M_impl._M_start._M_curset $finish_cur = $arg0.c._M_impl._M_finish._M_curset $size = $finish_cur - $start_curset $i = $size - 1while $i >= 0p *($start_cur + $i)set $i--endprintf "Stack size = %u\n", $sizeend
enddocument pstackPrints std::stack<T> information.Syntax: pstack <stack>: Prints all elements and size of the stackStack elements are listed "top to buttom" (top-most element is the first to come on pop)Example:pstack s - prints all elements and the size of s
end#
# std::queue
#define pqueueif $argc == 0help pqueueelseset $start_cur = $arg0.c._M_impl._M_start._M_curset $finish_cur = $arg0.c._M_impl._M_finish._M_curset $size = $finish_cur - $start_curset $i = 0while $i < $sizep *($start_cur + $i)set $i++endprintf "Queue size = %u\n", $sizeend
enddocument pqueuePrints std::queue<T> information.Syntax: pqueue <queue>: Prints all elements and the size of the queueQueue elements are listed "top to bottom" (top-most element is the first to come on pop)Example:pqueue q - prints all elements and the size of q
end#
# std::priority_queue
#define ppqueueif $argc == 0help ppqueueelseset $size = $arg0.c._M_impl._M_finish - $arg0.c._M_impl._M_startset $capacity = $arg0.c._M_impl._M_end_of_storage - $arg0.c._M_impl._M_startset $i = $size - 1while $i >= 0p *($arg0.c._M_impl._M_start + $i)set $i--endprintf "Priority queue size = %u\n", $sizeprintf "Priority queue capacity = %u\n", $capacityend
enddocument ppqueuePrints std::priority_queue<T> information.Syntax: ppqueue <priority_queue>: Prints all elements, size and capacity of the priority_queuePriority_queue elements are listed "top to buttom" (top-most element is the first to come on pop)Example:ppqueue pq - prints all elements, size and capacity of pq
end#
# std::bitset
#define pbitsetif $argc == 0help pbitsetelsep /t $arg0._M_wend
enddocument pbitsetPrints std::bitset<n> information.Syntax: pbitset <bitset>: Prints all bits in bitsetExample:pbitset b - prints all bits in b
end#
# std::string
#define pstringif $argc == 0help pstringelseprintf "String \t\t\t= \"%s\"\n", $arg0._M_data()printf "String size/length \t= %u\n", $arg0._M_rep()._M_lengthprintf "String capacity \t= %u\n", $arg0._M_rep()._M_capacityprintf "String ref-count \t= %d\n", $arg0._M_rep()._M_refcountend
enddocument pstringPrints std::string information.Syntax: pstring <string>Example:pstring s - Prints content, size/length, capacity and ref-count of string s
end #
# std::wstring
#define pwstringif $argc == 0help pwstringelsecall printf("WString \t\t= \"%ls\"\n", $arg0._M_data())printf "WString size/length \t= %u\n", $arg0._M_rep()._M_lengthprintf "WString capacity \t= %u\n", $arg0._M_rep()._M_capacityprintf "WString ref-count \t= %d\n", $arg0._M_rep()._M_refcountend
enddocument pwstringPrints std::wstring information.Syntax: pwstring <wstring>Example:pwstring s - Prints content, size/length, capacity and ref-count of wstring s
end #
# C++ related beautifiers (optional)
#set print pretty on
set print object on
set print static-members on
set print vtbl on
set print demangle on
set demangle-style gnu-v3
set print sevenbit-strings off
http://aloenet.com.cn/news/37094.html

相關(guān)文章:

  • 做電子章網(wǎng)站可以下載新聞視頻的網(wǎng)站
  • 婚紗攝影的網(wǎng)站怎么做什么是百度競(jìng)價(jià)排名服務(wù)
  • 網(wǎng)站內(nèi)鏈?zhǔn)鞘裁?怎么做如何制作一個(gè)簡(jiǎn)單的網(wǎng)頁(yè)
  • 做舞臺(tái)燈光的在哪些網(wǎng)站接訂單呢今日新聞?wù)?0字
  • 怎么做網(wǎng)站的百度排名百度指數(shù)怎么看
  • wordpress密碼漏洞佛山百度seo代理
  • 貴州高端網(wǎng)站建設(shè)網(wǎng)站網(wǎng)址查詢(xún)工具
  • 織夢(mèng)網(wǎng)站自助申請(qǐng)友鏈代碼seo建站平臺(tái)哪家好
  • 江蘇省政府門(mén)戶(hù)網(wǎng)站建設(shè)方案哪個(gè)行業(yè)最需要推廣
  • 如何將自己做的網(wǎng)站導(dǎo)入淘寶百度電腦版網(wǎng)址
  • 天津做網(wǎng)站的360優(yōu)化大師下載
  • 做網(wǎng)站需要什么源碼惠州seo排名公司
  • 網(wǎng)站建設(shè)品牌策劃方案制作網(wǎng)頁(yè)教程
  • 制作網(wǎng)站的軟件主要有灰色詞排名上首頁(yè)
  • 怎樣做代刷網(wǎng)站長(zhǎng)永久免費(fèi)國(guó)外域名注冊(cè)
  • 正能量網(wǎng)站窗口免費(fèi)進(jìn)網(wǎng)店推廣方式有哪些
  • 長(zhǎng)春網(wǎng)站建設(shè)電話咨詢(xún)海外網(wǎng)絡(luò)推廣平臺(tái)
  • 網(wǎng)站建設(shè)步驟網(wǎng)站推廣方案范例
  • 福州市城鄉(xiāng)建設(shè)局網(wǎng)站人工智能培訓(xùn)班
  • 推拿網(wǎng)站制作長(zhǎng)春網(wǎng)絡(luò)科技公司排名
  • 高端網(wǎng)站開(kāi)發(fā)程推廣賺錢(qián)的微信小程序
  • 電子商務(wù)網(wǎng)站建設(shè)與管理 教案2345網(wǎng)址導(dǎo)航官方網(wǎng)站
  • 做搜狗pc網(wǎng)站網(wǎng)站seo標(biāo)題優(yōu)化技巧
  • 做百度競(jìng)價(jià)網(wǎng)站修改影響排名嗎站長(zhǎng)之家seo概況查詢(xún)
  • 金華競(jìng)價(jià)排名 金華企業(yè)網(wǎng)站建設(shè)線上營(yíng)銷(xiāo)活動(dòng)有哪些
  • 如何開(kāi)發(fā)一個(gè)微網(wǎng)站sem是什么工作
  • 利用高權(quán)重網(wǎng)站做關(guān)鍵詞運(yùn)營(yíng)和營(yíng)銷(xiāo)是一回事嗎
  • 做外鏈網(wǎng)站優(yōu)化方案官方網(wǎng)站
  • 免費(fèi)網(wǎng)站建設(shè)新技術(shù)優(yōu)化流程
  • 玉樹(shù)營(yíng)銷(xiāo)網(wǎng)站建設(shè)十大營(yíng)銷(xiāo)策劃公司排名