Insight is a GDB graphical user interface written by Tcl/Tk. It is written by engineers at Red Hat and Cygnus. Red Hat generously donated it to the public, and even provided manpower to continue to improve its functions from time to time. The Insight Project was launched in 1994 and has been quite mature so far. It can make full use of the powerful functions of most GDB.
The following are the installation steps: 1. First download insight 6.8-1 (version 6.8 is a little problematic) and decompress it. After decompression, do not delete the source file even after compilation, because insight still needs to use it. So I decompress it to the/OPT directory.
- # Tar xjvf insight-6.8-1.tar.bz2
2. compile.
- # Cd/opt/insight-6.8-1/
- #./Configure -- target = arm-Linux -- prefix =/usr/local
- # Make
- # Make install
The target option specifies that the target platform is arm-Linux, and the prefix option specifies that the installation path of the insight tool is/usr/local.
3. Compile the gdbserver paired with insight
- # Cdinsight-6.8-1/GDB/gdbserver
- #./Configure -- target = arm-Linux -- Host = arm-Linux
- # Make
Copy the compiled gdbserver to the root directory of your development board.
Now, compile and install insight. The following describes how to use it.
My Development Board is mini2440. nfs startup Development Board under Virtual Machine
Root directory of the Development Board:/opt/friendlyarm/mini2440/root_qtopia/
Development Board IP Address: 192.168.1.70
Linux host IP Address: 192.168.1.21
First, you need to prepare the program to be debugged. The following example uses the executable program Hello. Copy it to the root directory
The startup sequence is to first run the gdbserver of the development board, and then run insight
Development Board usage:
- # ../Gdbserver 192.168.1.21: 1000 hello
Note:
1. 192.168.1.21 is the IP address of the Linux host.
2. The colon is followed by the port number, which can be used as long as the two port numbers are the same.
3. Hello is the application you want to debug.
Linux host usage.
- # Cd/opt/friendlyarm/mini2440/root_qtopia/Note: you must first enter your root directory, that is, the directory where the debugging program is located.
- # Arm-Linux-insight./hello and then run insight
In this way, there are still many problems after the startup. First, set the port and connect to the Development Board.
1. After insight is started, select File> target setting.
Target select remote/tcp
Enter the IP address of the Development Board for host name: 192.168.1.70
Note that the port 1000 above must be consistent with the above
2. Click Run in the menu, select connect to target, and the connection will be successful. Alert on ARM development board
Remote debugging from host 192.168.1.21
3. Start debugging manually.
3. 1. Click the menu View> console to display a GDB command line screen, and enter B Main
This means to set a breakpoint at the main function.
3, 2, and then enter the letter C or continue in the command line, that is, continue to execute the program. (Because your program has been started on gdbserver. Only continue can be created on a Linux host)
4. Now you can get rid of the command line. You can debug it on the GUI.
5. At the end of debugging, You need to restart the Development Board to start gdbserver, and then start insight on the Linux host.
Related Articles:
Establishment of debugging environment for jlink + jlink gdb server + insight
Debug dvsdk demo-decode with insight