男友报备:关于Debug

来源:百度文库 编辑:高考问答 时间:2024/04/25 06:06:31
我想请问一下Debug到底是什么东西?
具体怎么用?
谢谢了
想要详细的解释
谢谢

Debug 英文词,程序查错的意思。bug原意是小虫,例如跳蚤,虱子,苍蝇等,Debug就是找小虫,消灭它。

Debug有很多方法。

自己手工查错,例如加入许多打印语句,进行执行线路跟踪,找到出错地点,假设输入变量值的范围变化,看哪里溢出。也叫Debug。

VC++里有VC++的Debug,执行线路跟踪,变量变化跟踪,内存变化跟踪。在Visual Studio控制下,Build->Start Debug下有各种查错方法可用。

DOS里有Debug, 在DOS窗打命令Debug启动Debug,拍入问号,你可以得到详细的Debug用法:
Runs Debug, a program testing and editing tool.
DEBUG [[drive:][path]filename [testfile-parameters]]
[drive:][path]filename Specifies the file you want to test.
testfile-parameters Specifies command-line information required by
the file you want to test.
assemble A [address]
compare C range address
dump D [range]
enter E address [list]
fill F range list
go G [=address] [addresses]
hex H value1 value2
input I port
load L [address] [drive] [firstsector] [number]
move M range address
name N [pathname] [arglist]
output O port byte
proceed P [=address] [number]
quit Q
register R [register]
search S range list
trace T [=address] [value]
unassemble U [range]
write W [address] [drive] [firstsector] [number]
allocate expanded memory XA [#pages]
deallocate expanded memory XD [handle]
map expanded memory pages XM [Lpage] [Ppage] [handle]
display expanded memory status XS

不同机种有不同的debug.

“详细的解释”要看是那个Debug软件,自己查书或Debug自带的帮助文件或说明。

软件的调试。