亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tut

?? unix v7是最后一個廣泛發(fā)布的研究型UNIX版本
??
?? 第 1 頁 / 共 2 頁
字號:
.de P1.sp .5.if \\n(.$>0 .ta \\$1 \\$2 \\$3 \\$4 \\$5 \\$6.if \\n(.$=0 .ta 1i 1.7i 2.5i.ft 3.nf...de P2.sp .5.ft 1.fi...RP.....TM "77-8234-11 77-1273-10" "49170-220 39199" "40952-1 39199-11".ND May 5, 1977.TLA Tutorial Introduction to ADB.AU "MH2F-207" "3816"J. F. Maranzano.AU "MH2C-512" 7419S. R. Bourne.AI.MH.OKUNIXDebuggingC Programming.AB.PPDebugging tools generally provide a wealth of informationabout the inner workings of programs.These tools have been available on.UXto allow users toexamine ``core'' files that result from aborted programs.A new debugging program, ADB, provides enhanced capabilitiesto examine "core" and other program files in avariety of formats, run programs with embedded breakpoints and patch files..PPADB is an indispensable but complex tool for debugging crashed systems and/orprograms.This document provides an introduction to ADB with examples of its use.It explains the various formatting options, techniques for debugging C programs, examples of printingfile system information and patching..AE.CS 12 15 27 13 0 5.NHIntroduction.PPADB is a new debugging program that isavailable on UNIX.It provides capabilities to look at``core'' files resulting from aborted programs, print output in avariety of formats, patch files, and run programswith embedded breakpoints.This document provides examples ofthe more useful features of ADB.The reader is expected to befamiliar with the basic commands on.UXwith the Clanguage, and with References 1, 2 and 3..NHA Quick Survey.NH 2Invocation.PPADB is invoked as:.P1	adb objfile corefile.P2where.ulobjfileis an executable UNIX file and .ulcorefile is a core image file.Many times this will look like:.P1	adb a.out core.P2or more simply:.P1	adb.P2where the defaults are .ula.outand.ulcorerespectively.The filename minus (\-) means ignore this argument as in:.P1	adb \- core.P2.PPADB has requests for examining locations in either file.The\fB?\fPrequest examines the contents of .ulobjfile,the\fB/\fPrequest examines the .ulcorefile.The general form of these requests is:.P1	address ? format.P2or.P1	address / format.P2.NH 2Current Address.PPADB maintains a current address, called dot,similar in function to the current pointer in the UNIX editor.When an address is entered, the current address is set to that location,so that:.P1	0126?i.P2sets dot to octal 126 and prints the instructionat that address.The request:.P1	.,10/d.P2prints 10 decimal numbers starting at dot.Dot ends up referring to the address of the last item printed.When used with the \fB?\fP or \fB/\fP requests,the current address can be advanced by typing newline; it can be decrementedby typing \fB^\fP..PPAddresses are represented byexpressions.Expressions are made up from decimal, octal, and hexadecimal integers,and symbols from the program under test.These may be combined with the operators +, \-, *, % (integer division), & (bitwise and), | (bitwise inclusive or),  # (round upto the next multiple), and ~ (not).(All arithmetic within ADB is 32 bits.)When typing a symbolic address for a C program, the user can type .ulnameor.ul_name;ADB will recognize both forms..NH 2Formats.PPTo print data, a user specifies a collection of letters and charactersthat describe the format of the printout.Formats are "remembered" in the sense that typing a request without onewill cause the new printout to appear in the previous format.The following are the most commonly used format letters..P1\fB	b	\fPone byte in octal\fB	c	\fPone byte as a character\fB	o	\fPone word in octal\fB	d	\fPone word in decimal\fB	f	\fPtwo words in floating point\fB	i	\fPPDP 11 instruction\fB	s	\fPa null terminated character string\fB	a	\fPthe value of dot\fB	u	\fPone word as unsigned integer\fB	n	\fPprint a newline\fB	r	\fPprint a blank space\fB	^	\fPbackup dot.P2(Format letters are also available for "long" values,for example, `\fBD\fR' for long decimal, and `\fBF\fP' for double floating point.)For other formats see the ADB manual..NH 2General Request Meanings.PPThe general form of a request is:.P1	address,count command modifier.P2which sets `dot' to \fIaddress\fPand executes the command\fIcount\fR times..PPThe following table illustrates some general ADB command meanings:.P1	Command	Meaning\fB	    ?	\fPPrint contents from \fIa.out\fP file\fB	    /	\fPPrint contents from \fIcore\fP file\fB	    =	\fPPrint value of "dot"\fB	    :	\fPBreakpoint control\fB	    $	\fPMiscellaneous requests\fB	    ;	\fPRequest separator\fB	    !	\fPEscape to shell.P2.PPADB catches signals, so a user cannot use a quit signal to exit from ADB.The request $q or $Q (or cntl-D) must be usedto exit from ADB..NHDebugging C Programs.NH 2Debugging A Core Image .PPConsider the C program in Figure 1.The program is used to illustrate a common error made byC programmers.The object of the program is to change thelower case "t" to upper case in the string pointed to by.ulcharpand then write the character string to the file indicated byargument 1.The bug shown is that the character "T"is stored in the pointer .ulcharpinstead of the string pointed to by.ulcharp.Executing the program produces a core file because of an out of bounds memory reference..PPADB is invoked by:.P1	adb a.out core.P2The first debugging request:.P1	$c.P2is used to give a C backtrace through thesubroutines called.As shown in Figure 2only one function (\fImain\fR) was called and thearguments .ulargc and .ulargv have octal values 02 and0177762 respectively.Both of these values lookreasonable; 02 = two arguments, 0177762 = address on stackof parameter vector..brThe next request:.P1	$C.P2is used to give a C backtrace plus an interpretationof all the local variables in each function and theirvalues in octal.The value of the variable .ulcclooks incorrectsince.ulccwas declared as a character..PPThe next request:.P1	$r.P2prints out the registers including the programcounter and an interpretation of the instruction at thatlocation..PPThe request:.P1	$e.P2prints out the values of all external variables..PPA map exists for each filehandled byADB.The map for the.ula.outfile is referenced by \fB?\fP whereas the map for .ulcorefile is referenced by \fB/\fP.Furthermore, a good rule of thumb is to use \fB?\fP forinstructions and \fB/\fP for data when looking at programs.To print out information about the maps type:.P1	$m.P2This produces a report of the contents of the maps.More about these maps later..PPIn our example, it is useful to see thecontents of the string pointed to by.ulcharp.This is done by:.P1	*charp/s.P2which says use .ulcharpas a pointer in the.ulcorefileand print the information as a character string.This printout clearly shows that the character bufferwas incorrectly overwritten and helps identify the error.Printing the locations around .ulcharpshows that the buffer is unchangedbut that the pointer is destroyed.Using ADB similarly, we could print information about thearguments to a function.The request:.P1	main.argc/d.P2prints the decimal .ulcoreimage value of the argument .ulargcin the function .ulmain..brThe request:.P1	*main.argv,3/o.P2prints the octal values of the three consecutivecells pointed to by .ulargvin the function .ulmain.Note that these values are the addresses of the argumentsto main.Therefore: .P1	0177770/s.P2prints the ASCII value of the first argument.Another way to print this value would have been.P1	*"/s.P2The " means ditto which remembers the last addresstyped, in this case \fImain.argc\fP ; the \fB*\fP instructs ADB to use the address field of the.ulcore file as a pointer..PPThe request:.P1	.=o.P2prints the current address (not its contents) in octal which has been set to the address of the first argument.The current address, dot, is used by ADB to"remember" its current location.It allows the user to reference locations relative to the currentaddress, for example:.P1	.\-10/d.P2.NH 2Multiple Functions.PPConsider the C program illustrated inFigure 3.This program calls functions .ulf, g,and.ulh until the stack is exhausted and a core image is produced..PPAgain you can enter the debugger via:.P1	adb.P2which assumes the names .ula.outand .ulcorefor the executablefile and core image file respectively.The request:.P1	$c.P2will fill a page of backtrace references to .ulf, g,and.ulh.Figure 4 shows an abbreviated list (typing .ulDELwill terminate the output and bring you back to ADB request level)..PPThe request:.P1	,5$C.P2prints the five most recent activations..PPNotice that each function (\fIf,g,h\fP) has a counterof the number of times it was called..PPThe request:.P1	fcnt/d.P2prints the decimal value of the counter for the function.ulf.Similarly .ulgcntand.ulhcntcould be printed.To print the value of an automatic variable,for example the decimal value of.ul xin the last call of the function.ulh,type:.P1	h.x/d.P2It is currently not possible in the exported version to print stack frames other than the most recent activation of a function.Therefore, a user can print everything with \fB$C\fR or the occurrence of a variable in the most recent call of a function.It is possible with the \fB$C\fR request, however, to print the stack framestarting at some address as \fBaddress$C.\fR.NH 2Setting Breakpoints.PPConsider the C program in Figure 5.This program, which changes tabs into blanks, is adapted from.ulSoftware Toolsby Kernighan and Plauger, pp. 18-27..PPWe will run this program under the control of ADB (see Figure 6a) by:.P1	adb a.out \-.P2Breakpoints are set in the program as:.ul.P1	address:b  [request].P2The requests:.P1	settab+4:b	fopen+4:b	getc+4:b	tabpos+4:b.P2set breakpoints at the start of these functions.C does not generate statement labels.Therefore it is currently not possible to plant breakpoints at locationsother than function entry points without a knowledge of the codegenerated by the C compiler.The above addresses are entered as.ft Bsymbol+4.ft Rso that they will appear in anyC backtrace since the first instruction of each function is a callto the C save routine (\fIcsv\fR).Note that some of the functions are from the C library..PPTo print the location of breakpoints one types:.P1	$b.P2The display indicates a.ulcountfield.A breakpoint is bypassed.ulcount \-1times before causing a stop.The.ulcommandfield indicates the ADB requests to be executed each time the breakpoint is encountered.In our example no.ulcommandfields are present..PPBy displaying the original instructions at the function.ulsettabwe see that the breakpoint is set after the jsr to the C save routine.We can display the instructions using the ADB request:.P1	settab,5?ia.P2This request displays five instructions starting at.ulsettabwith the addresses of each location displayed.Another variation is:.P1	settab,5?i.P2which displays the instructions with only the starting address..PPNotice that we accessed the addresses from the .ula.out file with the \fB?\fP command.In general when asking for a printout of multiple items,ADB will advance the current address the number ofbytes necessary to satisfy the request; in the aboveexample five instructions were displayed and the current address wasadvanced 18 (decimal) bytes..PPTo run the program one simply types:.P1	:r.P2To delete a breakpoint, for instance the entry to the function.ulsettab,one types:.P1	settab+4:d.P2To continue execution of the program from the breakpoint type:.P1	:c.PPOnce the program has stopped (in this case at the breakpoint for.ulfopen),ADB requests can be used to display the contents of memory.For example:.P1	$C.P2to display a stack trace, or:.P1	tabs,3/8o.P2to print three lines of 8 locations each from the array called.ultabs.By this time (at location.ulfopen)in the C program,.ulsettabhas been called and should have set a one in every eighth location of .ultabs..NH 2Advanced Breakpoint Usage.PPWe continue execution of the program with:.P1	:c.P2See Figure 6b..ulGetcis called three times and  the contents of the variable .ulcin the function.ulmainare displayedeach time.The single character on the left hand edge is the output from the C program.On the third occurrence of .ulgetcthe program stops.We can look at the full buffer of characters by typing:.P1	ibuf+6/20c.P2When we continue the program with:.P1	:c.P2we hit our first breakpoint at.ultabpossince there is a tab following the"This" word of the data..PPSeveral breakpoints of.ultabposwill occur until the program has changed the tab into equivalent blanks.Since we feel that.ultabposis working,we can remove the breakpoint at that location by:.P1	tabpos+4:d.P2If the program is continued with:.P1	:c.P2it resumes normal execution after ADB prints

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲午夜av在线| 国产精品日日摸夜夜摸av| 一区二区三区高清在线| 色综合视频一区二区三区高清| 日本一区二区成人| 成人午夜碰碰视频| 亚洲免费av观看| 欧美色图激情小说| 美腿丝袜一区二区三区| 欧美一级高清大全免费观看| 麻豆精品视频在线| 国产性天天综合网| 99精品国产视频| 性做久久久久久| 精品少妇一区二区三区在线播放| 国产一区视频导航| 精品一区二区三区免费毛片爱| 精品国产伦理网| 99久久综合精品| 亚洲二区视频在线| 欧美不卡123| 91伊人久久大香线蕉| 亚洲成人一区二区| 久久久久久久网| 色视频欧美一区二区三区| 日韩精彩视频在线观看| 久久亚洲精品国产精品紫薇| 91麻豆国产香蕉久久精品| 亚洲www啪成人一区二区麻豆| 日韩视频免费观看高清完整版 | 久久精品免视看| eeuss鲁一区二区三区| 亚洲成人av免费| 久久久久成人黄色影片| 欧美网站大全在线观看| 国产精品一卡二卡在线观看| 亚洲欧美另类久久久精品| 欧美va亚洲va国产综合| thepron国产精品| 麻豆国产精品官网| 狠狠色综合播放一区二区| 亚洲欧美日韩在线| 精品区一区二区| 欧美日韩视频在线一区二区| 国产一区 二区 三区一级| 亚洲综合图片区| 欧美韩国一区二区| 日韩一区二区免费高清| 色悠悠久久综合| 韩日av一区二区| 日韩激情在线观看| 亚洲一区二区三区四区五区中文 | 国产精品456露脸| 午夜精品福利视频网站| 亚洲日本一区二区三区| 久久影院电视剧免费观看| 制服丝袜亚洲色图| 欧美影院一区二区三区| 99久久精品国产毛片| 国产一区二区三区美女| 偷拍亚洲欧洲综合| 一二三四社区欧美黄| 国产精品乱码妇女bbbb| 久久久久综合网| 91麻豆精品国产91久久久使用方法| 97成人超碰视| 成人av资源网站| 成人黄色电影在线| 激情亚洲综合在线| 麻豆精品在线视频| 免费高清成人在线| 蜜桃91丨九色丨蝌蚪91桃色| 午夜久久久久久久久| 亚洲3atv精品一区二区三区| 亚洲一区二区在线视频| 亚洲国产日韩一级| 亚洲成人免费在线观看| 依依成人精品视频| 夜夜爽夜夜爽精品视频| 亚洲欧洲精品一区二区三区| 中文字幕高清不卡| 国产精品二区一区二区aⅴ污介绍| 国产欧美精品日韩区二区麻豆天美| 久久网站热最新地址| 国产欧美精品区一区二区三区| 欧美国产一区二区| 国产精品美女久久久久久久久久久| 国产精品入口麻豆九色| 亚洲精品中文在线| 亚洲网友自拍偷拍| 日本aⅴ免费视频一区二区三区| 成人99免费视频| thepron国产精品| 欧美性色aⅴ视频一区日韩精品| 色婷婷亚洲精品| 欧美人xxxx| 久久综合色婷婷| 欧美韩国日本不卡| 亚洲毛片av在线| 天天亚洲美女在线视频| 国内精品国产三级国产a久久| 国产91在线观看| 欧亚一区二区三区| 精品理论电影在线观看 | 欧美在线免费播放| 欧美老肥妇做.爰bbww视频| 欧美一区二区三区系列电影| 精品捆绑美女sm三区| 欧美激情一区三区| 亚洲一区在线视频| 裸体一区二区三区| av男人天堂一区| 欧美日韩成人激情| 久久久久97国产精华液好用吗| √…a在线天堂一区| 香蕉影视欧美成人| 成人性视频免费网站| 欧美三级中文字幕| 亚洲国产精品激情在线观看 | 亚洲超碰精品一区二区| 精品一区免费av| 色噜噜偷拍精品综合在线| 欧美一区二区三区免费大片| 国产精品久久久一本精品| 日韩精品亚洲专区| 91在线高清观看| 久久久影院官网| 性感美女久久精品| 99国产精品久久久久久久久久久| 日韩一区二区免费在线电影| 亚洲欧美日韩国产中文在线| 九色综合狠狠综合久久| 色视频一区二区| 欧美国产精品专区| 久久精品国产**网站演员| 色欲综合视频天天天| 欧美激情一区二区三区蜜桃视频 | 欧美a一区二区| 色综合久久天天综合网| 久久久蜜桃精品| 麻豆国产欧美一区二区三区| 在线观看视频一区| 中文字幕一区二区视频| 久久99国产精品免费| 欧美日韩精品一区二区| 亚洲欧洲成人av每日更新| 韩国中文字幕2020精品| 日韩午夜av电影| 婷婷综合另类小说色区| 色屁屁一区二区| 亚洲同性gay激情无套| 国产91清纯白嫩初高中在线观看 | 在线亚洲一区二区| 亚洲国产岛国毛片在线| 国内精品不卡在线| 精品久久一区二区| 麻豆国产欧美日韩综合精品二区| 欧美日韩国产首页| 亚洲一区二区三区四区在线免费观看| 99久久精品一区二区| 国产精品丝袜久久久久久app| 国产麻豆精品在线观看| 久久人人爽人人爽| 国产精品亚洲第一区在线暖暖韩国 | 国产精品乱码妇女bbbb| 国产福利电影一区二区三区| 精品久久人人做人人爰| 日本一区中文字幕| 欧美人动与zoxxxx乱| 午夜欧美视频在线观看| 欧美群妇大交群的观看方式| 午夜精品在线视频一区| 在线播放中文字幕一区| 日韩av成人高清| 日韩限制级电影在线观看| 麻豆精品国产传媒mv男同| 久久久久亚洲综合| 成人免费高清在线观看| 国产精品电影院| 91理论电影在线观看| 一区二区成人在线| 欧美视频一区在线| 日本不卡在线视频| 精品久久久久久综合日本欧美| 国产毛片精品视频| 国产精品免费aⅴ片在线观看| 99re66热这里只有精品3直播 | www.66久久| 亚洲综合成人在线| 91麻豆精品国产| 国产一区二区女| 亚洲天天做日日做天天谢日日欢 | 亚洲综合一区二区精品导航| 欧美色窝79yyyycom| 蜜臀久久99精品久久久画质超高清| 日韩午夜av一区| 成人av一区二区三区| 亚洲午夜久久久| 欧美大片在线观看| proumb性欧美在线观看|