Download the source code of GDB 7.3.1 from http://www.gnu.org/software/gdb.
Copy to Linux virtual machine, decompress to gdb-7.3.1 directory, enter this directory
[Root @ localhost gdb-7.3.1] #./configure -- Host = arm-Linux -- target = arm-Linux
Bytes -------------------------------------------------------------------------------------
Make has the following error prompt:
Checking for library containing waddstr... no
Configure: Warning: no enhanced curses library found; disabling tui
Checking for library containing tgetent... no
Configure: Error: No termcap library found
Make [1]: *** [configure-GDB] Error 1
Make [1]: Leaving directory '/GDB/gdb-7.3.1'
Make: *** [all] Error 2
[Root @ localhost gdb-7.3.1] #
Bytes -------------------------------------------------------------------------------------
Download termcap from GNU. The latest version is 1.3.1 2002-02-25.
Use the following commands to generate Lib:
Arm-Linux-gcc-C-dhave_string_h = 1-dhave_unistd_h = 1-dstdc_headers = 1-dtermcap_file = \ "/etc/termcap \"-I. -I. -G termcap. c
Arm-Linux-gcc-C-dhave_string_h = 1-dhave_unistd_h = 1-dstdc_headers = 1-dtermcap_file = \ "/etc/termcap \"-I. -I. -G tparam. c
Arm-Linux-gcc-C-dhave_string_h = 1-dhave_unistd_h = 1-dstdc_headers = 1-dtermcap_file = \ "/etc/termcap \"-I. -I. -G version. c
Arm-Linux-ar RC libtermcap. A termcap. O tparam. o version. o
Copy the file to the lib directory of arm-linux. If you do not know the directory, use arm-Linux-gcc-print-search-dirs to display it:
[Root @ localhost termcap-1.3.1] # arm-Linux-gcc-print-search-dirs
Install:/usr/local/ARM/3.4.1/lib/GCC/ARM-Linux/3.4.1/
Programs: =/usr/local/ARM/3.4.1/libexec/GCC/ARM-Linux/3.4.1 /: /usr/local/ARM/3.4.1/libexec/GCC/ARM-Linux/3.4.1/:/usr/local/ARM/3.4.1/libexec/GCC/ARM-Linux /: /usr/local/ARM/3.4.1/lib/GCC/ARM-Linux/3.4.1/:/usr/local/ARM/3.4.1/lib/GCC/ARM-Linux /: /usr/libexec/GCC/ARM-Linux/3.4.1/:/usr/libexec/GCC/ARM-Linux/:/usr/lib/GCC/ARM-Linux/3.4.1 /: /usr/lib/GCC/ARM-Linux/:/usr/local/ARM/3.4.1/lib/GCC/ARM-Linux/3.4.1 /.. /.. /.. /.. /ARM-Linux/bin/ARM-Linux/3.4.1/:/usr/local/ARM/3.4.1/lib/GCC/ARM-Linux/3.4.1 /.. /.. /.. /.. /ARM-Linux/bin/
Libraries: =/usr/local/ARM/3.4.1/lib/GCC/ARM-Linux/3.4.1/:/usr/lib/GCC/ARM-Linux/3.4.1 /: /usr/local/ARM/3.4.1/lib/GCC/ARM-Linux/3.4.1 /.. /.. /.. /.. /ARM-Linux/lib/ARM-Linux/3.4.1/:/usr/local/ARM/3.4.1/lib/GCC/ARM-Linux/3.4.1 /.. /.. /.. /.. /ARM-Linux/lib/
[Root @ localhost termcap-1.3.1] #
Go to the gdb source code directory again and make will be successful.
Change the name of the generated Executable File GDB, such as arm-Linux-GDB.
Or copy it to the arm Board (you don't need to change the name)