Install Insight(GDB with nice GUI)

来源:互联网 发布:清除数据后照片还在吗 编辑:程序博客网 时间:2024/05/29 13:23
Install Insight(GDB with nice GUI)
Function: REMOTE DEBUG
Target: arm-linux-insight[pc] + gdbserver[board]
========================================================================
1.insight
> Install tk8.4 & export PATH
> Download insight-6.8 & uncompress
> cd insight-6.8
> vim tk/generic/tk.h [line563~line567:LASTEvent<->MappingNotify]
> vim tk/generic/tkBind.c [line586-line587:#ifdef GenericEvent
                                                                               /* GenericEvent */ 0,
                                                                          #endif]
> vim gdb/i386-linux-nat.c [add #include "i386-tdep.h"]
> ./configure --target=arm-linux --disable-werror
> make -j4
> sudo make install

2.gdbserver
> cd gdb/gdbserver
> ./configure --target=arm-linux --host=arm-linux
> make
> cp gdbserver /nfsroot [6410board rootfs]
========================================================================
Usage:
##############
> The configuration file .gdbtkinit(PATH:~/) contained a lot of usefull
infomations(hostname, port, baudrate, etc.) which can be modified.
> First Run gdbserver[board], then Run insight[pc].

Example:
Assume that app hello needs DEBUG. Do following steps:

board:
# ./gdbserver serverIP:port hello

pc:
$ cd /nfsroot
$ arm-linux-insight ./hello

> File->Target Setting
target: CHOOSE Remote/Tcp
Host name: boardIP
Port: 1000

> Run->Connect to target
------------
board info
------------
Remote debugging from host serverIP

> Debug step
> View->Console
-------------
(gdb) b main [set breakpoint]
-------------
>
-------------
(gdb) c [continue]
-------------

> Reset gdbserver and insight when DEBUG finished.

#######################个人笔记,出处已遗忘#########################