Compile GDB for ARM Linux

Source: Internet
Author: User

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)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.