1 / 27

Gzip 编译及调试

Gzip 编译及调试. Speaker: Lei Zhao ( 赵雷 ) Department of Computer Science & Technology University of Science & T echnology of China September 13, 2006. 一些概念及本文简称. IDE: Integrated Development Environment VC: Visual C++ 6.0 BC: Borland C++ 3.1 TC: Turbo C 2.0 各种软件根目录,一律简称 $ SOME _HOME

cathal
Télécharger la présentation

Gzip 编译及调试

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Gzip 编译及调试 Speaker: Lei Zhao (赵雷) Department of Computer Science & TechnologyUniversity of Science & Technology of China September 13, 2006

  2. 一些概念及本文简称 • IDE: Integrated Development Environment • VC: Visual C++ 6.0 • BC: Borland C++ 3.1 • TC: Turbo C 2.0 • 各种软件根目录,一律简称$SOME_HOME • 如$GZIP_HOME、$VC_HOME Gzip: Compilation and Debug

  3. 各编译器IDE用于Gzip源码 • VC • 编译通过,可直接运行,调试方便 • BC for DOS • 编译通过,不能直接运行,因此不能调试 • BC for Win • 编译通过,可直接运行,操作系统不支持16位调试器TDW • TC • 编译通过,可直接运行、调试,不支持鼠标 结论:推荐使用VC Gzip: Compilation and Debug

  4. 各种编译环境下Gzip的编译步骤 • VC IDE • BC IDE for DOS/Windows • TC IDE • VC/BC/TC命令行 Gzip: Compilation and Debug

  5. 各种编译环境下Gzip的编译步骤 • VC IDE • BC IDE for DOS/Windows • TC IDE • VC/BC/TC命令行 Gzip: Compilation and Debug

  6. VC IDE中Gzip编译步骤——建立工程 Gzip: Compilation and Debug

  7. VC IDE中Gzip编译步骤——建立工程 Gzip: Compilation and Debug

  8. VC IDE中Gzip编译步骤——添加源文件 Gzip: Compilation and Debug

  9. VC IDE中Gzip编译步骤——编译运行 Gzip: Compilation and Debug

  10. VC IDE中Gzip编译步骤——参数设置 Gzip: Compilation and Debug

  11. VC IDE中Gzip的调试 • 单步调试 • Ctrl+F10:执行到光标处 • F10:单步执行(不跟进函数调用) • F11:单步执行(跟进函数调用) Gzip: Compilation and Debug

  12. VC IDE中Gzip的调试 • 断点 • F9:设置/取消断点 • F5:执行到下一断点 Gzip: Compilation and Debug

  13. VC IDE中Gzip的调试 • 查看信息 • 变量 • 寄存器 • 内存 • 调用栈 Gzip: Compilation and Debug

  14. 各种编译环境下Gzip的编译步骤 • VC IDE • BC IDE for DOS/Windows • TC IDE • VC/BC/TC命令行 Gzip: Compilation and Debug

  15. BC IDE中Gzip编译步骤 • $BC_HOME\BIN目录下,BC.EXE/BCW.EXE分别是for DOS/Windows的版本 • 建议使用BCW.EXE Gzip: Compilation and Debug

  16. BC IDE中Gzip编译步骤——建立工程 • 打开工程->选择目录->输入名称->ok Gzip: Compilation and Debug

  17. BC IDE中Gzip编译步骤——添加源文件 • 只添加.c文件 Gzip: Compilation and Debug

  18. BC IDE中Gzip编译步骤——设置目录 • 头文件:$BC_HOME\INCLUDE • 库:$BC_HOME\LIB • 输出:存放.obj .exe .map文件 Gzip: Compilation and Debug

  19. BC IDE中Gzip编译步骤——编译运行 • Make or Build all • Arguments • Run Gzip: Compilation and Debug

  20. Gzip124 for BC 改变的源代码 • 拷贝$GZIP_HOME\msdos\tailor.c到$GZIP_HOME\目录下 • $GZIP_HOME\tailor.h 添加NO_ASM宏 Gzip: Compilation and Debug

  21. 各种编译环境下Gzip的编译步骤 • VC IDE • BC IDE for DOS/Windows • TC IDE • VC/BC/TC命令行 Gzip: Compilation and Debug

  22. TC IDE中Gzip编译步骤——设置工程 • File->Load • 打开$GZIP_HOME\GZIP_TC.PRJ • Project->Project name • 设置为GZIP_TC.PRJ • File->Change dir • 设置为$GZIP_HOME\ • Operation->Directories • 设置类似BC Gzip: Compilation and Debug

  23. TC IDE中Gzip编译步骤——编译运行 • F9:Make • Run->Run • Options->Arguments • 调试指令在Run中,与VC同名的指令作用也相同 Gzip: Compilation and Debug

  24. Gzip124 for TC 改变的源代码 • 所有文件由UNIX格式转为DOS格式 • $GZIP_HOME\tailor.h添加了NO_ASM宏 • $GZIP_HOME\msdos\gzip.prj删去了第16行的match.obj • 拷贝$GZIP_HOME\msdos\gzip.prj到$GZIP_HOME\下并更名为GZIP_TC.prj • $GZIP_HOME\目录下拷贝了$TC_HOME\目录下的WILDARGS.OBJ Gzip: Compilation and Debug

  25. 分别针对三个IDE的Gzip124下载地址 • ftp://pb0511:pb0511@202.38.79.124:221/gzip/ • Gzip124 for VC.rar • Gzip124 for BC.rar • Gzip124 for TC.rar Gzip: Compilation and Debug

  26. VC/BC/TC命令行 • 命令行的方式不推荐使用 • 请参见另一篇文档《gzip的命令行方式编译》 • 下载地址:ftp://pb0511:pb0511@202.38.79.124:221/gzip/ Gzip: Compilation and Debug

  27. Thanks! Gzip: Compilation and Debug

More Related