C/C ++ development and debugging tools in Linux

Source: Internet
Author: User
The Linux development environment is quite complete and has complete functions. It mainly consists of GNU compilers and libraries, as well as a large number of system routines and libraries, and supports C ++, C, and assembly language programs, the focus is on C ++ and C. Because the source code of Linux is mainly implemented in C language, developers can easily obtain, modify, and re-compile it. Therefore, it is vital to provide a powerful C language development environment for the Linux operating system. The Linux development environment includes the GNU compilation toolkit, debugging tools, and related utilities. 1. GNU compilation tool set GCC (1) CPP, C language Preprocessor. Responsible for macro development, Conditional compilation instructions, including other header files and row control functions. Calling a Preprocessor is the first step to create a binary executable program from the source code. (2) As, assembler. Creates a binary target file with the. O suffix based on the source file of the assembly language. (3) LD, linker. It is used to link the target file with the system target file and library file to create a binary executable program. 2. GNU debugging tool GDB is a powerful and widely used debugger. GDB can create programs with specific debugging information, so that you can set breakpoints in the Code and execute the code in a single step at runtime. Common commands in GDB include list (column source code), break (Set breakpoint), run (Execution Program), next (execute next line), and step (execute one line in one step ), print (display expression), continue (continue to execute to the next breakpoint or end), Info (display debugger status information), show (display program information ), backtrace (display call track, same as where, info stack. 3. Utility set binutils (1) Ar, archive various programs, create, modify and Extract files from code archive. (2) nm, used to list symbols in the target file. (3) objcopy, used to copy and convert the target file. (4) objdump is used to display the binary file content. (5) ranlib, which generates an index for the content of the archive file. (6) Size: list the total size of the target file and the size of each segment. (7) strings: List printable strings in the file. (8) strip, clear the symbols of the file. (9) readelf: displays information about the ELF format in the file. (10) strace, used to track system calls of program execution and received signals. (Aiguille. Liu/Liu aigui aigui.liu@gmail.com)

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.