[kgtp] r1571 committed - Update doc

  • From: kgtp@xxxxxxxxxxxxxx
  • To: kgtp@xxxxxxxxxxxxx
  • Date: Tue, 28 May 2013 11:04:36 +0000

Revision: 1571
Author:   teawater
Date:     Tue May 28 04:04:19 2013
Log:      Update doc

http://code.google.com/p/kgtp/source/detail?r=1571

Modified:
 /wiki/HOWTO.wiki
 /wiki/HOWTOCN.wiki

=======================================
--- /wiki/HOWTO.wiki    Wed May  8 06:33:24 2013
+++ /wiki/HOWTO.wiki    Tue May 28 04:04:19 2013
@@ -1,5 +1,5 @@
 #labels Phase-QA,Phase-Deploy
-Update in 2013-05-08
+Update in 2013-05-28
 <wiki:toc max_depth="4" />
 = What is KGTP =
*KGTP* is a *flexible* , *lightweight* and *realtime* Linux *debugger* and *tracer*.<br>
@@ -23,7 +23,7 @@
 = Table of different between GDB debug normal program and KGTP =
This table is for the people that have experience using GDB debug normal program. It will help you understand and remember the function of KGTP. || *Function* || *GDB debug normal program* || *GDB control KGTP debug Linux kernel* || -|| Preparatory work || Have a GDB installed in your system.<br>Program built with "-g". || KGTP need GDB 7.3 or newer version because it use some new functions of GDB. If your system doesn't supply it,you can get new version GDB built with "-static" that can running is most of Linux system in [http://code.google.com/p/gdbt/] and you can get an introduce about howto built new GDB step by step in there.<br>You alse need do some preparatory work with Linux kernel and KGTP. Please goto [HOWTO#Preparatory_work_before_use_KGTP] get howto do it. || +|| Preparatory work || Have a GDB installed in your system.<br>Program built with "-g". || KGTP need GDB 7.6 or newer version because it use some new functions of GDB. If your system doesn't supply it,you can get new version GDB in [http://code.google.com/p/gdbt/] and you can get an introduce about howto built new GDB step by step in there.<br>You alse need do some preparatory work with Linux kernel and KGTP. Please goto [HOWTO#Preparatory_work_before_use_KGTP] get howto do it. || || Attach || Use command "gdb -p pid" or GDB command "attach pid" can attach a program that running in the system. || Need insmod gtp.ko first, see [#Exec_it].<br>Then let GDB connect to KGTP, see [#Make_GDB_connect_to_gtp].<br>Please *note* that after GDB connect to KGTP, Linux kernel will not stop. || || Breakpoints || GDB command "b place_will_stop", let program execute after this command. Then programe will stop in the place that setup a breakpoint. || KGTP doesn't support breakpoints but it support tracepoints. Tracepoints can be considered as a special kind of breakpoints. It can be setup in some place of Linux kernel and define some commands that you want to do in its actions. When tracepoints start, they will execute these commands when Linux kernel execute to these place. When tracepoint stop, you can use some GDB commands parse the data that get by tracepoints like what you do when program stop by breakpoints. *Difference* is breakpoints will stop the program But the tracepoints of KGTP not. Please goto [#GDB_tracepoint] get howto use it. || || Memory read || After GDB stop the program(maybe doesn't need), it can read memory of program with GDB command "print", "x" and so on. || You can set special actions to collect memory to traceframe in tracepoints, and get the its value when tracepoint stop.[#collect_expr1,_expr2,_...] [#Use_tfind_select_the_entry_inside_the_trace_frame_info] <br>Or you can read memory directly when Linux kernel or program is running.[#Direct_access_the_current_value_in_normal_mode] ||
@@ -306,8 +306,8 @@
* *gtp_older_to_2.6.19.patch* is the patch for Linux kernel 2.6.19 and older version.

 == Install GDB for KGTP ==
-The GDB that older than 7.3 have some bugs of tracepoint. And some functions of GDB are not very well.<br> -So if your GDB is older than 7.3 please go to [https://code.google.com/p/gdbt/] to get howto install GDB for KGTP.<br> +The GDB that older than 7.6 have some bugs of tracepoint. And some functions of GDB are not very well.<br> +So if your GDB is older than 7.6 please go to [https://code.google.com/p/gdbt/] to get howto install GDB for KGTP. It supplies sources of UBUBTU, CentOS, Fedora, Mandriva, RHEL, SLE, openSUSE. Also have static binary for others.<br> If you have issue about GDB please get help according to [HOWTO#Report_issues_about_KGTP].

 = Howto use =
=======================================
--- /wiki/HOWTOCN.wiki  Wed May  8 06:36:28 2013
+++ /wiki/HOWTOCN.wiki  Tue May 28 04:04:19 2013
@@ -1,5 +1,5 @@
 #labels Phase-QA,Phase-Deploy
-Update in 2013-05-08
+Update in 2013-05-28
 <wiki:toc max_depth="4" />
 = 什么是KGTP =
 *KGTP* 是一个 *灵活* *轻量级* *实时* Linux *调试器* 和 *跟踪器* 。<br>
@@ -23,7 +23,7 @@
 = GDB调试普通程序和KGTP的区别表 =
 这个表是给在使用过GDB调试程序的人准备的,他可以帮助你理解和记住KGTP的功能。
 || *功能* || *GDB调试普通程序* || *GDB控制KGTP调试Linux内核* ||
-|| 准备工作 || 系统里安装了GDB。<br>程序用 "-g"选项编译。 || 因为使用了一些 GDB中的新功能,所以KGTP需要和GDB 7.3或者更新的版本。如果你的系统不提供这么新 版本的GDB,你可以到[http://code.google.com/p/gdbt/]取得新版本GDB的静态编译版 本,它可以在大部分Linux上使用。同时你可以在这里取得一步一步编译新版本GDB的介 绍。<br>你还需要做一些Linux内核和KGTP的准备工作,请到 [http://code.google.com/p/kgtp/wiki/HOWTOCN#使用KGTP前的准备工作] 取得如果做 的介绍。 || +|| 准备工作 || 系统里安装了GDB。<br>程序用 "-g"选项编译。 || 因为使用了一些 GDB中的新功能,所以KGTP需要和GDB 7.6或者更新的版本。如果你的系统不提供这么新 版本的GDB,你可以到[http://code.google.com/p/gdbt/]取得新版本GDB。同时你可以 在这里取得一步一步编译新版本GDB的介绍。<br>你还需要做一些Linux内核和KGTP的准 备工作,请到 [http://code.google.com/p/kgtp/wiki/HOWTOCN#使用KGTP前的准备工 作] 取得如果做的介绍。 || || Attach || 使用命令"gdb -p pid"或者GDB命令"attach pid"可以attach系统中的 某个程序. || 需要先insmod gtp.ko,请看 [https://code.google.com/p/kgtp/wiki/HOWTOCN#执行]。<br>然后让GDB连接KGTP,请 看[https://code.google.com/p/kgtp/wiki/HOWTOCN#让GDB连接到KGTP]。<br>请 *注 意* GDB连接到KGTP以后,Linux内核不会停止。|| || Breakpoints || GDB命令"b place_will_stop",让程序在执行这个命令后执 行,则程序将停止在设置这个断点的地方。|| KGTP不支持断点但是支持tracepoint。 Tracepoints可以被看作一种特殊的断点。其可以设置在Linux kernel中的一些地方然 后定义一些命令到它的action中。当tracepoint开始的时候,他们将会在内核执行到这 些地方的时候执行这些命令。当tracepoint停止的时候,你可以像断点停止程序后你做 的那样用GDB命令分析tracepoint得到的数据。 *区别* 是断点会停止程序但是KGTP中 的tracepoint不会。 请到 [https://code.google.com/p/kgtp/wiki/HOWTOCN#GDB_tracepoint] 看如何使用它。 || || 读Memory || GDB停止程序后(也许不需要),它可以用GDB命令"print"或者"x"等应 用程序的内存。 || 你可以在tracepoint中设置特殊的action收集内存到 traceframe中,在tracepoint停止后取得他们的值。 [https://code.google.com/p/kgtp/wiki/HOWTOCN#collect_expr1,_expr2,_...] [http://code.google.com/p/kgtp/wiki/HOWTOCN#用tfind选择trace帧缓存里面的条目 ] <br>或者你可以在内核或者应用程序执行的时候直接读他们的内存。 [https://code.google.com/p/kgtp/wiki/HOWTOCN#在普通模式直接访问当前值] ||
@@ -305,8 +305,8 @@
* *gtp_older_to_2.6.19.patch* 是给Linux kernel 2.6.19以及更早版本的 patch。

 == 安装可以和KGTP一起使用的GDB ==
-早于7.3版本的GDB的tracepoint功能有一些bug,而且还有一些功能做的不是很好。 <br> -所以如果你的GDB小于7.3请到 [https://code.google.com/p/gdbt/] 去安装可以和 KGTP一起使用的GDB。 +早于7.6版本的GDB的tracepoint功能有一些bug,而且还有一些功能做的不是很好。 <br> +所以如果你的GDB小于7.6请到 [https://code.google.com/p/gdbt/] 去安装可以和 KGTP一起使用的GDB。这里提供UBUBTU, CentOS, Fedora, Mandriva, RHEL, SLE, openSUSE源。其他系统还可以下载静态编译版本。<br> 如果你有GDB的问题,请根据这里的信息 [http://code.google.com/p/kgtp/wiki/HOWTOCN#需要帮助或者汇报问题]取得帮助。

 = 如何使用 =

Other related posts:

  • » [kgtp] r1571 committed - Update doc - kgtp