轻重缓急

成功来源于有效的自我管理。
随笔 - 14, 文章 - 3, 评论 - 3, 引用 - 0
数据加载中……

How to use the debug tool dbx under AIX system.

1. You must compile your binary objects with -g option firstly.
2. link your objects to a executable program.
3. dbx -I /home/path1  -I /home/path2 .....
    to specify all source code path, so that dbx can find the relevant source code and dispay it for you.

4.dbx shows a prompt:
   enter object file name (default is `a.out', ^D to exit):
   enter the program name.
5. now you can use below command to debug you program.

   stop at  43/*line number*/ /*set break point*/
   clear /*remove all break points*/
   cont /*continue the execution of the program*/
   next /*run to next line*/
   step /*step in*/
   run
   rerun
   print /*print the content of a variable*/
   file /*show current source file name, you can use the command to specify a new source file*/
   where /*show the function calling stack*/



 

posted on 2008-02-19 10:55 随遇而安 阅读(438) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理