资源描述:
《GDB调试的使用手册》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、GDBNÁóä•HX’AnnCharles@tom.com2003c0818FContents1OóŠ22$1§S32.1˜·-1ëê.........................................42.2˜‚¸Cþ..........................................43üÚ‰144ää::(breakpoint)44.1˜ä:............................................44.2wä:.....................................
2、.......64.3'4ÚåÄä:(Enable&Disable)..............................64.4^‡ä:............................................74.5íØä:............................................75wCþ76wS•77w©‡&E88wc©‡89XÛéé
©‡810wM•ì811'uframe811.1Ÿo´frame...........................................811.2
3、wframe............................................811.3UCcframe.........................................912NÁÁžžUCCCCþ9113NÁÁžžN^¼ê914?NÁ915~f915.1?Ö1,^NÁ§S‹<·-1ëê,Ú‚¸Cþ........................915.2?Ö2‹<óL.........................................1215.3?Ö3,æÒ.......................
4、....................1315.4watchpointÚdisplay......................................1616õ‚§NÁ1617õ?§NÁ1621OóŠ3NÁ§Sƒc,yO˜‡§S,^u`²Þ~.ÿÁ§SXe.Listing1:ÿÁ“ètest.cc1#include2#include34externcharenviron;5classSampleParentClassf6public:7virtualvoidPrintMe()f8printf("Ia
5、mparentclass.nn");9gvirtualvoidPrintMe(constchars)f10printf("Iamparentclass.nn%snn",s);11g12classSampleParentClassnext;13constcharname;14g;15classSampleChildClass:publicSampleParentClassf16virtualvoidPrintMe()f17printf("Iamchildclass.nnMynameis%snn",name);18gvirtualvoidPrintMe(cons
6、tchars)f19printf("Iamchildclass.nnMynameis%snn%snn",name,s);20g21g;22intfoo(inta,intb)23f24intr=0;25printf("ais%d,bis%dnn",a,b);26r=a+b;27returnr;28g29intfoo(inta)30f31printf("ais%dnn");32returna+1;33g3435intmain(intargc,charargv)36f37inta=1;38intb=3;39inti=0;40charp;341printf("He
7、lloGDBnn");42printf(" commandlinearguments nn");43for(i=0,p=argv[i];p!=NULL;p=argv[++i])f44printf("%d:nt%snn",i,p);//breakpoint45g46printf(" enviroment nn");47for(i=0,p=environ[i];p!=NULL;p=environ[++i])f48printf("%d:nt%snn",i,p);49g50//tes
8、tover