Installing and Using Red Hat Developer Toolset
Edition 0
Legal Notice
Abstract
- Preface
- I. Introduction
- II. Integrated Development Environments
- III. Development Tools
- IV. Revision Control Systems
- V. Debugging Tools
- VI. Performance Monitoring Tools
- VII. Getting Help
- A. Changes in Version 2.1
- B. Changes in Version 2.0
- C. Revision History
- Index
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F2 to switch to a virtual terminal.
mono-spaced bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose → → from the main menu bar to launch Mouse Preferences. In the Buttons tab, select the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose → → from the main menu bar. Next, choose → from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose → from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typesshat a shell prompt. If the remote machine isusername@domain.nameexample.comand your username on that machine is john, typessh john@example.com.Themount -o remountcommand remounts the named file system. For example, to remount thefile-system/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -qcommand. It will return a result as follows:package.package-version-release
Publican is a DocBook publishing system.
mono-spaced roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
mono-spaced roman but add syntax highlighting as follows:
static int kvm_vm_ioctl_deassign_device(struct kvm *kvm,
struct kvm_assigned_pci_dev *assigned_dev)
{
int r = 0;
struct kvm_assigned_dev_kernel *match;
mutex_lock(&kvm->lock);
match = kvm_find_assigned_dev(&kvm->arch.assigned_dev_head,
assigned_dev->assigned_dev_id);
if (!match) {
printk(KERN_INFO "%s: device hasn't been assigned before, "
"so cannot be deassigned\n", __func__);
r = -EINVAL;
goto out;
}
kvm_deassign_device(kvm, match);
kvm_free_assigned_device(kvm, match);
out:
mutex_unlock(&kvm->lock);
return r;
}Note
Important
Warning
- search or browse through a knowledgebase of technical support articles about Red Hat products.
- submit a support case to Red Hat Global Support Services (GSS).
- access other product documentation.
Table of Contents
Table 1.1. Red Hat Developer Toolset Components
| Name | Version | Platforms | Description |
|---|---|---|---|
| Eclipse | 4.3.1 | Red Hat Enterprise Linux 6 | An integrated development environment for the graphical user interface.[a] |
| GCC | 4.8.2 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A portable compiler suite with support for C, C++, and Fortran. |
| binutils | 2.23.52 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A collection of binary tools and other utilities to inspect and manipulate object files and binaries. |
| elfutils | 0.157 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A collection of binary tools and other utilities to inspect and manipulate ELF files. |
| dwz | 0.11 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A tool to optimize DWARF debugging information contained in ELF shared libraries and ELF executables for size. |
| Git | 1.8.4 | Red Hat Enterprise Linux 6 | A distributed revision control system with a peer-to-peer architecture. |
| GDB | 7.6.1 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A command line debugger for programs written in C, C++, and Fortran. |
| strace | 4.7 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A debugging tool to monitor system calls that a program uses and signals it receives. |
| memstomp | 0.1.4 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A debugging tool to identify calls to library functions with overlapping memory regions that are not allowed by various standards. |
| SystemTap | 2.1 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A tracing and probing tool to monitor the activities of the entire system without the need to instrument, recompile, install, and reboot. |
| Valgrind | 3.8.1 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | An instrumentation framework and a number of tools to profile applications in order to detect memory errors, identify memory management problems, and report any use of improper arguments in system calls. |
| OProfile | 0.9.8 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A system-wide profiler that uses the performance monitoring hardware on the processor to retrieve information about the kernel and executables on the system. |
| Dyninst | 8.0 | Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6 | A library for instrumenting and working with user-space executables during their execution. |
[a]
If you intend to develop applications for Red Hat JBoss Middleware or require support for OpenShift Tools, it is recommended that you use Red Hat JBoss Developer Studio.
| |||
- Red Hat Developer Toolset can be used on multiple major and minor releases of Red Hat Enterprise Linux, as detailed in Section 1.3, “Compatibility”.
Important
/opt directory and is explicitly enabled by the user on demand using the supplied scl utility.
- A new register allocator (LRA) has been added, improving code performance.
- A fast memory error detector called AddressSanitizer has been added.
- A fast data race detector called ThreadSanitizer has been added.
- Extremely large functions can now be compiled faster using less memory.
- A new
generaloptimization level has been introduced. - GCC diagnostic messages now highlight the exact problem in the source code.
- Various new optimization options have been added.
- DWARF4 is now used as the default debug format.
- GCC now fully implements the C++11 language standard.
- C++11 library support has been extended though is still experimental.
- GCC now supports dynamic initialization of thread-local variables.
- Support has been added for Intel
FXSR,XSAVE, andXSAVEOPTinstructions. - New built-in functions added to detect run-time Intel CPU Type and ISA.
- Intel function multi-versioning support added.
- Intel
RTM/HLEintrinsics, built-ins, and code generation have been added. - Transactions (the
-fgnu-tmoption) can now be run using IntelTSXextensions. - Support for AMD family 15h and 16h processors has been added.
- Various Fortran changes have been included.
- Improved and expanded support for Python scripting.
- Improved handling of C++ debugee executables.
- Improved inferior control commands.
- Improved support for ambiguous line specifications.
- Improved tracepoint support.
- Multi-program debugging.
- The new
goldlinker, which is smaller and faster thanld. Note thatgoldis not the default linker and must be explicitly enabled by using thealternativescommand. - Support for link-time optimization (LTO) in conjunction with GCC.
- Support for build-IDs, unique numbers to identify executables.
- Support for the
IFUNCandUNIQUEsymbols that are used byglibcto improve performance. Due to dependencies on a particular version of theglibclibrary, these symbols are only available on Red Hat Enterprise Linux 6. - Compressed debug sections for smaller debug info files.
Important
Table 1.2. Subscriptions That Provide Red Hat Developer Toolset
| SKU | Subscription Name |
|---|---|
| RH2282403 | Red Hat Enterprise Linux Developer Support, Professional |
| RH2264664 | Red Hat Enterprise Linux Developer Support, Enterprise |
| RH2262474 | Red Hat Enterprise Linux Developer Suite |
| RH3482727 | Red Hat Enterprise Linux Developer Workstation, Professional |
| RH3413336 | Red Hat Enterprise Linux Developer Workstation, Enterprise |
| RH3414706 | 30 day Self-Supported Red Hat Enterprise Linux Developer Workstation Evaluation |
| RH3474212 | 60 day Supported Red Hat Enterprise Linux Developer Workstation Evaluation |
| RH3437268 | 90 day Supported Red Hat Enterprise Linux Developer Workstation Evaluation |
| SER0402 | 1-year Unsupported Partner Evaluation Red Hat Enterprise Linux |
| SER0403 | 1-year Unsupported Red Hat Advanced Partner Subscription |
- Determine the exact name of the Red Hat Developer Toolset channel. To do so, type the following at a shell prompt as
rootto display a list of all channels that are available to you:rhn-channel --available-channelsThe name of the channel depends on the specific version of Red Hat Enterprise Linux you are using and is in the following format:rhel-
architecture-variant-dts2-versionIn addition, certain packages such as devtoolset-2-git or devtoolset-2-gcc-plugin-devel depend on packages that are only available in the Optional channel. The name of this channel uses the following format:rhel-
architecture-variant-optional-versionReplacearchitecturewith the system's CPU architecture (x86_64ori386),variantwith the Red Hat Enterprise Linux system variant (serverorworkstation), andversionwith the Red Hat Enterprise Linux system version (5or6). - Subscribe the system to the channels from Step 1 by running the following command as
root:rhn-channel --add --channel=channel_nameReplacechannel_namewith the name of the channel to enable. - To verify the list of channels you are subscribed to, at any time, run as
root:rhn-channel --list
- Determine the pool ID of a subscription that provides Red Hat Developer Toolset. To do so, type the following at a shell prompt as
rootto display a list of all subscriptions that are available for your system:subscription-manager list --availableFor each available subscription, this command displays its name, unique identifier, expiration date, and other details related to your subscription. The pool ID is listed on a line beginning withPool Id.For a complete list of subscriptions that provide access to Red Hat Developer Toolset, see Table 1.2, “Subscriptions That Provide Red Hat Developer Toolset”. - Attach the appropriate subscription to your system by running the following command as
root:subscription-manager subscribe --pool=pool_idReplacepool_idwith the pool ID you determined in the previous step. To verify the list of subscriptions your system has currently attached, at any time, run asroot:subscription-manager list --consumed - Determine the exact name of Red Hat Developer Toolset repositories. To do so, type the following at a shell prompt as
rootto retrieve repository metadata and to display a list of available Yum repositories:subscription-manager repos --listThe repository names depend on the specific version of Red Hat Enterprise Linux you are using, and are in the following format:rhel-
variant-dts2-version-rpms rhel-variant-dts2-version-debug-rpms rhel-variant-dts2-version-source-rpmsIn addition, certain packages such as devtoolset-2-git or devtoolset-2-gcc-plugin-devel depend on packages that are only available in the Optional channel. The repository names with these packages use the following format:rhel-
version-variant-optional-rpms rhel-version-variant-optional-debug-rpms rhel-version-variant-optional-source-rpmsReplacevariantwith the Red Hat Enterprise Linux system variant (serverorworkstation), andversionwith the Red Hat Enterprise Linux system version (5or6). - Enable the repositories from Step 3 by running the following command as
root:subscription-manager repos --enablerepositoryReplacerepositorywith the name of the repository to enable.
Important
root:
yum remove devtoolset-1.1-gcc-debuginfoImportant
root:
yum install devtoolset-2scl utility and other dependent packages to the system. Alternatively, you can choose to install only a selected package group as described in Section 1.5.2, “Installing Individual Package Groups”.
Table 1.3. Red Hat Developer Toolset Meta Packages
| Package Name | Description | Installed Components |
|---|---|---|
| devtoolset-2-ide | Integrated Development Environment | Eclipse |
| devtoolset-2-perftools | Performance monitoring tools | SystemTap, Valgrind, OProfile, Dyninst |
| devtoolset-2-toolchain | Development and debugging tools | GCC, GDB, binutils, elfutils, dwz, memstomp, strace |
| devtoolset-2-vc | Revision control systems | Git |
root:
yum install package_name...package_name with a space-separated list of meta packages you want to install. For example, to install only the Eclipse development environment and packages that depend on it, type as root:
~]# yum install devtoolset-2-ideyum list available devtoolset-2-\*root:
yum install package_name...package_name with a space-separated list of packages that you want to install. For example, to install the devtoolset-2-gdb-gdbserver and devtoolset-2-gdb-doc packages, type:
~]# yum install devtoolset-2-gdb-gdbserver devtoolset-2-gdb-docroot:
debuginfo-install package_name~]# debuginfo-install devtoolset-2-dwzrhel-variant-dts2-version-debug-rpms repository as described in Section 1.4.2, “Using Red Hat Subscription Management”. If your system is registered with RHN Classic, subscribe the system to the rhel-architecture-variant-version-debuginfo channel as described in Section 1.4.1, “Using RHN Classic”. For more information on how to get access to debuginfo packages, see https://access.redhat.com/site/solutions/9907.
root to update your Red Hat Enterprise Linux installation:
yum updatescl utility and other dependent packages.
Important
root:
yum remove devtoolset-2\*scl utility as well, type as root:
yum remove scl-utils\*Online Documentation
- Red Hat Subscription Management Guide — The Red Hat Subscription Management Guide provides detailed information on how to manage subscriptions on Red Hat Enterprise Linux.
- Red Hat Developer Toolset 2.1 Release Notes — The Release Notes for Red Hat Developer Toolset 2.1 contain more information about this product.
- Red Hat Enterprise Linux 6 Developer Guide — The Developer Guide for Red Hat Enterprise Linux 6 provides more information on the Eclipse IDE, libraries and runtime support, compiling and building, debugging, and profiling on this system.
- Red Hat Enterprise Linux 6 Installation Guide — The Installation Guide for Red Hat Enterprise Linux 6 explains how to obtain, install, and update the system.
- Red Hat Enterprise Linux 5 Installation Guide — The Installation Guide for Red Hat Enterprise Linux 5 explains how to obtain, install, and update the system.
- Red Hat Enterprise Linux 6 Deployment Guide — The Deployment Guide for Red Hat Enterprise Linux 6 documents relevant information regarding the deployment, configuration, and administration of Red Hat Enterprise Linux 6.
- Red Hat Enterprise Linux 5 Deployment Guide — The Deployment Guide for Red Hat Enterprise Linux 5 documents relevant information regarding the deployment, configuration, and administration of Red Hat Enterprise Linux 5.
See Also
- Appendix A, Changes in Version 2.1 provides a comprehensive list of changes and improvements over the Red Hat Enterprise Linux system versions of the GNU Compiler Collection, GNU Debugger, and binutils, as well as information about the language, ABI, and debugging compatibility.
Table of Contents
gcc or gdb) and Eclipse offer two distinct approaches to programming.
Table 2.1. Eclipse Components Included in Red Hat Developer Toolset
| Package | Description |
|---|---|
| devtoolset-2-eclipse-cdt | The C/C++ Development Tooling (CDT), which provides features and plug-ins for development in C and C++. |
| devtoolset-2-eclipse-emf | The Eclipse Modeling Framework (EMF), which allows you to build applications based on a structured data model. |
| devtoolset-2-eclipse-gef | The Graphical Editing Framework (GEF), which allows you to create a rich graphical editor from an existing application model. |
| devtoolset-2-eclipse-rse | The Remote System Explorer (RSE) framework, which allows you to work with remote systems from Eclipse. |
| devtoolset-2-eclipse-jgit | JGit, a Java implementation of the Git revision control system. |
| devtoolset-2-eclipse-egit | EGit, a team provider for Eclipse that provides features and plug-ins for interaction with Git repositories. |
| devtoolset-2-eclipse-mylyn | Mylyn, a task management system for Eclipse. |
| devtoolset-2-eclipse-linuxtools | A meta package for Linux-specific Eclipse plug-ins. |
| devtoolset-2-eclipse-changelog[a] | The ChangeLog plug-ins, which allows you to create and maintain changelog files. |
| devtoolset-2-eclipse-gcov[a] | The GCov plug-in, which integrates the GCov test coverage program with Eclipse. |
| devtoolset-2-eclipse-gprof[a] | The Gprof plug-in, which integrates the Gprof performance analysis utility with Eclipse. |
| devtoolset-2-eclipse-manpage[a] | The Man Page plug-in, which allows you to view manual pages in Eclipse. |
| devtoolset-2-eclipse-oprofile[a] | The OProfile plug-in, which integrates OProfile with Eclipse. |
| devtoolset-2-eclipse-perf[a] | The Perf plug-in, which integrates the perf tool with Eclipse. |
| devtoolset-2-eclipse-rpm-editor[a] | The Eclipse Spec File Editor, which allows you to maintain RPM spec files. |
| devtoolset-2-eclipse-rpmstubby[a] | The RPM Stubby plug-in, which allows you to generate RPM spec files. |
| devtoolset-2-eclipse-systemtap[a] | The SystemTap plug-in, which integrates SystemTap with Eclipse. |
| devtoolset-2-eclipse-valgrind[a] | The Valgrind plug-in, which integrates Valgrind with Eclipse. |
[a]
This package is installed as a dependency of devtoolset-2-eclipse-linuxtools.
| |
Note
- Install the java-1.7.0-openjdk package from Red Hat Enterprise Linux 6.3 or newer and all its dependencies.
- Download, build, and install the maven package and all its dependencies from the SRPM packages for Fedora 19.
- Download, build, and install the tycho package and all its dependencies from the SRPM packages for Fedora 19.
- Download and build all dependent packages listed in the devtoolset-2-eclipse SRPM package.
- Download and build the devtoolset-2-eclipse SRPM package.
- Download and build additional devtoolset-2-eclipse-* SRPM packages.
scl enable devtoolset-2 'eclipse'~/workspace/, which is the default option, or click the button to browse your file system and select a custom directory. Additionally, you can select the Use this as the default and do not ask again check box to prevent Eclipse from displaying this dialog box the next time you run this development environment. When you are done, click the button to confirm the selection and proceed with the startup.
Important
gcc, g++, and as.
root:
yum remove devtoolset-2-gcc\* devtoolset-2-binutils\*- In the C/C++ perspective, choose → from the main menu bar to open the project properties.
- In the menu on the left-hand side of the dialog box, click → .
- Select the Tool Settings tab.
- If you are working on a C project:
- select or and change the value of the Command field to:
/usr/bin/gcc
- select or and change the value of the Command field to:
/usr/bin/gcc
- select or and change the value of the Command field to:
/usr/bin/as
If you are working on a C++ project:- select or and change the value of the Command field to:
/usr/bin/g++
- select or and change the value of the Command field to:
/usr/bin/gcc
- select or and change the value of the Command field to:
/usr/bin/g++
- select or and change the value of the Command field to:
/usr/bin/as
- Click the button to save the configuration changes.
Installed Documentation
- Eclipse includes a built-in system which provides extensive documentation for each integrated feature and tool. This greatly decreases the initial time investment required for new developers to become fluent in its use. The use of this Help section is detailed in the Red Hat Enterprise Linux Developer Guide linked below.
Online Documentation
- Red Hat Enterprise Linux 6 Developer Guide — The Developer Guide for Red Hat Enterprise Linux 6 provides more information on Eclipse, including a description of the user interface, overview of available development toolkits, or instructions on how to use it to build RPM packages.
See Also
- Section A.1, “Changes in Eclipse” provides a comprehensive list of features and improvements over the Eclipse development environment included in Red Hat Enterprise Linux and the previous release of Red Hat Developer Toolset.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 3, GNU Compiler Collection (GCC) provides information on how to compile programs written in C, C++, and Fortran on the command line.
Table of Contents
Note
- On Red Hat Enterprise Linux 6, GCC uses the
STT_GNU_UNIQUEsymbol. On Red Hat Enterprise Linux 5, it does not. - On Red Hat Enterprise Linux 6, GCC uses the
-march=i686command line option by default. On Red Hat Enterprise Linux 5, it uses the-march=i586option. - On Red Hat Enterprise Linux 6, GCC uses the
-gdwarf-3command line option by default. On Red Hat Enterprise Linux 5, it uses the-gdwarf-2option. - The
-fgnu89-inlinecommand line option has different defaults on Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 5.
gcc compiler as follows:
scl enable devtoolset-2 'gcc -o output_file source_file...'output_file in the current working directory. If the -o option is omitted, the compiler creates a file named a.out by default.
scl enable devtoolset-2 'gcc -o object_file -c source_file'object_file. If the -o option is omitted, the compiler creates a file named after the source file with the .o file extension. To link object files together and create a binary file, run:
scl enable devtoolset-2 'gcc -o output_file object_file...'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset gcc as default:
scl enable devtoolset-2 'bash'Note
gcc you are using at any point, type the following at a shell prompt:
which gccgcc executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset gcc:
gcc -vImportant
Example 3.1. Compiling a C Program on the Command Line
hello.c with the following contents:
#include <stdio.h> int main(int argc, char *argv[]) { printf("Hello, World!\n"); return 0; }
gcc compiler from Red Hat Developer Toolset, type:
~]$ scl enable devtoolset-2 'gcc -o hello hello.c'hello in the current working directory.
gcc compiles a program, it creates an executable binary file. To run this program on the command line, change to the directory with the executable file and type:
./file_nameExample 3.2. Running a C Program on the Command Line
hello binary file as shown in Example 3.1, “Compiling a C Program on the Command Line”, you can run it by typing the following at a shell prompt:
~]$ ./hello
Hello, World!g++ compiler as follows:
scl enable devtoolset-2 'g++ -o output_file source_file...'output_file in the current working directory. If the -o option is omitted, the g++ compiler creates a file named a.out by default.
scl enable devtoolset-2 'g++ -o object_file -c source_file'object_file. If the -o option is omitted, the g++ compiler creates a file named after the source file with the .o file extension. To link object files together and create a binary file, run:
scl enable devtoolset-2 'g++ -o output_file object_file...'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset g++ as default:
scl enable devtoolset-2 'bash'Note
g++ you are using at any point, type the following at a shell prompt:
which g++g++ executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset g++:
g++ -vImportant
Example 3.3. Compiling a C++ Program on the Command Line
hello.cpp with the following contents:
#include <iostream> using namespace std; int main(int argc, char *argv[]) { cout << "Hello, World!" << endl; return 0; }
g++ compiler from Red Hat Developer Toolset, type:
~]$ scl enable devtoolset-2 'g++ -o hello hello.cpp'hello in the current working directory.
g++ compiles a program, it creates an executable binary file. To run this program on the command line, change to the directory with the executable file and type:
./file_nameExample 3.4. Running a C++ Program on the Command Line
hello binary file as shown in Example 3.3, “Compiling a C++ Program on the Command Line”, you can run it by typing the following at a shell prompt:
~]$ ./hello
Hello, World!gfortran compiler as follows:
scl enable devtoolset-2 'gfortran -o output_file source_file...'output_file in the current working directory. If the -o option is omitted, the compiler creates a file named a.out by default.
scl enable devtoolset-2 'gfortran -o object_file -c source_file'object_file. If the -o option is omitted, the compiler creates a file named after the source file with the .o file extension. To link object files together and create a binary file, run:
scl enable devtoolset-2 'gfortran -o output_file object_file...'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset gfortran as default:
scl enable devtoolset-2 'bash'Note
gfortran you are using at any point, type the following at a shell prompt:
which gfortrangfortran executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset gfortran:
gfortran -vImportant
Example 3.5. Compiling a Fortran Program on the Command Line
hello.f with the following contents:
program hello print *, "Hello, World!" end program hello
gfortran compiler from Red Hat Developer Toolset, type:
~]$ scl enable devtoolset-2 'gfortran -o hello hello.f'hello in the current working directory.
gfortran compiles a program, it creates an executable binary file. To run this program on the command line, change to the directory with the executable file and type:
./file_nameExample 3.6. Running a Fortran Program on the Command Line
hello binary file as shown in Example 3.5, “Compiling a Fortran Program on the Command Line”, you can run it by typing the following at a shell prompt:
~]$ ./hello
Hello, World!Installed Documentation
- gcc(1) — The manual page for the
gcccompiler provides detailed information on its usage; with few exceptions,g++accepts the same command line options asgcc. To display the manual page for the version included in Red Hat Developer Toolset, type:scl enable devtoolset-2 'man gcc' - gfortran(1) — The manual page for the
gfortrancompiler provides detailed information on its usage. To display the manual page for the version included in Red Hat Developer Toolset, type:scl enable devtoolset-2 'man gfortran' - C++ Standard Library Documentation — Documentation on the C++ standard library can be optionally installed by typing the following at a shell prompt as
root:yum install devtoolset-2-libstdc++-docsOnce installed, HTML documentation is available at/opt/rh/devtoolset-2/root/usr/share/doc/devtoolset-2-libstdc++-docs-4.8.2/html/index.html.
Online Documentation
- Red Hat Enterprise Linux 6 Developer Guide — The Developer Guide for Red Hat Enterprise Linux 6 provides in-depth information about GCC.
- Using the GNU Compiler Collection — The official GCC manual provides an in-depth description of the GNU compilers and their usage.
- The GNU C++ Library — The GNU C++ library documentation provides detailed information about the GNU implementation of the standard C++ library.
- The GNU Fortran Compiler — The GNU Fortran compiler documentation provides detailed information on
gfortran's usage.
See Also
- Section B.2, “Changes in GCC” provides a comprehensive list of features and improvements over the Red Hat Enterprise Linux system version of the GNU Compiler Collection and the version distributed in the previous release of Red Hat Developer Toolset, as well as information about the language, ABI, and debugging compatibility.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 2, Eclipse provides a general introduction to the Eclipse development environment, and describes how to use it with the tools from Red Hat Developer Toolset.
- Chapter 4, binutils explains how to use the binutils, a collection of binary tools to inspect and manipulate object files and binaries.
- Chapter 5, elfutils explains how to use elfutils, a collection of binary tools to inspect and manipulate ELF files.
- Chapter 6, dwz explains how to use dwz to optimize DWARF debugging information contained in ELF shared libraries and ELF executables for size.
- Chapter 8, GNU Debugger (GDB) provides information on how to debug programs written in C, C++, and Fortran.
gold linker, several new command line options, improvements to the linker script language, and support for link-time optimization, compressed debug sections, and new instruction sets. For a detailed list of changes, see Section B.3, “Changes in binutils”.
Table 4.1. Tools Included in binutils for Red Hat Developer Toolset
Note
as tool as follows:
scl enable devtoolset-2 'as [option...] -o object_file source_file'object_file in the current working directory.
scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset as as default:
scl enable devtoolset-2 'bash'Note
as you are using at any point, type the following at a shell prompt:
which asas executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset as:
as -vld tool as follows:
scl enable devtoolset-2 'ld [option...] -o output_file object_file...'output_file in the current working directory. If the -o option is omitted, the compiler creates a file named a.out by default.
scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset ld as default:
scl enable devtoolset-2 'bash'Note
ld you are using at any point, type the following at a shell prompt:
which ldld executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset ld:
ld -vscl enable devtoolset-2 'tool [option...] file_name'objdump tool to inspect an object file, type:
scl enable devtoolset-2 'objdump [option...] object_file'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset binary tools as default:
scl enable devtoolset-2 'bash'Note
which objdumpobjdump executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset objdump:
objdump -vInstalled Documentation
- as(1), ld(1), addr2line(1), ar(1), c++filt(1), dwp(1), elfedit(1), gprof(1), nm(1), objcopy(1), objdump(1), ranlib(1), readelf(1), size(1), strings(1), strip(1), — Manual pages for various binutils tools provide more information about their respective usage. To display a manual page for the version included in Red Hat Developer Toolset, type:
scl enable devtoolset-2 'mantool'
Online Documentation
- Documentation for binutils — The binutils documentation provides an in-depth description of the binary tools and their usage.
See Also
- Section B.3, “Changes in binutils” provides a comprehensive list of features and improvements over the Red Hat Enterprise Linux system version of binutils and the version distributed in the previous release of Red Hat Developer Toolset.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 5, elfutils explains how to use elfutils, a collection of binary tools to inspect and manipulate ELF files.
- Chapter 3, GNU Compiler Collection (GCC) provides information on how to compile programs written in C, C++, and Fortran.
eu-objdump, eu-readelf, and other utilities that allow you to inspect and manipulate ELF files. See Table 5.1, “Tools Included in elfutils for Red Hat Developer Toolset” for a complete list of binary tools that are distributed with the Red Hat Developer Toolset version of elfutils.
Table 5.1. Tools Included in elfutils for Red Hat Developer Toolset
Note
scl enable devtoolset-2 'tool [option...] file_name'eu-objdump tool to inspect an object file, type:
scl enable devtoolset-2 'eu-objdump [option...] object_file'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset binary tools as default:
scl enable devtoolset-2 'bash'Note
which eu-objdumpeu-objdump executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset eu-objdump:
eu-objdump -VSee Also
- Section A.3, “Changes in elfutils” provides a comprehensive list of features and improvements over the Red Hat Enterprise Linux system version of elfutils and the version distributed in the previous release of Red Hat Developer Toolset.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 3, GNU Compiler Collection (GCC) provides information on how to compile programs written in C, C++, and Fortran.
- Chapter 4, binutils explains how to use the binutils, a collection of binary tools to inspect and manipulate object files and binaries.
- Chapter 6, dwz explains how to use dwz to optimize DWARF debugging information contained in ELF shared libraries and ELF executables for size.
dwz replaces DWARF information representation with equivalent smaller representation where possible, and reduces the amount of duplication by using techniques from Appendix E of the DWARF Standard.
dwz utility is provided by the devtoolset-2-dwz package and is automatically installed with devtoolset-2-toolchain as described in Section 1.5, “Installing Red Hat Developer Toolset”.
Note
dwz tool as follows:
scl enable devtoolset-2 'dwz [option...] file_name'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset dwz as default:
scl enable devtoolset-2 'bash'Note
dwz you are using at any point, type the following at a shell prompt:
which dwzdwz executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset dwz:
dwz -vInstalled Documentation
- dwz(1) — The manual page for the
dwzutility provides detailed information on its usage. To display the manual page for the version included in Red Hat Developer Toolset, type:scl enable devtoolset-2 'man dwz'
See Also
- Section B.5, “Changes in dwz” provides a comprehensive list of features and enhancements over the version of
dwzdistributed in the previous release of Red Hat Developer Toolset. - Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 3, GNU Compiler Collection (GCC) provides information on how to compile programs written in C, C++, and Fortran.
- Chapter 4, binutils explains how to use the binutils, a collection of binary tools to inspect and manipulate object files and binaries.
- Chapter 5, elfutils explains how to use elfutils, a collection of binary tools to inspect and manipulate ELF files.
Table of Contents
Note
git commit require the user to write a short message or make some changes in an external text editor. To determine which text editor to start, Git attempts to read the value of the GIT_EDITOR environment variable, the core.editor configuration option, the VISUAL environment variable, and finally the EDITOR environment variable in this particular order. If none of these options and variables are specified, the git command starts vi as a reasonable default option.
core.editor configuration option in order to specify a different text editor, type the following at a shell prompt:
scl enable devtoolset-2 'git config --global core.editor command'command with the command to be used to start the selected text editor.
Example 7.1. Configuring the Default Text Editor
vim as the default text editor, type the following at a shell prompt:
~]$ scl enable devtoolset-2 'git config --global core.editor vim'scl enable devtoolset-2 'git config --global user.name "full name"'scl enable devtoolset-2 'git config --global user.email "email_address"'Example 7.2. Setting Up User Information
John Doe as your full name and john@example.com as your email address, type the following at a shell prompt:
~]$scl enable devtoolset-2 'git config --global user.name "John Doe"'~]$scl enable devtoolset-2 'git config --global user.email "john@example.com"'
Initializing an Empty Repository
scl enable devtoolset-2 'git init'.git in which all repository information is stored.
Importing Data to a Repository
scl enable devtoolset-2 'git add .'scl enable devtoolset-2 'git commit [-m "commit message"]'commit message with a short description of your revision. If you omit the -m option, this command allows you to write the commit message in an external text editor. For information on how to configure the default text editor, see Section 7.2.1, “Configuring the Default Text Editor”.
Cloning a Git Repository
scl enable devtoolset-2 'git clone git_repository [directory]'git_repository with a URL or a path to the Git repository you want to clone, and directory with a path to the directory in which you want to store the clone.
Cloning a Subversion Repository
scl enable devtoolset-2 'git svn clone svn_repository [directory]'svn_repository with a URL or a path to the Subversion repository you want to clone, and directory with a path to the directory in which you want to store the clone.
Cloning a CVS Repository
scl enable devtoolset-2 'git cvsimport -C directory cvs_module'cvs_module with the name of the subdirectory in which the project is stored, and directory with a path to the directory in which you want to store the clone.
Adding Files and Directories
scl enable devtoolset-2 'git add file...'file with the file or files you want to add. This command marks the selected file or files as ready to be added to the Git repository. Similarly, to add all files that are stored in a certain directory to a Git repository, type:
scl enable devtoolset-2 'git add directory...'directory with the directory or directories you want to add. This command marks all files in the selected directory or directories as ready to be added to the Git repository.
Renaming Files and Directories
scl enable devtoolset-2 'git mv old_name new_name'old_name with the current name of the file or directory and new_name with the new name. This command renames the selected file or directory and marks it as ready to be renamed in the Git repository.
Deleting Files and Directories
scl enable devtoolset-2 'git rm file...'file with the file or files you want to delete. This command deletes all selected files and marks them as ready to be deleted form the Git repository. Similarly, to delete all files that are stored in a certain directory from a Git repository, type:
scl enable devtoolset-2 'git rm -r directory...'directory with the directory or directories you want to delete. This command deletes all selected directories and marks them as ready to be deleted from the Git repository.
Viewing the Current Status
scl enable devtoolset-2 'git status'new file, renamed, deleted, or modified) and tells you which changes will be applied the next time you commit them. For information on how to commit your changes, see Section 7.3.5, “Committing Changes”.
Viewing Differences
scl enable devtoolset-2 'git diff'scl enable devtoolset-2 'git diff file...'file with the file or files you want to view.
scl enable devtoolset-2 'git commit [-m "commit message"]'commit message with a short description of your revision. This command commits all changes in files that are explicitly marked as ready to be committed. To commit changes in all files that are under revision control, add the -a command line option as follows:
scl enable devtoolset-2 'git commit -a [-m "commit message"]'-m option, the command allows you to write the commit message in an external text editor. For information on how to configure the default text editor, see Section 7.2.1, “Configuring the Default Text Editor”.
Pushing Changes to a Public Git Repository
scl enable devtoolset-2 'git push remote_repository'remote_repository with the name of the remote repository you want to push your changes to. Note that the repository from which you originally cloned your local copy is automatically named origin.
Creating Patches from Individual Commits
scl enable devtoolset-2 'git format-patch remote_repository'remote_repository with the name of the remote repository from which you made your local copy. This creates a patch for each commit that is not present in this remote repository.
scl enable devtoolset-2 'git fetch remote_repository'remote_repository with the name of the remote repository. This command fetches information about the current status of the remote repository, allowing you to review these changes before applying them to your local copy. To proceed and merge these changes with what you have in your local Git repository, type:
scl enable devtoolset-2 'git merge remote_repository'scl enable devtoolset-2 'git pull remote_repository'Installed Documentation
- gittutorial(7) — The manual page named gittutorial provides a brief introduction to Git and its usage. To display the manual page for the version of Git included in Red Hat Developer Toolset, type:
scl enable devtoolset-2 'man gittutorial' - gittutorial-2(7) — The manual page named gittutorial-2 provides the second part of a brief introduction to Git and its usage. To display the manual page for the version of Git included in Red Hat Developer Toolset, type:
scl enable devtoolset-2 'man gittutorial-2' - Git User's Manual — HTML documentation for Git is located at
/opt/rh/devtoolset-2/root/usr/share/doc/devtoolset-2-git-1.8.4/user-manual.html.
Online Documentation
- Red Hat Enterprise Linux 6 Developer Guide — The Developer Guide for Red Hat Enterprise Linux 6 provides more information about Git and revision control systems in general.
- Pro Git — The online version of the Pro Git book provides a detailed description of Git, its concepts and its usage.
See Also
- Section A.4, “Changes in Git” provides a comprehensive list of features and improvements over the Red Hat Enterprise Linux system version of Git.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
Table of Contents
Note
Compiling Programs with Debugging Information
gcc compiler is run with the -g option. To do so on the command line, use a command in the following form:
scl enable devtoolset-2 'gcc -g -o output_file input_file...'scl enable devtoolset-2 'g++ -g -o output_file input_file...'Example 8.1. Compiling a C Program With Debugging Information
fibonacci.c that has the following contents:
#include <stdio.h> #include <limits.h> int main (int argc, char *argv[]) { unsigned long int a = 0; unsigned long int b = 1; unsigned long int sum; while (b < LONG_MAX) { printf("%ld ", b); sum = a + b; a = b; b = sum; } return 0; }
~]$ scl enable devtoolset-2 'gcc -g -o fibonacci fibonacci.c'fibonacci in the current working directory.
Installing Debugging Information for Existing Packages
root:
debuginfo-installpackage_name
debuginfo-install utility to be available on your system.
Example 8.2. Installing Debugging Information for the glibc Package
~]# debuginfo-install glibc
Loaded plugins: product-id, refresh-packagekit, subscription-manager
--> Running transaction check
---> Package glibc-debuginfo.x86_64 0:2.12-1.47.el6_2.5 will be installed
...scl enable devtoolset-2 'gdb file_name'gdb debugger in interactive mode and displays the default prompt, (gdb). To quit the debugging session and return to the shell prompt, run the following command at any time:
quitscl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset gdb as default:
scl enable devtoolset-2 'bash'Note
gdb you are using at any point, type the following at a shell prompt:
which gdbgdb executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset gdb:
gdb -vExample 8.3. Running the gdb Utility on the fibonacci Binary File
fibonacci binary file as shown in Example 8.1, “Compiling a C Program With Debugging Information”, you can start debugging it with gdb by typing the following at a shell prompt:
~]$ scl enable devtoolset-2 'gdb fibonacci'
GNU gdb (GDB) Red Hat Enterprise Linux (7.4.50.20120120-43.el6)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb)listgdb displays first ten lines of the source code and any subsequent use of this command lists another ten lines. Once you start the execution, gdb displays the lines that are surrounding the line on which the execution stops, typically when you set a breakpoint.
list[file_name:]line_number
list[file_name:]function_name
list command displays by running the following command:
setlistsizenumber
Example 8.4. Listing the Source Code of the fibonacci Binary File
fibonacci.c file listed in Example 8.1, “Compiling a C Program With Debugging Information” has exactly 17 lines. Assuming that you have compiled it with debugging information and you want the gdb utility to be capable of listing the entire source code, you can run the following command to change the number of listed lines to 20:
(gdb) set listsize 20list command with no additional arguments:
(gdb) list
1 #include <stdio.h>
2 #include <limits.h>
3
4 int main (int argc, char *argv[]) {
5 unsigned long int a = 0;
6 unsigned long int b = 1;
7 unsigned long int sum;
8
9 while (b < LONG_MAX) {
10 printf("%ld ", b);
11 sum = a + b;
12 a = b;
13 b = sum;
14 }
15
16 return 0;
17 }Setting a New Breakpoint
break[file_name:]line_number
break[file_name:]function_name
Example 8.5. Setting a New Breakpoint
fibonacci.c file listed in Example 8.1, “Compiling a C Program With Debugging Information” with debugging information, you can set a new breakpoint at line 10 by running the following command:
(gdb) break 10
Breakpoint 1 at 0x4004e5: file fibonacci.c, line 10.Listing Breakpoints
infobreakpoints
Example 8.6. Listing Breakpoints
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x00000000004004e5 in main at fibonacci.c:10Deleting Existing Breakpoints
clearline_number
clearfunction_name
clear command with no additional arguments:
clearExample 8.7. Deleting an Existing Breakpoint
fibonacci.c file listed in Example 8.1, “Compiling a C Program With Debugging Information” with debugging information, you can set a new breakpoint at line 7 by running the following command:
(gdb) break 7
Breakpoint 2 at 0x4004e3: file fibonacci.c, line 7.(gdb) clear 7
Deleted breakpoint 2runrun command:
runargument…
Example 8.8. Executing the fibonacci Binary File
fibonacci binary file by running the following command:
(gdb) run
Starting program: /home/john/fibonacci
Breakpoint 1, main (argc=1, argv=0x7fffffffe4d8) at fibonacci.c:10
10 printf("%ld ", b);gdb utility allows you to display the value of almost anything that is relevant to the program, from a variable of any complexity to a valid expression or even a library function. However, the most common task is to display the value of a variable.
variable_name
Example 8.9. Displaying the Current Values of Variables
fibonacci binary stopped after reaching the breakpoint at line 10, you can display the current values of variables a and b as follows:
(gdb)print a$1 = 0 (gdb)print b$2 = 1
continuecontinue command in the following form:
continuenumber
gdb utility also allows you to stop the execution after executing a single line of code. To do so, run:
stepstep command in the following form:
stepnumber
Example 8.10. Continuing the Execution of the fibonacci Binary File
fibonacci binary stopped after reaching the breakpoint at line 10, you can resume the execution by running the following command:
(gdb) continue
Continuing.
Breakpoint 1, main (argc=1, argv=0x7fffffffe4d8) at fibonacci.c:10
10 printf("%ld ", b);(gdb) step 3
13 b = sum;sum variable before it is assigned to b:
(gdb) print sum
$3 = 2Online Documentation
- Red Hat Enterprise Linux 6 Developer Guide — The Developer Guide for Red Hat Enterprise Linux 6 provides more information on the GNU Debugger and debugging.
- GDB Documentation — The official GDB documentation includes the GDB User Manual and other reference material.
See Also
- Section A.5, “Changes in GDB” provides a comprehensive list of features and improvements over the Red Hat Enterprise Linux system version of the GNU Debugger and the version distributed in the previous release of Red Hat Developer Toolset.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 2, Eclipse provides a general introduction to the Eclipse development environment, and describes how to use it with the tools from Red Hat Developer Toolset.
- Chapter 3, GNU Compiler Collection (GCC) provides further information on how to compile programs written in C, C++, and Fortran.
- Chapter 9, strace documents how to use the strace utility to monitor system calls that a program uses and signals it receives.
- Chapter 10, memstomp documents how to use the memstomp utility to identify calls to library functions with overlapping memory regions that are not allowed by various standards.
strace utility is provided by the devtoolset-2-strace package and is automatically installed with devtoolset-2-toolchain as described in Section 1.5, “Installing Red Hat Developer Toolset”.
Note
strace utility on a program you want to analyze, type the following at a shell prompt:
scl enable devtoolset-2 'strace program [argument...]'program with the name of the program you want to analyze, and argument with any command line options and arguments you want to supply to this program. Alternatively, you can run the utility on an already running process by using the -p command line option followed by the process ID:
scl enable devtoolset-2 'strace -p process_id'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset strace as default:
scl enable devtoolset-2 'bash'Note
strace you are using at any point, type the following at a shell prompt:
which stracestrace executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset strace:
strace -Vstrace prints the name of each system call, its arguments and the return value to standard error output. To redirect this output to a file, use the -o command line option followed by the file name:
scl enable devtoolset-2 'strace -o file_name program [argument...]'file_name with the name of the file.
Example 9.1. Redirecting Output to a File
fibonacci file from Example 8.1, “Compiling a C Program With Debugging Information”. This executable file displays the Fibonacci sequence and optionally allows you to specify how many members of this sequence to list. To run the strace utility on this file and redirect the trace output to fibonacci.log, type:
~]$ scl enable devtoolset-2 'strace -o fibonacci.log ./fibonacci 20'
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765fibonacci.log in the current working directory.
strace utility with the -e command line option:
scl enable devtoolset-2 'strace -e expression program [argument...]'expression with a comma-separated list of system calls to trace or any of the keywords listed in Table 9.1, “Commonly Used Values of the -e Option”. For a detailed description of all available values, see the strace(1) manual page.
Table 9.1. Commonly Used Values of the -e Option
| Value | Description |
|---|---|
file
| System calls that accept a file name as an argument. |
process
| System calls that are related to process management. |
network
| System calls that are related to networking. |
signal
| System calls that are related to signal management. |
ipc
| System calls that are related to inter-process communication (IPC). |
desc
| System calls that are related to file descriptors. |
Example 9.2. Tracing Selected System Calls
employee file from Example 10.1, “Using memstomp”. To run the strace utility on this executable file and trace only the mmap and munmap system calls, type:
~]$ scl enable devtoolset-2 'strace -e mmap,munmap ./employee'
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f896c744000
mmap(NULL, 61239, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f896c735000
mmap(0x3146a00000, 3745960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3146a00000
mmap(0x3146d89000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x189000) = 0x3146d89000
mmap(0x3146d8e000, 18600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3146d8e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f896c734000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f896c733000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f896c732000
munmap(0x7f896c735000, 61239) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f896c743000
John,john@example.comDoe,
+++ exited with 0 +++strace utility with the -t command line option:
scl enable devtoolset-2 'strace -t program [argument...]'-t option twice:
scl enable devtoolset-2 'strace -tt program [argument...]'-r command line option:
scl enable devtoolset-2 'strace -r program [argument...]'Example 9.3. Displaying Time Stamps
pwd. To run the strace utility on this file and include time stamps in the output, type:
~]$ scl enable devtoolset-2 'strace -tt ./pwd'
19:43:28.011815 execve("./pwd", ["./pwd"], [/* 36 vars */]) = 0
19:43:28.012128 brk(0) = 0xcd3000
19:43:28.012174 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc869cb0000
19:43:28.012427 open("/etc/ld.so.cache", O_RDONLY) = 3
19:43:28.012446 fstat(3, {st_mode=S_IFREG|0644, st_size=61239, ...}) = 0
19:43:28.012464 mmap(NULL, 61239, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc869ca1000
19:43:28.012483 close(3) = 0
...
19:43:28.013410 +++ exited with 0 +++strace utility with the -c command line option:
scl enable devtoolset-2 'strace -c program [argument...]'Example 9.4. Displaying a Summary
lsblk. To run the strace utility on this file and display a trace summary, type:
~]$ scl enable devtoolset-2 'strace -c ./lsblk > /dev/null'
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
80.88 0.000055 1 106 16 open
19.12 0.000013 0 140 munmap
0.00 0.000000 0 148 read
0.00 0.000000 0 1 write
0.00 0.000000 0 258 close
0.00 0.000000 0 37 2 stat
...
------ ----------- ----------- --------- --------- ----------------
100.00 0.000068 1790 35 totalInstalled Documentation
strace(1) — The manual page for thestraceutility provides detailed information about its usage. To display the manual page for the version included in Red Hat Developer Toolset, type:scl enable devtoolset-2 'man strace'
See Also
- Section B.7, “Changes in strace” provides a comprehensive list of features and improvements over the Red Hat Enterprise Linux system version of strace.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 8, GNU Debugger (GDB) provides information on how to debug programs written in C, C++, and Fortran.
- Chapter 10, memstomp documents how to use the memstomp utility to identify calls to library functions with overlapping memory regions that are not allowed by various standards.
memstomp utility inspects applications without the need to recompile them. However, it is much faster than this tool and therefore serves as a convenient alternative to it.
Table 10.1. Function Calls Inspected by memstomp
| Function | Description |
|---|---|
memcpy
| Copies n bytes from one memory area to another and returns a pointer to the second memory area. |
memccpy
| Copies a maximum of n bytes from one memory area to another and stops when a certain character is found. It either returns a pointer to the byte following the last written byte, or NULL if the given character is not found. |
mempcpy
| Copies n bytes from one memory area to another and returns a pointer to the byte following the last written byte. |
strcpy
| Copies a string from one memory area to another and returns a pointer to the second string. |
stpcpy
| Copies a string from one memory area to another and returns a pointer to the terminating null byte of the second string. |
strncpy
| Copies a maximum of n characters from one string to another and returns a pointer to the second string. |
stpncpy
| Copies a maximum of n characters from one string to another. It either returns a pointer to the terminating null byte of the second string, or if the string is not null-terminated, a pointer to the byte following the last written byte. |
strcat
| Appends one string to another while overwriting the terminating null byte of the second string and adding a new one at its end. It returns a pointer to the new string. |
strncat
| Appends a maximum of n characters from one string to another while overwriting the terminating null byte of the second string and adding a new one at its end. It returns a pointer to the new string. |
wmemcpy
|
The wide-character equivalent of the memcpy() function that copies n wide characters from one array to another and returns a pointer to the second array.
|
wmempcpy
|
The wide-character equivalent of the mempcpy() function that copies n wide characters from one array to another and returns a pointer to the byte following the last written wide character.
|
wcscpy
|
The wide-character equivalent of the strcpy() function that copies a wide-character string from one array to another and returns a pointer to the second array.
|
wcsncpy
|
The wide-character equivalent of the strncpy() function that copies a maximum of n wide characters from one array to another and returns a pointer to the second string.
|
wcscat
|
The wide-character equivalent of the strcat() function that appends one wide-character string to another while overwriting the terminating null byte of the second string and adding a new one at its end. It returns a pointer to the new string.
|
wcsncat
|
The wide-character equivalent of the strncat() function that appends a maximum of n wide characters from one array to another while overwriting the terminating null byte of the second wide-character string and adding a new one at its end. It returns a pointer to the new string.
|
memstomp utility is provided by the devtoolset-2-memstomp package and is automatically installed with devtoolset-2-toolchain as described in Section 1.5, “Installing Red Hat Developer Toolset”.
Note
memstomp utility on a program you want to analyze, type the following at a shell prompt:
scl enable devtoolset-2 'memstomp program [argument...]'--kill (or -k for short) command line option:
scl enable devtoolset-2 'memstomp --kill program [argument...]'--kill option is especially recommended if you are analyzing a multi-threaded program; the internal implementation of backtraces is not thread-safe and running the memstomp utility on a multi-threaded program without this command line option can therefore produce unreliable results.
--debug-info (or -d) command line option to produce a more detailed backtrace:
scl enable devtoolset-2 'memstomp --debug-info program [argument...]'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset memstomp as default:
scl enable devtoolset-2 'bash'Example 10.1. Using memstomp
employee.c with the following contents:
#include <stdio.h> #include <string.h> #define BUFSIZE 80 int main(int argc, char *argv[]) { char employee[BUFSIZE] = "John,Doe,john@example.com"; char name[BUFSIZE] = {0}; char surname[BUFSIZE] = {0}; char *email; size_t length; /* Extract the information: */ memccpy(name, employee, ',', BUFSIZE); length = strlen(name); memccpy(surname, employee + length, ',', BUFSIZE); length += strlen(surname); email = employee + length; /* Compose the new entry: */ strcat(employee, surname); strcpy(employee, name); strcat(employee, email); /* Print the result: */ puts(employee); return 0; }
employee by using the following command:
~]$ scl enable devtoolset-2 'gcc -rdynamic -g -o employee employee.c'~]$ scl enable devtoolset-2 'memstomp --debug-info ./employee'
memstomp: 0.1.4 successfully initialized for process employee (pid 14887).
strcat(dest=0x7fff13afc265, src=0x7fff13afc269, bytes=21) overlap for employee(14887)
??:0 strcpy()
??:0 strcpy()
??:0 _Exit()
??:0 strcat()
employee.c:26 main()
??:0 __libc_start_main()
??:0 _start()
John,john@example.comDoe,memstomp and its features is beyond the scope of this book. For more information, see the resources listed below.
Installed Documentation
memstomp(1) — The manual page for thememstomputility provides detailed information about its usage. To display the manual page for the version included in Red Hat Developer Toolset, type:scl enable devtoolset-2 'man memstomp'
See Also
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 8, GNU Debugger (GDB) provides information on how to debug programs written in C, C++, and Fortran.
- Chapter 9, strace documents how to use the strace utility to monitor system calls that a program uses and signals it receives.
- Chapter 12, Valgrind explains how to use valgrind to profile applications and detect memory errors and memory management problems, such as the use of uninitialized memory, improper allocation and freeing of memory, and the use of improper arguments in system calls.
Table of Contents
netstat, ps, top, and iostat, others include pretty-printed function callgraph traces or tools for working around security bugs.
Table 11.1. Tools Distributed with SystemTap for Red Hat Developer Toolset
SystemTap is provided by the devtoolset-2-systemtap package and is automatically installed with devtoolset-2-perftools as described in Section 1.5, “Installing Red Hat Developer Toolset”.
Note
stap-prep utility as follows:
scl enable devtoolset-2 'stap-prep'root user, the utility automatically offers the packages for installation. For more information on how to install these packages on your system, see the Red Hat Enterprise Linux SystemTap Beginners Guide.
scl enable devtoolset-2 'tool [option...]'stap tool to build an instrumentation module, type:
scl enable devtoolset-2 'stap [option...] argument...'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset SystemTap as default:
scl enable devtoolset-2 'bash'Note
which stapstap executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset SystemTap:
stap -VInstalled Documentation
- stap(1) — The manual page for the
stapcommand provides detailed information on its usage, as well as references to other related manual pages. To display the manual page for the version included in Red Hat Developer Toolset, type:scl enable devtoolset-2 'man stap' - staprun(8) — The manual page for the
stapruncommand provides detailed information on its usage. To display the manual page for the version included in Red Hat Developer Toolset, type:scl enable devtoolset-2 'man staprun' - SystemTap Tapset Reference Manual — HTML documentation on the most common tapset definitions is located at
/opt/rh/devtoolset-2/root/usr/share/doc/devtoolset-2-systemtap-client-2.1/index.html.
Online Documentation
- Red Hat Enterprise Linux 6 SystemTap Beginners Guide — The SystemTap Beginners Guide for Red Hat Enterprise Linux 6 provides an introduction to SystemTap and its usage.
- Red Hat Enterprise Linux 5 SystemTap Beginners Guide — The SystemTap Beginners Guide for Red Hat Enterprise Linux 5 provides an introduction to SystemTap and its usage.
- Red Hat Enterprise Linux 6 SystemTap Tapset Reference — The SystemTap Tapset Reference for Red Hat Enterprise Linux 6 provides further details about SystemTap.
- Red Hat Enterprise Linux 5 SystemTap Tapset Reference — The SystemTap Tapset Reference for Red Hat Enterprise Linux 5 provides further details about SystemTap.
- The SystemTap Documentation — The official SystemTap documentation provides further documentation on SystemTap, as well as numerous examples of SystemTap scripts.
See Also
- Section B.8, “Changes in SystemTap” provides a comprehensive list of features and improvements over the Red Hat Enterprise Linux system version of SystemTap and the version distributed in the previous release of Red Hat Developer Toolset.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 12, Valgrind explains how to use Valgrind to profile applications and detect memory errors and memory management problems, such as the use of uninitialized memory, improper allocation and freeing of memory, and the use of improper arguments in system calls.
- Chapter 13, OProfile explains how to use OProfile to determine which sections of code consume the greatest amount of CPU time and why.
- Chapter 14, Dyninst documents how to use the Dyninst library to instrument a user-space executable.
Table 12.1. Tools Distributed with Valgrind for Red Hat Developer Toolset
root:
yum install devtoolset-2-valgrind-openmpiNote
scl enable devtoolset-2 'valgrind [--tool=tool] program [argument...]'--tool command line option must be specified in lower case, and if this option is omitted, Valgrind uses Memcheck by default. For example, to run Cachegrind on a program to identify the sources of cache misses, type:
scl enable devtoolset-2 'valgrind --tool=cachegrind program [argument...]'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset Valgrind as default:
scl enable devtoolset-2 'bash'Note
which valgrindvalgrind executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset Valgrind:
valgrind --versionInstalled Documentation
- valgrind(1) — The manual page for the
valgrindutility provides detailed information on how to use Valgrind. To display the manual page for the version included in Red Hat Developer Toolset, type:scl enable devtoolset-2 'man valgrind' - Valgrind Documentation — HTML documentation for Valgrind is located at
/opt/rh/devtoolset-2/root/usr/share/doc/devtoolset-2-valgrind-3.8.1/html/index.html.
Online Documentation
- Red Hat Enterprise Linux 6 Developer Guide — The Developer Guide for Red Hat Enterprise Linux 6 provides more information about Valgrind and its Eclipse plug-in.
- Red Hat Enterprise Linux 6 Performance Tuning Guide — The Performance Tuning Guide for Red Hat Enterprise Linux 6 provides more detailed information about using Valgrind to profile applications.
See Also
- Section A.6, “Changes in Valgrind” provides a comprehensive list of features and improvements over the Red Hat Enterprise Linux system version of Valgrind and the version distributed in the previous release of Red Hat Developer Toolset.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 10, memstomp documents how to use the memstomp utility to identify calls to library functions with overlapping memory regions that are not allowed by various standards.
- Chapter 11, SystemTap provides an introduction to SystemTap and explains how to use it to monitor the activities of a running system.
- Chapter 13, OProfile explains how to use OProfile to determine which sections of code consume the greatest amount of CPU time and why.
- Chapter 14, Dyninst documents how to use the Dyninst library to instrument a user-space executable.
root privileges to run.
Table 13.1. Tools Distributed with OProfile for Red Hat Developer Toolset
Note
operf utility relies on a kernel feature that is currently not available in Red Hat Enterprise Linux 5, and as a consequence, this utility only works and is supported on Red Hat Enterprise Linux 6.
root:
scl enable devtoolset-2 'tool [option...]'ophelp command to list available events in the XML format, type:
scl enable devtoolset-2 'ophelp -X'scl utility, causing it to be run with the Red Hat Developer Toolset binaries used in preference to the Red Hat Enterprise Linux system equivalent. This allows you to run a shell session with Red Hat Developer Toolset OProfile as default:
scl enable devtoolset-2 'bash'Note
which opcontrolopcontrol executable path will begin with /opt. Alternatively, you can use the following command to confirm that the version number matches that for Red Hat Developer Toolset OProfile:
opcontrol --versionInstalled Documentation
- oprofile(1) — The manual page named oprofile provides an overview of OProfile and available tools. To display the manual page for the version included in Red Hat Developer Toolset, type:
scl enable devtoolset-2 'man oprofile' - opannotate(1), oparchive(1), opcontrol(1), opgprof(1), ophelp(1), opimport(1), opreport(1) — Manual pages for various tools distributed with OProfile provide more information on their respective usage. To display the manual page for the version included in Red Hat Developer Toolset, type:
scl enable devtoolset-2 'mantool'
Online Documentation
- Red Hat Enterprise Linux 6 Developer Guide — The Developer Guide for Red Hat Enterprise Linux 6 provides more information on OProfile.
- Red Hat Enterprise Linux 6 Deployment Guide — The Deployment Guide for Red Hat Enterprise Linux 6 describes in detail how to install, configure, and start using OProfile on this system.
- Red Hat Enterprise Linux 5 Deployment Guide — The Deployment Guide for Red Hat Enterprise Linux 5 describes in detail how to install, configure, and start using OProfile on this system.
See Also
- Section A.7, “Changes in OProfile” provides a comprehensive list of changes and improvements over the Red Hat Enterprise Linux system version of OProfile and the version distributed in the previous release of Red Hat Developer Toolset.
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 11, SystemTap provides an introduction to SystemTap and explains how to use it to monitor the activities of a running system.
- Chapter 12, Valgrind explains how to use Valgrind to profile applications and detect memory errors and memory management problems, such as the use of uninitialized memory, improper allocation and freeing of memory, and the use of improper arguments in system calls.
- Chapter 14, Dyninst documents how to use the Dyninst library to instrument a user-space executable.
Dyninst library is provided by the devtoolset-2-dyninst package and is automatically installed with devtoolset-2-perftools as described in Section 1.5, “Installing Red Hat Developer Toolset”. In addition, it is recommended that you also install the GNU Compiler Collection provided by the devtoolset-2-toolchain package.
Note
root:
yum install devtoolset-2-dyninst-develroot:
yum install devtoolset-2-dyninst-docstap command with the --dyninst (or --runtime=dyninst) command line option. This tells stap to translate a SystemTap script into C code that uses the Dyninst library, compile this C code into a shared library, and then load the shared library and run the script. Note that when executed like this, the stap command also requires the -c or -x command line option to be specified.
scl enable devtoolset-2 "stap --dyninst -c 'command' [option...] [argument...]"scl enable devtoolset-2 "stap --dyninst -x process_id [option...] [argument...]"Example 14.1. Using Dyninst with SystemTap
exercise.C that has the following contents:
#include <stdio.h> void print_iteration(int value) { printf("Iteration number %d\n", value); } int main(int argc, char **argv) { int i; printf("Enter the starting number: "); scanf("%d", &i); for(; i>0; --i) print_iteration(i); return 0; }
print_iteration() function for each iteration in order to print the number to standard output. To compile this program on the command line using the g++ compiler from Red Hat Developer Toolset, type the following at a shell prompt:
~]$ scl enable devtoolset-2 'g++ -g -o exercise exercise.C'count.stp with the following contents:
#!/usr/bin/stap global count = 0 probe process.function("print_iteration") { count++ } probe end { printf("Function executed %d times.\n", count) }
print_iteration() function was called during the execution of a process. To run this script on the exercise binary file, type:
~]$scl enable devtoolset-2 "stap --dyninst -c './exercise' count.stp"Enter the starting number:5Iteration number 5 Iteration number 4 Iteration number 3 Iteration number 2 Iteration number 1 Function executed 5 times.
DYNINSTAPI_RT_LIB environment variable to the path to the runtime library file. If you are running a 64-bit system, you can do so by typing the following at a shell prompt:
export DYNINSTAPI_RT_LIB=/opt/rh/devtoolset-2/root/usr/lib64/dyninst/libdyninstAPI_RT.so.8.0export DYNINSTAPI_RT_LIB=/opt/rh/devtoolset-2/root/usr/lib/dyninst/libdyninstAPI_RT.so.8.0DYNINSTAPI_RT_LIB environment variable in the current shell session.
Example 14.2. Using Dyninst as a Stand-alone Application
exercise.C source file from Example 14.1, “Using Dyninst with SystemTap”: this program prompts the user to enter a starting number and then counts down to 1, calling the print_iteration() function for each iteration in order to print the number to standard output.
count.C with the following contents:
#include <stdio.h> #include <fcntl.h> #include "BPatch.h" #include "BPatch_process.h" #include "BPatch_function.h" #include "BPatch_Vector.h" #include "BPatch_thread.h" #include "BPatch_point.h" void usage() { fprintf(stderr, "Usage: count <process_id> <function>\n"); } // Global information for counter BPatch_variableExpr *counter = NULL; void createCounter(BPatch_process *app, BPatch_image *appImage) { int zero = 0; counter = app->malloc(*appImage->findType("int")); counter->writeValue(&zero); } bool interceptfunc(BPatch_process *app, BPatch_image *appImage, char *funcName) { BPatch_Vector<BPatch_function *> func; appImage->findFunction(funcName, func); if(func.size() == 0) { fprintf(stderr, "Unable to find function to instrument()\n"); exit (-1); } BPatch_Vector<BPatch_snippet *> incCount; BPatch_Vector<BPatch_point *> *points; points = func[0]->findPoint(BPatch_entry); if ((*points).size() == 0) { exit (-1); } BPatch_arithExpr counterPlusOne(BPatch_plus, *counter, BPatch_constExpr(1)); BPatch_arithExpr addCounter(BPatch_assign, *counter, counterPlusOne); return app->insertSnippet(addCounter, *points); } void printCount(BPatch_thread *thread, BPatch_exitType) { int val = 0; counter->readValue(&val, sizeof(int)); fprintf(stderr, "Function executed %d times.\n", val); } BPatch bpatch; int main(int argc, char *argv[]) { int pid; if (argc != 3) { usage(); exit(1); } pid = atoi(argv[1]); BPatch_process *app = bpatch.processAttach(NULL, pid); if (!app) exit (-1); BPatch_image *appImage = app->getImage(); createCounter(app, appImage); fprintf(stderr, "Finding function %s(): ", argv[2]); BPatch_Vector<BPatch_function*> countFuncs; fprintf(stderr, "OK\nInstrumenting function %s(): ", argv[2]); interceptfunc(app, appImage, argv[2]); bpatch.registerExitCallback(printCount); fprintf(stderr, "OK\nWaiting for process %d to exit...\n", pid); app->continueExecution(); while (!app->isTerminated()) bpatch.waitForStatusChange(); return 0; }
Makefile to build these two files:
DTS = /opt/rh/devtoolset-2/root CXXFLAGS = -g -I$(DTS)/usr/include/dyninst LBITS := $(shell getconf LONG_BIT) ifeq ($(LBITS),64) DYNINSTLIBS = $(DTS)/usr/lib64/dyninst else DYNINSTLIBS = $(DTS)/usr/lib/dyninst endif .PHONY: all all: count exercise count: count.C g++ $(CXXFLAGS) count.C -I /usr/include/dyninst -c g++ $(CXXFLAGS) count.o -L $(DYNINSTLIBS) -ldyninstAPI -o count exercise: exercise.C g++ $(CXXFLAGS) exercise.C -o exercise .PHONY: clean clean: rm -rf *~ *.o count exercise
g++ compiler from Red Hat Developer Toolset, run the make utility as follows:
~]$ scl enable devtoolset-2 make
g++ -g -I/opt/rh/devtoolset-2/root/usr/include/dyninst count.C -c
g++ -g -I/opt/rh/devtoolset-2/root/usr/include/dyninst count.o -L /opt/rh/devtoolset-2/root/usr/lib64/dyninst -ldyninstAPI -o count
g++ -g -I/opt/rh/devtoolset-2/root/usr/include/dyninst exercise.C -o exerciseexercise and count in the current working directory.
exercise binary file as follows and wait for it to prompt you to enter the starting number:
~]$ ./exercise
Enter the starting number:DYNINSTAPI_RT_LIB environment variable and execute the count binary file:
~]$export DYNINSTAPI_RT_LIB=/opt/rh/devtoolset-2/root/usr/lib64/dyninst/libdyninstAPI_RT.so.8.0~]$./count `pidof exercise` print_iterationFinding function print_iteration(): OK Instrumenting function print_iteration(): OK Waiting for process 8607 to exit...
exercise program. For example:
Enter the starting number: 5
Iteration number 5
Iteration number 4
Iteration number 3
Iteration number 2
Iteration number 1exercise program terminates, the count program displays the number of times the print_iteration() function was executed:
Function executed 5 times.
Installed Documentation
/opt/rh/devtoolset-2/root/usr/share/doc/devtoolset-2-dyninst-doc-8.0/ directory:
- Dyninst Programmer's Guide — A detailed description of the Dyninst API is stored in the
DyninstAPI.pdffile. - DynC API Programmer's Guide — An introduction to DynC API is stored in the
dynC_API.pdffile. - ParseAPI Programmer's Guide — An introduction to the ParseAPI is stored in the
ParseAPI.pdffile. - PatchAPI Programmer's Guide — An introduction to PatchAPI is stored in the
PatchAPI.pdffile. - ProcControlAPI Programmer's Guide — A detailed description of ProcControlAPI is stored in the
ProcControlAPI.pdffile. - StackwalkerAPI Programmer's Guide — A detailed description of StackwalkerAPI is stored in the
stackwalker.pdffile. - SymtabAPI Programmer's Guide — An introduction to SymtabAPI is stored in the
SymtabAPI.pdffile. - InstructionAPI Reference Manual — A detailed description of the InstructionAPI is stored in the
InstructionAPI.pdffile.
Online Documentation
- Dyninst Home Page — The project home page provides links to additional documentation and related publications.
- Red Hat Enterprise Linux 6 SystemTap Beginners Guide — The SystemTap Beginners Guide for Red Hat Enterprise Linux 6 provides an introduction to SystemTap and its usage.
- Red Hat Enterprise Linux 5 SystemTap Beginners Guide — The SystemTap Beginners Guide for Red Hat Enterprise Linux 5 provides an introduction to SystemTap and its usage.
- Red Hat Enterprise Linux 6 SystemTap Tapset Reference — The SystemTap Tapset Reference for Red Hat Enterprise Linux 6 provides further details about SystemTap.
- Red Hat Enterprise Linux 5 SystemTap Tapset Reference — The SystemTap Tapset Reference for Red Hat Enterprise Linux 5 provides further details about SystemTap.
See Also
- Chapter 1, Red Hat Developer Toolset provides an overview of Red Hat Developer Toolset and more information on how to install it on your system.
- Chapter 11, SystemTap provides an introduction to SystemTap and explains how to use it to monitor the activities of a running system.
- Chapter 12, Valgrind explains how to use Valgrind to profile applications and detect memory errors and memory management problems, such as the use of uninitialized memory, improper allocation and freeing of memory, and the use of improper arguments in system calls.
- Chapter 13, OProfile explains how to use OProfile to determine which sections of code consume the greatest amount of CPU time and why.
Table of Contents
Red Hat Developer Toolset
- Red Hat Developer Toolset 2.1 Release Notes — The Release Notes for Red Hat Developer Toolset 2.1 provide more information about this product.
- Red Hat Developer Toolset 2.1 Software Collections Guide — The Software Collections Guide for Red Hat Developer Toolset 2.1 explains the concept of Software Collections and documents the
scltool.
Red Hat Enterprise Linux
- Red Hat Enterprise Linux 6 Developer Guide — The Developer Guide for Red Hat Enterprise Linux 6 provides detailed information about libraries and runtime support, compiling and building, debugging, and profiling.
- Red Hat Enterprise Linux 6 Installation Guide — The Installation Guide for Red Hat Enterprise Linux 6 explains how to obtain, install, and update the system.
- Red Hat Enterprise Linux 5 Installation Guide — The Installation Guide for Red Hat Enterprise Linux 5 explains how to obtain, install, and update the system.
- Red Hat Enterprise Linux 6 Deployment Guide — The Deployment Guide for Red Hat Enterprise Linux 6 documents relevant information regarding the deployment, configuration, and administration of Red Hat Enterprise Linux 6.
- Red Hat Enterprise Linux 5 Deployment Guide — The Deployment Guide for Red Hat Enterprise Linux 5 documents relevant information regarding the deployment, configuration, and administration of Red Hat Enterprise Linux 5.
Background Information
- Hardware type, make, and model on which the product runs
- Software version
- Latest upgrades
- Any recent changes to the system
- An explanation of the problem and the symptoms
- Any messages or significant information about the issue
Note
Diagnostics
root:
yuminstallsos
root:
sosreportAccount and Contact Information
- Red Hat customer number or Red Hat Network (RHN) login name
- Company name
- Contact name
- Preferred method of contact (phone or email) and contact information (phone number or email address)
Issue Severity
- Severity 1 (urgent)
- A problem that severely impacts your use of the software for production purposes. It halts your business operations and has no procedural work around.
- Severity 2 (high)
- A problem where the software is functioning but production is severely reduced. It causes a high impact to business operations and no work around exists.
- Severity 3 (medium)
- A problem that involves partial, non-critical loss of the use of the software. There is a medium to low impact on your business and business continues to function by utilizing a work around.
- Severity 4 (low)
- A general usage question, report of a documentation error, or a recommendation for a future product improvement.
- Technical escalation
- If an issue is not being resolved appropriately or if you need a more senior resource to attend to it.
- Management escalation
- If the issue has become more severe or you believe it requires a higher priority.
Important
Online Documentation
- Getting Started — The Getting Started page serves as a starting point for people who purchased a Red Hat subscription, and offers the Red Hat Welcome Kit and Quick Guide to Red Hat Support for download.
- How can a RHEL Self-Support subscription be used? — A Knowledgebase article for customers with a Self-Support subscription.
- Red Hat Global Support Services and public mailing lists — A Knowledgebase article that answers frequent questions about public Red Hat mailing lists.
- The Eclipse Platform has been updated from version 4.3.0 to 4.3.1. This service release provides over 100 bug fixes and optimizations.
- The Eclipse C/C++ Development Toolkit (CDT) has been updated from version 8.2.0 to 8.2.1. This service version update provides over 30 bug fixes and optimizations, including fixes related to the organization of
includestatements. - Mylyn, a set of task and application life cycle management plug-ins, has been updated from version 3.9 to 3.9.1. This update provides over 40 bug fixes and optimizations, including various improvements to the Bugzilla connector.
- EGit, a Git integration plug-in for Eclipse, has been updated from version 2.3.1 to 3.1. This new major release includes:
- support for Mylin links in the History view, Git Staging view, and Commit dialog window;
- improved Gerrit integration;
- a significantly enhanced Git Staging view;
- an enhanced command line tool (
jgit); - several performance improvements.
- The Eclipse Linux Tools plug-in collection has been updated from version 2.0 to 2.2. This update includes:
- support for the
operfcommand line tool in the OProfile plug-in; theoperfcommand is now used by default to make generic setup easier; - an enhanced RPM Stubby plug-in, which is now able to generate RPM spec files from Perl makefiles, Ruby gamespec files, and Python setup.py files;
- an enhanced Spec File Editor plug-in, which is now able to download source files, prepare a buildroot, and also provides a Build menu, a corresponding toolbar, and improved support for hyperlinks in the editor;
- an enhanced SystemTap
.stpfiles editor, which now has improved formatting capabilities; - improved SystemTap graphing, which has been streamlined to be easier to launch and configure.
- The
libdwlibrary now supports new functionsdwarf_getlocations(),dwarf_getlocation_attr(), anddwarf_getlocation_die(). - The
dwarf_getlocation()function from thelibdwlibrary now supports new DWARF GNU extension opcodesDW_OP_GNU_parameter_ref,DW_OP_GNU_convert,DW_OP_GNU_reinterpret,DW_OP_GNU_regval_type,DW_OP_GNU_entry_value,DW_OP_GNU_deref_type, andDW_OP_GNU_const_type. - The
dwfl_module_addrsym()function from thelibdwlibrary now returns theSTB_GLOBALsymbols in preference toSTB_WEAK. - The
dwfl_report_elf()function from thelibdwlibrary now accepts an additional parameter. This new parameter can be used to configure whether the start address specified in another parameter is an absolute address or a bias relative to thep_vaddrpointer from the program header of the given ELF file. - Functions
dwfl_module_getsymtab(),dwfl_module_getsym(),dwfl_module_addrsym(), anddwfl_module_addrname()from thelibdwlibrary are now aware of the existence of MiniDebugInfo files embedded in main ELF files and consult them when looking for symbols. - The
dwfl_core_file_report()function from thelibdwlibrary now reads the chain from theDT_DEBUGentry before attempting to use other module discovery methods. - The
eu-readelfutility now understands core note type valuesNT_ARM_TLS,NT_ARM_VFP,NT_ARM_HW_BREAK,NT_ARM_HW_WATCH,NT_SIGINFO, andNT_FILEand converts them to a human-readable form. It also understands.gdb_indexsections version 8. - The
eu-readelfutility now supports the following new command line options:- The
--elf-sectionoption can be used to inspect an embedded ELF file. - The
--unresolved-address-offsetsoption or its short variant-Ucan be used to dump addresses in ELF files without resolving them to symbols. - The
--debug-dump=decodelineoption can be used to dump a.debug_linesection in a human-readable, expanded format. In contrast, the original behavior of--debug-dump=arangescan now be achieved by using the--debug-dump=decodedarangesoption, and the default formatting of the.debug_arangessection is now the same as in the ELF file.
- The
eu-addr2lineutility now supports a new command line option--inlines(and its short variant-i), which can be used to display all inlined subroutines of a particular address.
General Changes in the Git Suite
- Git now detects the
DISCOVERY_ACROSS_FILESYSTEMenvironment variable to decide whether to stop at a filesystem boundary when looking for the.gitdirectory. - The
GIT_ASKPASSenvironment variable can now be used to tell commands from the Git suite that prompt for password to use an external program. - The contents of the
/etc/mailnamefile (if it exists) are now the default source of email hostnames for both the committer and the author. - Conflict markers in the diff3 style now have a label.
- The
core.whitespaceconfiguration variable can now use a new rule:tab-in-indent. This rule treats a tab character at the beginning of a line as an error (useful for projects with space-only indents, for example, Python projects). - The
core.eolconfiguration variable is now the end-of-line authority over the working-tree files. It accepts thelf,crlf, ornativevalues. The default is set tonative. - Git now reports any corrupt objects it finds.
- A dash (“-”) is no longer a valid character at the beginning of a branch or tag name.
- The
pager.configuration variable now allows for setting a different pager for each subcommand.subcommand - The
core.abbrevconfiguration variable can now be used to set the minimum length of abbreviated and unique object names. - Git now recognizes MATLAB function and header patterns.
- Git now supports output coloring. A large number of configuration options have been added to allow for a separate tweaking of the look of various parts of outputs.
- Git commands now ignore the
.gitmodulesfile if it is currently conflicted in a merge. - The
-ccommand line option can now be used to override a configuration option.name=value - The
core.attributesfileconfiguration variable can be set to a path of a file containing fallback default attributes. The default value is/etc/gitattributes. - A new command,
git check-ignore, has been added. The command helps to debug.gitignorefiles by showing the pattern on the basis of which individual files are included or excluded. - The Git login shell for SSH accounts can now be extended by the user's own custom commands.
- A new configuration variable,
advice.statusHints, is now available. It allows the user to disable (or enable) the hints about staging, unstaging, or adding files displayed by thegit statuscommand. - A new credential helper has been added to access the GNOME Keyring and other services. Commands using some form of authentication can now use it to communicate with external programs. Refer to
gitcredentials(7)for more information on configuring credential helpers. - Git can now be told to interpret paths literally. The
--literal-pathspecscommand line option serves that purpose. Setting theGIT_LITERAL_PATHSPECSenvironment variable to1has the same effect. - The
.gitignorefile now accepts the “**” (double asterisk) recursive glob pattern. - Regular expressions are now accepted in the
:/<string>notation. Also, the expression is no longer bound to the start of the commit log message. Note that this change is not backward compatible. - Custom messages are now issued to users who are attempting to interactively connect to the
git shellwhen the interactive access is disabled. - Git subcommands now honor the
i18n.*configuration variables when handling text. Seegit-config(1)for more information on these settings. - A considerable number of new scripts have been added to the
contrib/directory. - The
git fsckandgit prunecommands are now reporting on their progress. - The
http.useragentconfiguration variable can now be set to lie to your firewall about the client used for HTTP connections. - A new command,
git check-mailmap, has been added. It can be used to map author and committer names and email addresses to their preferred names and addresses as specified in the.mailmapfile. - Users can now switch between commits with and without a submodule without re-cloning it due to improved plumbing — the
GIT_DIRmetainformation directory for submodules is set up inside a new submodule's directory. - Whenever a date is expected as an argument, users can now specify a timezone designator format without seconds and with a colon between hours and minutes.
- The
GIT_PREFIXenvironment variable is now available in the environments of processes spawned in configuration, so that they can check where in the tree the original command was invoked. - A special path specification, “:/”, can be used to tell subcommands that work only with the current directory to work with the entire working tree.
The git am Command
- The
git amcommand now accepts patches created by Mercurial. - The
git amcommand now sanitizes occurrences of “Re:” in the subject line. - The following new command line options have been added to the
git amcommand:--exclude=path- Passed to the
git applycommand that is used in the background to apply the patch. --keep-cr- Handles lines that contain a carriage return character (CR).
The git apply Command
- The
--verbose(or-v) command line option now reports offsets in case a patch does not apply cleanly.
The git archive Command
- It is now possible to pipe the output of the
git archivecommand to thegzipcommand. Do this by passing thetar.gzortgzarguments to the--formatcommand line option or by specifying either of these arguments in thetar.configuration variable.format
The git bisect Command
- The result of the
git bisectcommand is now output as a comment in the bisect log file.
The git blame Command
- The
git blamecommand now applies the configured textconv filters whenever possible. The textconv conversion allowsgit blameto present a human-readable output even when working with binary files. - The following new command line options have been added to the
git blamecommand:--abbrev[=n]- Display
n+1 hexadecimal digits instead of the default 7+1 as the abbreviated object name. --line-porcelain- Use the easily parsable porcelain-formatted output, but show commit information for each line. This option implies the use of the
--porcelainoption. For a description of the porcelain format, seegit-blame(1). --show-email(or-e)- Display email addresses instead of author names. This option is set to
offby default.
The git branch Command
git branch command:
--edit-description- Open an editor to describe the purpose of the branch.
--list- List existing branches. The option optionally accepts a globbing pattern.
The git checkout Command
git checkout command:
-Bit- A shorter version of running
git branch -ffollowed byitgit checkout. Seeitgit-branch(1)for more information. --detachcommit- A more user-friendly equivalent of the default behavior of
git.commit --no-overwrite-ignore- Do not overwrite untracked or ignored files during a merge.
--orphannewbranch- Creates a
newbranchsimilarly to thegit checkout -bcommand but with a detached root commit.newbranch
The git check-attr Command
- The
git check-attrcommand now accepts relative paths passed from the command line. - The following new command line options have been added to the
git check-attrcommand:--all(or-a)- List all the attributes of the specified path.
--cached- Look at the
.gitattributesfile in the index, and ignore the working tree.
The git cherry-pick Command
- The
git cherry-pickcommand is now aware of commits that failed to apply. - A range of commits can now be picked.
- A custom merge strategy can now be set. See below for a description of the new
--strategycommand line option. - After resolving conflicts with
git cherry-pick -s, sign-off lines are now implicitly left untouched in the log template. - The following new command line options have been added to the
git cherry-pickcommand:--abort- Abort current operation and return to the state before the start of the sequence.
--allow-empty-message- Prevents the
git cherry-pickcommand from failing when a commit is being picked that has no log message. --continue- Continue the operation in progress. This option uses information found in the
.git/sequencerfile and can be used after conflict resolutions. --strategy=strategy- Specifies the merge strategy for three-way merges. This option should only be used once. For information about the available strategies, see
git-merge(1).
The git clean Command
- The
git cleancommand now provides an interactive mode, which can be invoked using the--interactive(or-i) command line option. For a description of subcommands available in the interactive mode, seegit-clean(1). - A new command line option,
--exclude=(orpattern-e), has been added. This option allows the user to define rules that specify which files to ignore (in addition to what is defined in thepattern.gitignoreandfiles).GIT_DIR/info/exclude
The git clone Command
- A new command line option,
--config(orkey=value-c), is now available. This option sets the specified configuration variable to be in effect at the time of the initial checkout. The syntax expected is the same as what is used with thekey=valuegit configcommand.
The git commit Command
- The
git commitcommand now accepts arguments in the form of relative paths that point outside of the current directory. - Aborting interactive mode (initialized by the
--interactivecommand line option) now discards all changes that were made in it. - It is now possible to set the
commit.cleanupconfiguration variable towhitespace, which is equivalent to running thegit commitcommand with the--cleanup=command line option. For a description of all available cleanup modes, seewhitespacegit-commit(1). - The following new command line options have been added to the
git commitcommand:--fixup=commit- Prefix the commit line with “fixup! ”. This option is used when running the
git rebase --autosquashcommand. --gpg-sign[=(orkeyid]-S[keyid]- Sign the commit using the specified GPG key.
--no-edit- Do not launch an editor for the commit message. When used with the
--amendcommand line option, it only updates the commit tree, not the commit message. --patch(or-p)- Select patch hunks for committing using the interactive interface. Refer to
git-add(1)for more information about the interactive mode. --squash=commit- Prefix the commit line with “squash! ”. This option is used when running the
git rebase --autosquashcommand.
The git count-objects Command
- The verbose output, invoked by passing the
--verbose(or-v) command line option to thegit count-objectscommand, now reports on various garbage in the.gitdirectory. Refer togit-count-objects(1)for a more detailed description of the verbose output. - A new command line option,
--human-readable(or-H), has been added. This option makesgit count-objectsshow sizes in a human-readable format.
The git cvsimport Command
- A new command line option,
-R, has been added togit cvsimport. This option creates a mapping between CVS revisions and Git commits. - Users of the
git cvsimportcommand can now use the following configuration variables to enable certain command line options by default:Configuration Variable Command Line Option Description cvsimport.authorsFiles-Afile_nameMaps CVS user names to full names and email addresses. cvsimport.ignorePaths-Sregular_expressionSkips paths that match a certain regular expression. cvsimport.mergeRegex-Mregular_expressionParses commit messages in order to detect merge commits. cvsimport.trackRevisions-RCreates a mapping between CVS revisions and Git commits.
The git cvsserver Command
- The
git cvsservercan now use pserver to offer CVS access. Refer togit-cvsserver(1)for information on how to configure this.
The git daemon Command
- The
git daemonserver can now listen on multiple addresses. - The daemon now allows for external hooks via the
--access-hook=command line option. This option executes an external command specified bypathpathevery time a client connects to the daemon.
The git describe Command
- A new command line option,
--first-parent, has been added. This option instructs thegit describecommand to only follow the first parent commit in case of merge commits.
The git diff Command
- The
--submodulecommand line option is now able to notice ‘dirty’ submodules. These are submodules that contain modified or untracked files. - The regular expression for function headers now detects visibility modifiers (public, private, or protected) in the PHP5 programming languages.
- Functions and subroutines of the Fortran, Pascal, and Perl programming languages are now recognized.
- A new configuration variable,
diff.submodule, is now available for setting the default format used for showing differences in submodules using the--submodulecommand line option. The option can have two values:logorshort. For a detailed description of the two values, seegit-diff(1). The default value isshort. - A new configuration variable,
diff.noprefix, is now available for setting an implicit behavior identical to what the--no-prefixcommand line option does. If set, no source or destination prefix is shown. - A new configuration variable,
diff.context, is now available for setting the number of lines shown above and below the modified line or lines. The default value is3. The--unified(or-U) option overrides this setting. - A new configuration variable,
diff.algorithm, is now available. This variable can be used to specify the algorithm used to display thegit diffoutput. It accepts the following arguments:defaultormyers,minimal,patience, andhistogram. For a description of the different algorithms, refer togit-diff(1). The default value isdefaultormyers. - A new configuration variable,
diff.ignoresubmodules, is now available. This variable can be used to ignore submodules when generating diffs. - The following new command line options have been added to the
git diffcommand:--function-context(or-W)- Displays entire functions in the context of changes.
--histogram- Generates output using the histogram algorithm. This algorithm supports low-occurrence common elements and offers better performance than the default.
--ignore-blank-lines- Tells
git diffto ignore changes that consist only of additions or removals of blank lines. --minimal- Generates output using the minimal algorithm. This algorithm attempts to minimize the output at the cost of extra time spent.
--stat-count- Limits the length of output to the number of lines specified by the option. Lines exceeding the limit are substituted with “...”.
--word-diff=mode- Shows added or removed words. This option accepts
color,plain,porcelain, andnoneas modes. For a description of the available modes, refer togit-diff(1). The default isplain.
The git fetch Command
- The
git fetchcommand now honors thetransfer.fsckobjectsconfiguration variable. If set, the command validates received objects. - A new command line option,
--recurse-submodules[=, has been added. This option controls whether to fetch new commits from submodules too. This option accepts theargument]yes,no, oron-demandarguments. If passed without an argument, it assumesyes. For a description of the arguments, seegit-fetch(1).
The git format-patch Command
- The
git format-patchcommand now accepts the--subject-prefixcommand line option with no argument. This option substitutes the standard “[PATCH]” prefix in the subject line with a new prefix (or none) specified on the command line. - The
format.coverLetterconfiguration variable may now be used to turn the--cover-lettercommand line optiononoroff. Theformat.coverLettermay further be set toautoto only be used with sets of two or more commits. - The following new command line options have been added to the
git format-patchcommand:--from[=whom]- Set the “From: ” field to the specified person. Not to be used when preparing patches for the
git send-mailcommand. Seegit-format-patch(1)for more information about the behavior of this option. --notes[=ref]- Add notes to the formatted patch. Refer to
git-notes(1)for more information on the way Git handles these notes. --[no-]signature- Alter the email signature used in the output messages. The
format.signatureconfiguration variable can be used to set the default signature. When neither the command line option nor the configuration variable is specified, the Git version number is used as the signature. The--no-signaturevariant of the option can be used to prevent the inclusion of any signature. --quiet(or-q)- Do not show the names of the generated patch files.
--reroll-count=(orn-v)n- Output a set of patches with the
nversion string prepended to their names and the version mentioned in the subject.
The git for-each-ref Command
- The
git for-each-refcommand now recognizes the following new fields for extracting values from referenced objects into the resulting output:%(symref),%(symref:short),%(flag),%(objectname:short),%(contents:subject),%(contents:body), and%(contents:signature).
The git grep Command
- Functions and subroutines of the Fortran, Pascal, and Perl programming languages are now recognized.
- It is now possible to pass the
-(dash) argument to the-fcommand line option to instruct it to read patterns from the standard input. - The following new command line options have been added to the
git grepcommand:--break- Delimit matches from different files with an empty line.
--color=[when]- Color the matches returned by
git grep. This option accepts theauto,always, orneverarguments. The default setting isalways. --exclude-standard- Do not search in files listed in the
.gitignorefile when using the--no-indexoption. --function-context(or-W)- Show the entire function in which the match was found.
--heading- Print the filename above the matches from that file instead of showing the file information for each match separately.
--no-index- In the current directory, search also for matches in files that are not managed by Git.
--open-files-in-pager [(orpager]-O [)pager]- Instructs
git grepto open files with matching regular expressions in the user's pager or editor of choice. -P- Instructs
git grepto expect and accept Perl-compatible regular expressions. --untracked- In the current tree, search in both tracked and untracked files.
The git hash-object Command
- The
--stdin-pathscommand line option can now be used together with the--no-filteroption. This results in thegit hash-objectcommand reading filenames from the standard input and hashing the contents as is — disregarding any filters that may have been applied by the attributes mechanism.
The git help Command
- The
--web(or-w) command line option now works with the Chrome and Chromium web browsers. The default web browser can be specified using thehelp.browserorweb.browserconfiguration variables. If none of these variables is defined, thegit web--browsescript attempts to choose a browser automatically. - A new command line option,
--guides(or-g), has been added. This option shows a list of useful guides.
The git imap-send Command
- The
git imap-sendcommand now supports CRAM-MD5 as a valid method for authentication with an IMAP server.
The git init Command
- A new configuration variable,
init.templatedir, is now recognized. Similarly to the--templatecommand line option and theGIT_TEMPLATE_DIRenvironment variable, it specifies the directory containing files and directories that will be copied to the.gitdirectory (orGIT_DIR). - A new command line option,
--separate-git-dir=, has been added. This option forcesgitdirectorygit initto initialize the repository in the specified location. A symbolic link is created in place of the.gitdirectory, pointing to the separately placed repository.
The git log Command
- The
--followcommand line option now follows copies as well as renames when listing the history of a file. - The
git logcommands are now able to interpret paths specified using globs. - The
--format=option is now able to interpret theformat%g[nNeE]specifiers when showing information from reflogs. For a description of the specifiers, seegit-log(1). - The
--decoratecommand line option now shows commit information in colors. It is now also capable of highlighting grafted and replaced commits. - The following new command line options have been added to the
git logcommand:--author-date-order- Sort the commits listed based on the author timestamp. No parents are shown before all of their children are listed.
--cherry- Display two diverged branches, and omit any changes they share. This is equivalent to the following combination of options:
--right-only --cherry-mark --no-merges. --cherry-mark- Display two diverged branches, and mark any changes they share with the “=” (equal sign) character.
--children- List also the children of commits.
-Gpattern- Only match changes that contain
pattern. --grep-reflog=pattern- Limit the output to commits whose reflog messages match
pattern. If multiple--grep-reflogoptions are used, commits with reflog messages matching any of the patterns specified are listed. This option should only be used together with the--walk-reflogsoption. -Lstart,end:file- Show the changes that the line specified by the range within the
filewent through. Either end of the range may be specified by absolute line numbers or regular expressions. The end of the range may also be an offset that specifies a number of lines before or afterstart. --notes- Replaces the
--show-notesoption. This option shows the notes annotating the commits (commit log messages). --show-signature- Pass the signature of a commit object to the
gpg --verifycommand to check its validity, and show the output. --use-mailmap- Rewrite the names and email addresses of committers in the output using the
mailmapfile.
The git ls-remote Command
- A new command line option,
--exit-code, has been added. This option returns 2 as the command's exit code when no matching remote refs are found. - A new command line option,
--help, has been added. This option displays basic information about the syntax and options of thegit ls-remotecommand.
The git merge Command
- The
--log[command line option may now be optionally given a numeric parameter. The parameter specifies the number of commits merged from which one-line descriptions will be used in the log message in addition to branch names.n] - It is now possible to use the
git merge -command, where-(dash) denotes the name of the previous branch. - The
merge.ffconfiguration variable can now be set toyes,no, oronlyto specify the default behaviour, which corresponds to the--ff,--no-ff, and--ff-onlycommand line options respectively. For a description of these options, seegit-merge(1). - The following new command line options have been added to the
git mergecommand:--abort- Abort the current conflict-resolution process, and attempt to go back to the pre-merge state. It may not be possible to go back if there were uncommitted changes when the merge was started.
--edit(or-e)- Open an editor to edit the automatically generated merge message before committing a successful merge.
--no-overwrite-ignore- Do not overwrite untracked or ignored files during a merge.
--[no-]verify-signature- Verify the GPG signatures of the commits that are being merged. Abort the merge if the verification fails. The
--no-verify-signaturevariant of the option instructs thegit mergecommand not to verify commit signatures.
The git mergetool Command
- The
git mergetoolcommand now instructs thevimorgvimeditors to show the three-way diff by default. The old behavior can be achieved by specifyingvimdiff2orgvimdiff2as the tool to be used.
The git merge-base Command
- A new command line option,
--is-ancestor, has been added. This option returns the 0 exit status code if the firstcommitcommitcommitis an ancestor of the secondcommitand 1 if not.
The git merge-file Command
- A custom conflict-marker size can now be used. The custom size can be set using the
--marker-sizecommand line option or theconflict-marker-sizeconfiguration attribute. - The union merge behaviour can now be used. This means that
git merge-fileresolves conflicts by concatenating lines from both sides of the merge.
The git notes Command
- A new subcommand,
git notes merge, is now available. This subcommand attempts to merge notes accompanying the specified object into the current notes ref.
The git notes prune Subcommand
git notes prune subcommand:
--dry-run(or-n)- Does not remove anything. Instead, it only lists the names of objects whose notes would be pruned.
--verbose(or-v)- Makes the
prunesubcommand provide more information when merging notes and report all names of objects whose notes are removed during the pruning.
The git pull Command
- The
git pullcommand can now pull an annotated or signed tag instead of a branch tip. The GPG signature of the tag is then made a part of the merge commit. - The
pull.rebaseconfiguration variable is now recognized. It makesgit pullact as if the--rebasecommand line option was passed. The variable serves as a fallback setting in case the per-branchbranch.variable is not set. Note that this may be a potentially dangerous setting. Refer toname.rebasegit-rebase(1)for more information about rebasing and togit-config(1)for a description of thepull.rebasevariable. - The
--verbose(or-v) and--quiet(or-q) command line options are now passed along to thegit rebasecommand whengit pull --rebaseis run or when the correspondingbranch.configuration variable is set.name.rebase - A new command line option,
--[no-]verify-signature, has been added. This option verifies the GPG signatures of the commits that are being merged and aborts the merge if the verification fails. The--no-verify-signaturevariant of the option instructs thegit pullcommand not to verify the GPG signatures of the commits.
The git push Command
- A new “pre-push” hook is available. If the hook exits with a non-zero status code, it will prevent the
git pushcommand from performing any operations. To enable the hook, pass the--verifycommand line option togit push. Use the--no-verifyoption to bypass the hook. For a more detailed description of the hook, refer togithooks(5). - The
--force(or-f) command line option is now required for updating remote tags. Note that forcing a push can result in a loss of commits in the remote repository if not used with care. For a more detailed description of this option, refer togit-push(1). - The
push.defaultconfiguration variable has a new valid value ofupstream, which is synonymous to the now deprecatedtrackingvalue. For a description of the availablepush.defaultvalues, refer togit-config(1). - The following new command line options have been added to the
git pushcommand:--follow-tags- Push annotated tags plus all the refs that would be pushed normally.
--recurse-submodules=check|on-demand- Do not push if any submodule is ahead of its remote HEAD. See
git-push(1)for an explanation of the two possible arguments.
The git read-tree Command
- A new command line option,
--dry-run(or-n), has been added. This option checks if a merge would complete without errors when thegit read-treecommand is passed the-moption.
The git rebase Command
- The
rebase.autosquashconfiguration option is now honored by thegit rebase --interactivecommand. The--interactive(or-o) command line option prepares a list of the commits to be rebased and lets the user modify that list before the rebasing takes place. - The
git rebasecommand now updates reflog for HEAD even when it finishes normally or is ended with the--abortcommand line option. - It is now possible to pass SHA-1 hashes as object names when using the
--autosquashcommand line option. - The
--strategy-option=(oroption-X) command line option can now be used along with theoption--strategy=(orstrategy-s) option to pass options to the selected merge strategy. Refer tostrategygit-rebase(1)for a description of the available strategies. - The following new command line options have been added to the
git rebasecommand:--edit-todo- Edit the instructions in an editor when using the interactive mode (invoked by the
--interactive(or-i) option). --[no-]autostash- Temporarily stash uncomitted changes before the rebasing begins instead of refusing to run. The
--no-autostashvariant of the option may be used to prevent autostashing when therebase.autostashconfiguration variable is set.
The git remote Command
- A new subcommand,
git remote set-branches, is available. This subcommand modifies the list of branches tracked by the specified remote.
The git replace Command
- The
--delete(or-d) command line option now interprets itsobjectargument as the extended SHA-1 syntax. Theobjectmay now be specified, for example, asHEAD~.NUM
The git rerere Command
- A new subcommand,
git rerere remaining, is now available. It displays conflicts that have not been automatically resolved. This includes paths that thegit rererecommand cannot track, such as submodules. - The
git rerere forgetsubcommand now requires a path to be specified where any conflict resolutions are to be reset.
The git reset Command
- A new command line option,
--keep, has been added. This option discards index entries and commits in the working tree but preserves local changes.
The git revert Command
- A new command line option,
--strategy=, has been added. This option specifies the merge strategy for three-way merges. This option should only be used once. For information about the available strategies, seestrategygit-merge(1).
The git send-email Command
- The
git send-emailcommand is now able to parse and use the “To:” field from its input files. - The value of the
sendemail.aliasfileconfiguration variable may now begin with the “~” (tilde) character to denote the user's home directory. - The
sendemail.annotateconfiguration variable may now be used to set the default behavior that is otherwise controlled by the--annotatecommand line option. If set totrue, each patch that is about to be sent is offered for review and editing. - Patches sent with the
--in-reply-tocommand line option are now replies to the new cover letter that begins the new thread. - The following new command line options have been added to the
git send-emailcommand:--help(or-h)- Display basic information about the syntax and options of the
git send-emailcommand. --to-cmd=command- This option is similar to the
--cc-cmd=option and can be used to read the list of recipients from the output of thecommandcommand.
The git show Command
- The
git show --do-walk -command now has a more compact equivalent,ngit show -. Refer tongit-rev-list(1)for more information on object traversal. - The
--no-patchcommand line option is a new synonym for the-soption. This option suppresses diff output. It can also be used to cancel the effect of the--patchoption.
The git show-ref Command
- The
--headcommand line option now always means the “HEAD” reference, regardless of filtering.
The git stash Command
- A new command line option,
--include-untracked(or-u), has been added. This option stashes untracked files as well, which allows for them to be cleaned later by thegit cleancommand.
The git status Command
- The
git statuscommand now detects submodules with uncommitted local changes in their working tree. - Users can now change the value of the
status.shortconfiguration variable totrueto configure thegit statuscommand to use the--shortcommand line option by default. Similarly, it is now possible to change the value of thestatus.branchconfiguration variable totrueto rungit statuswith the--branchoption by default. - The following new command line options have been added to the
git statuscommand:--branch(or-b)- Displays the name of the current branch even when the
--short(or-s) option is used. --ignore-submodules[=condition]- This option accepts
none,untracked,dirty, orallas an optional argument and can be used to ignore certain changes to submodules. --ignored- Displays ignored files.
The git submodule Command
- Users are now allowed to create shallow clones of submodule repositories.
- Users can now run
git submodulecommands from any part of the working tree. - The
git submodule synccommand now also updates information for submodules that have not been checked out. - The
git submodule updatecommand no longer terminates immediately when it encounters an error. Instead, it updates the remaining registered submodules and displays the error message on exit. - The
git submodule updatecommand can now be configured to execute an arbitrary shell command. To enable this behavior for a particular submodule, change the value of thesubmodule.configuration variable to any shell command that accepts exactly one command line argument.submodule_name.update - Users can now set the value of the
submodule.configuration variable tosubmodule_name.updatenoneto prevent a particular submodule from being updated by default. - A new command,
git submodule deinit, has been added. This command unregisters selected submodules and serves as a counterpart to thegit submodule initcommand. - A new command line option,
--force(or-f), has been added togit submodule. This option can be used to discard local changes. - A new command line option,
--name, has been added togit submodule. This option can be used to specify the name of a new submodule. - It is now possible to apply the
--recursivecommand line option to thesynccommand ofgit submodule. This option makessynctraverse nested submodules recursively.
The git tag Command
- A new command line option,
--cleanup=, has been added. This option controls the way whitespace is handled in tag messages. It accepts themodeverbatim,whitespace, orstriparguments. Seegit-tag(1)for a description of what the available modes do.
The gitweb Interface
- The configuration of the gitweb interface can now be changed after each request.
- The
/etc/gitweb-common.confconfiguration file is now read if it exists. - The gitweb interface is now able to show diffs.
Other new subcommands and exotic option combinations
git remote -tbranch--mirror=fetch- This is now a legal combination of options as the mirroring in the
fetchmode no longer mirrors everything. git rev-listA..B--ancestry-path- The newly available
--ancestry-pathoption excludes commits that are not descendants of commitA. git rev-list --count --cherry-mark- This combination now produces a more useful output as it counts the cherry-picked commits separately.
- It is now possible to use the
expression to access non-static member variables of a particular class in the current scope of implicit parameterClassName::MemberVariablethis. - GDB now automatically loads files with the
.gdband.pyfile extension located in the/opt/rh/devtoolset-2/root/etc/gdbinit.d/directory on startup.
- Manual pages cg_diff(1), cg_merge(1), valgrind-listener(1), and vgdb(1) have been added.
- Support for
PTRACE_GET_THREAD_AREAandPTRACE_SET_THREAD_AREAhas been added. - Valgrind now supports
AF_BLUETOOTHsockets. - Valgrind now supports the
SSE4 MOVNTDQAinstruction.
- OProfile now supports the Intel Core i3, Intel Core i5, Intel Core i7, Intel Xeon Processor E3, Intel Pentium, and Intel Celeron processors formerly code-named Haswell.
- Users can now use named unit masks for Intel processors.
- The Eclipse Platform has been updated from version 3.6 to 4.3. This new major release features a more flexible user interface based on Eclipse Modeling Framework (EMF), CSS-based themes, dependency injection, and more.
- The Eclipse C/C++ Development Toolkit (CDT) has been updated from version 7.0 to 8.2. This new major release includes:
- a greatly enhanced indexer, both in terms of capabilities and speed;
- improved GNU Debugger integration;
- support for GNU Debugger's pretty-printing;
- multi-process debugging;
- project-less debugging;
- enhanced refactoring;
- code-checking capabilities;
- an improved and more polished user interface.
- Mylyn, a set of task and application life cycle management plug-ins, has been updated from version 3.4 to 3.9. This update includes:
- an enhanced task-focused interface and task editing;
- a new Jenkins/Hudson connector;
- enhanced Bugzilla and Trac connectors;
- EPUB authoring tools.
- A new EGit plug-in has been added. This plug-in includes an Eclipse Team provider based on JGit, a Git implementation written entirely in Java, and adds support for the Git revision control system to the Eclipse user interface by introducing the History and Synchronize views, Compare and Quick Diff menu items, and various wizards to make it easier for developers to use this plug-in.
- New GCov integration has been added to allow the user to visualize GCov output in both summarized form and in file editors. As well, graphing capabilities for the data have been added.
- New GProf integration has been added to allow the user to view profiling information such as execution time and call graphs. As well, graphing capabilities for the data have been added.
- A new SystemTap integration plug-in has been added. This plug-in includes:
- an editor for the
.stpfiles with the autocomplete feature; - the Probe view with a list of probes that are available on the system;
- the Function view with a list of functions that are available on the system and can be used in
.stpscripts.
As well, this plug-in includes integration for running SystemTap scripts and viewing the results in a textual, tabular, and graphical manner. Note that the result sets are updated in a near-runtime way, which allows the user to use this plug-in for longer-running monitoring tasks. - New kernel perf tool integration has been added. This plug-in uses the performance counters subsystem of the Linux kernel to profile applications, makes it easier to analyze the results by hyperlinking to the sources in the workspace projects, simplifies the perf tool configuration by selecting the counters to be used, and allows the user to run this tool remotely.
- A unified profiling launcher has been added to provide a single method to launch profiling. It allows the user to select a profiling category (Memory, Timing, or Coverage) and back ends for this category (such as OProfile, perf, or GProf for Timing).
- The C/C++ documentation plug-in has been enhanced to recognize and use
gtk-docgenerated documentation and to display it in the Eclipse Help Center. - The OProfile plug-in has been enhanced to support root privilege authentication through polkit. This feature is configured automatically.
- The Valgrind plug-in now supports the Helgrind tool, which can be used to detect synchronization problems such as race conditions, deadlocks caused by incorrect locking order, or misuse of the POSIX
pthreadsAPI. When a problem is detected, the plug-in displays error markers on the corresponding lines in the source code.
Aggressive Loop Optimizations
unsigned int foo() { unsigned int data_data[128]; for (int fd = 0; fd < 128; ++fd) data_data[fd] = fd * (0x02000001); // error return data_data[0]; }
fd variable is 64 or above, the fd * 0x02000001 operation overflows, which is invalid in both C and C++ for signed integers. In the example above, GCC may generate incorrect code or enter an infinite loop.
data_data[fd] = (uint32_t) fd * (0x02000001U); // ok-fno-aggressive-loop-optimizations.
New Local Register Allocator
AddressSanitizer
-fsanitize=address command line option. It augments memory access instructions in order to detect use-after-free and out-of-bound accesses to objects on the heap.
ThreadSanitizer
-fsanitize=thread.
Compiling Extremely Large Functions
New -Og Optimization Level
-Og, has been introduced. This optimization level addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance. Overall, the development experience should be better than the default optimization level -O0.
Caret Diagnostic Messages
fred.cc:4:15: fatal error: foo: No such file or directory
#include <foo>
^
compilation terminated.New -fira-hoist-pressure Option
-fira-hoist-pressure, has been added. This option uses the register allocator to help decide when it is worthwhile to move expressions out of loops. It can reduce the size of the compiler code, but it slows down the compiler. This option is enabled by default at -Os.
New -fopt-info Option
-fopt-info, has been added. This option controls printing information about the effects of particular optimization passes, and takes the following form:
-fopt-info[-info][=file_name]info part of the option controls what is printed. Replace it with optimized to print information when optimization takes place, missed to print information when optimization does not take place, note to print more verbose information, or optall to print everything.
file_name with the name of the file in which you want the information to be written. If you omit this part of the option, GCC writes the information to the standard error output stream.
-O2 option but had no effect when compiling a file named foo.c, type:
gcc -O2 -fopt-info-missed foo.cNew -floop-nest-optimize Option
-floop-nest-optimize, has been added. This option enables an experimental ISL-based loop nest optimizer, a generic loop nest optimizer that is based on the Pluto optimization algorithms and that calculates a loop structure optimized for data-locality and paralelism. For more information about this optimizer, see http://pluto-compiler.sourceforge.net.
Hot and Cold Attributes on Labels
__builtin_expect cannot be used, for instance with a computed goto or asm goto.
DWARF4
New -gsplit-dwarf Option
-gsplit-dwarf, has been added. This option tells the compiler driver to separate as much DWARF debugging information as possible into a separate output file with the .dwo file extension, and allows the build system to avoid linking files with debugging information.
.dwo files, such as the version of GDB included in Red Hat Developer Toolset 2.0.
Note
.dwo files.
Experimental C++ Features from an Upcoming Standard
g++ now supports a new command line option, -std=c++1y. This option can be used for experimentation with features proposed for the next revision of the standard that is expected around 2014. Currently, the only difference from -std=c++11 is support for return type deduction in normal functions as proposed in N3386.
New thread_local Keyword
g++ now implements the C++11 thread_local keyword. In comparison with the GNU __thread keyword, thread_local allows dynamic initialization and destruction semantics.
thread_local keyword has currently one important limitation: when the dlclose() function is used to unload a dynamically loaded DSO that contains the definition of a thread_local object, the thread_local object is destroyed, its destructor is called and the DSO is unmapped from the address space of the process. If a thread in the process tries to access the thread_local object after this, the program may terminate unexpectedly. As a result, the programmer may have to take extra care to ensure that thread_local objects in a DSO are not referred after it has been unloaded.
Dynamic Initialization of Thread-local Variables
-fno-extern-tls-init option.
g++ uses the -fextern-tls-init option.
C++11 Attribute Syntax
g++ now implements the C++11 attribute syntax, for example:
[[noreturn]] void f();C++11 Alignment Specifier
g++ now implements the C++11 alignment specifier, for example:
alignas(double) int i;
.mod files) has been incremented. Fortran modules compiled by earlier GCC versions have to be recompiled when they are used by files compiled with GCC 4.8, as this version of GCC is not able to read .mod files created by earlier versions; attempting to do so fails with an error message.
Note
- Procedure pointers. Note that C-interoperable function pointers (
type(c_funptr)) are not affected, nor are procedure-pointer components. - Deferred-length character strings.
BACKTRACE Intrinsic
BACKTRACE, has been added. This subroutine shows a backtrace at an arbitrary place in user code, program execution continues normally afterwards.
Floating Point Numbers with “q” as Exponential
q for the exponential (such as 4.0q0) is now supported as a vendor extension for better compatibility with old data files. It is strongly recommended to use the equivalent but standard conforming e (such as 4.0e0) for I/O.
q in floating-point literals by a kind parameter (such as 4.0e0_qp with a suitable qp). Note that — in Fortran source code — replacing q with a simple e is not equivalent.
GFORTRAN_TMPDIR Environment Variable
GFORTRAN_TMPDIR environment variable for specifying a non-default directory for files opened with STATUS="SCRATCH", is not used anymore. Instead, gfortran checks the POSIX/GNU standard TMPDIR environment variable and if TMPDIR is not defined, gfortran falls back to other methods to determine the directory for temporary files as documented in the user manual.
Fortran 2003
CLASS(*)) has been added. Non-constant character lengths are not yet supported.
TS 29113
TYPE(*)) are now supported.
dimension(..)) has been added. Note that at the moment, the gfortran array descriptor is used, which is different from the array descriptor defined in TS 29113. For more information, see the header file of gfortran or use the Chasm language interoperability tools.
New Instructions
FXSR, XSAVE, and XSAVEOPT instructions. Corresponding intrinsics and built-in functions can now be enabled by using the -mfxsr, -mxsave, and -mxsaveopt command line options respectively.
RDSEED, ADCX, ADOX, and PREFETCHW instructions has been added and can be enabled by using the -mrdseed, -madx, and -mprfchw command line options.
New Built-in Functions to Detect Run-time CPU Type and ISA
__builtin_cpu_is(), has been added to detect if the run-time CPU is of a particular type. This function accepts one string literal argument with the CPU name, and returns a positive integer on a match and zero otherwise. For example, __builtin_cpu_is("westmere") returns a positive integer if the run-time CPU is an Intel Core i7 Westmere processor. For a complete list of valid CPU names, see the user manual.
__builtin_cpu_supports(), has been added to detect if the run-time CPU supports a particular ISA feature. This function accepts one string literal argument with the ISA feature, and returns a positive integer on a match and zero otherwise. For example, __builtin_cpu_supports("ssse3") returns a positive integer if the run-time CPU supports SSSE3 instructions. For a complete list of valid ISA names, see the user manual.
Important
IFUNC initialization, then the CPU detection initialization must be explicitly run using this newly provided built-in function, __builtin_cpu_init(). The initialization needs to be done only once. For example, the following is sample invocation inside an IFUNC initializer:
static void (*some_ifunc_resolver(void))(void) { __builtin_cpu_init(); if (__builtin_cpu_is("amdfam10h") ... if (__builtin_cpu_supports("popcnt") ... }
Function Multiversioning
__attribute__ ((target ("default"))) int foo () { return 0; } __attribute__ ((target ("sse4.2"))) int foo () { return 1; } __attribute__ ((target ("arch=atom"))) int foo () { return 2; }
foo() is executed, the result returned depends upon the architecture where the program runs, not the architecture where the program was compiled. See the GCC Wiki for more details.
New RTM and HLE Intrinsics
-mrtm and -mhle command line options. This is done via intrinsics for Restricted Transactional Memory (RTM) and extensions to the memory model for Hardware Lock Elision (HLE).
- __ATOMIC_HLE_ACQUIRE
- Starts lock elision on a lock variable. The memory model in use must be
__ATOMIC_ACQUIREor stronger. - __ATOMIC_HLE_RELEASE
- Ends lock elision on a lock variable. The memory model must be
__ATOMIC_RELEASEor stronger.
while (__atomic_exchange_n (& lockvar, 1, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE)) _mm_pause (); // work with the acquired lock __atomic_clear (& lockvar, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
unsigned _xbegin (void)- Attempts to start a transaction. If it succeeds, this function returns
_XBEGIN_STARTED, otherwise it returns a status value indicating why the transaction could not be started. void _xend (void)- Commits the current transaction. When no transaction is active, this function causes a fault. All memory side effects of the transactions become visible to other threads in an atomic manner.
int _xtest (void)- Returns a non-zero value if a transaction is currently active, or zero if it is not.
void _xabort (unsigned char status)- Aborts the current transaction. When no transaction is active, this is a no-op. The parameter
statusis included in the return value of any_xbegin()call that is aborted by this function.
if ((status = _xbegin ()) == _XBEGIN_STARTED) { // some code _xend (); } else { // examine the status to see why the transaction failed and possibly retry }
Transactions Using Transactional Synchronization Extensions
-fgnu-tm option) of GCC can now be run using Transactional Synchronization Extensions (TSX) if available on x86 hardware.
Support for AMD Family 15h Processors
-march=bdver3 option.
Support for AMD Family 16h Processors
-march=btver2 option.
-std=c++11 or -std=gnu++11 command line options. However, there is no guarantee for compatibility between C++11 code compiled by different versions of the compiler. Refer to Section B.2.2.3.1, “C++ ABI” for details.
libstdc++, supports a majority of the C++11 features. However, there is no or only partial support for some features such as certain properties on type traits or regular expressions. For details, refer to the libstdc++ documentation, which also lists implementation-defined behavior.
exception_ptr and future requires changes to the exception handling runtime in the system libstdc++ package. These changes will be distributed through the normal Z-stream channel. Application of all Red Hat Enterprise Linux errata may be required to see correct runtime functionality when using these features.
-std=c1x and -std=gnu1x command line options, gcc now accepts -std=c11 and -std=gnu11. Note that since this support is experimental, it may change incompatibly in future releases.
__STDC_UTF_16__ and __STDC_UTF_32__), nonreturning functions (_Noreturn and <stdnoreturn.h>), and alignment support (_Alignas, _Alignof, max_align_t, and <stdalign.h>).
- The GCC compilers support the OpenMP API specification for parallel programming, version 3.1. Refer to the OpenMP website for more information about this specification.
- The C++11 and C11 standards provide programming abstractions for multi-threaded programs. The respective standard libraries include programming abstractions for threads and thread-related features such as locks, condition variables, or futures. These new versions of the standard also define a memory model that precisely specifies the runtime behavior of a multi-threaded program, such as the guarantees provided by compilers and the constraints programmers have to pay attention to when writing multi-threaded programs.Note that support for the memory model is still experimental (see below for details). For more information about the status of support for C++11 and C11, refer to Section B.2.2.1.1, “C++11” and Section B.2.2.1.2, “C11” respectively.
C++11 Types and GCC Built-ins for Atomic Memory Access
atomic<T>, where T is the non-atomic base type and must be trivially copyable (for example, atomic<int> is an atomic integer). GCC does not yet support any base type T, but only those that can be accessed atomically with the atomic instructions offered by the target architecture. This is not a significant limitation in practice, given that atomics are primarily designed to expose hardware primitives in an architecture-independent fashion; pointers and integrals that are not larger than a machine word on the target are supported as base types. Using base types that are not yet supported results in link-time errors.
__sync) are still supported.
Transactional Memory
libitm, then ensures this atomicity guarantee when executing the compiled program. Compared to atomic memory accesses, it is a higher-level programming abstraction, because it is not limited to single memory locations, does not require special data types for the data it modifies, and because transactions can contain arbitrary code and be nested within other transactions (with some restrictions explained subsequently).
__transaction_atomic or __transaction_relaxed keywords followed by a compound statement or expression, respectively. The following example illustrates how to increment a global variable y if another variable x has a value less than 10:
__transaction_atomic { if (x < 10) y++; }x and y and store to y, all these memory accesses are virtually executed as one indivisible step.
init(data);
__transaction_atomic { data_public = true;} // data_public is initially false__transaction_atomic { if (data_public) use(data); }__transaction_atomic { temp = copy(data); if (data_public) use(temp); }copy(data) races with init(data) in the initializing thread, because this can be executed even if data_public is not true. Another example for data races is one thread accessing a variable x transactionally and another thread accessing it nontransactionally at potentially the same time. Note that the data can be safely reclaimed using code like this (assuming only one thread ever does this):
__transaction_atomic { data_public = false; }
destruct(data);destruct() does not race with potential concurrent uses of the data because after the transaction finishes, it is guaranteed that data_public is false and thus data is private. See the specification and the C++11 memory model for more background information about this.
__transaction_atomic) and relaxed transactions (__transaction_relaxed). The former guarantee atomicity with regard to all other code, but allow only code that is known to not include nontransactional kinds of synchronization, such as atomic or volatile memory access. In contrast, relaxed transactions allow all code (for example calls to I/O functions), but only provide atomicity with regard to other transactions. Therefore, atomic transactions can be nested within other atomic and relaxed transactions, but relaxed transactions can only be nested within other relaxed transactions. Furthermore, relaxed transactions are likely to be executed with less performance, but this depends on the implementation and available hardware.
transaction_safe function attribute to the declarations of these functions and by including this declaration when defining the function. In turn, GCC then verifies that the code in these functions is safe for atomic transactions and generates code accordingly. If the programmer does not follow these constraints and/or steps, compile-time or link-time errors occur. Note that within a compilation unit, GCC detects automatically whether a function is safe for use within transactions, and the attributes therefore typically do not need to be added. See the draft specification linked above for further details.
libitm is still experimental, and both the ABI and API could change in the future if this is required due to the evolution of the specification of the language constructs, or due to implementation requirements. Note that when executing applications built with the -fgnu-tm command line option, it is currently a prerequisite to also have the appropriate version of the libitm.so.1 shared library installed.
Table B.1. Processor Optimization Options
| Option | Description |
|---|---|
-march=core2 and -mtune=core2
| Optimization for Intel Core 2 processors. |
-march=corei7 and -mtune=corei7
| Optimization for Intel Core i3, i5, and i7 processors. |
-march=corei7-avx and -mtune=corei7-avx
| Optimization for Intel Core i3, i5, and i7 processors with AVX. |
-march=core-avx-i
| Optimization for the Intel processor code-named Ivy Bridge with RDRND, FSGSBASE, and F16C. |
-march=core-avx2
| Optimization for a next-generation processor from Intel with AVX2, FMA, BMI, BMI2, and LZCNT. |
-march=bdver2 and -mtune=bdver2
| Optimization for AMD Opteron processors code-named Piledriver. |
-march=btver1 and -mtune=btver1
| Optimization for AMD family 14 processors code-named Bobcat. |
-march=bdver1 and -mtune=bdver1
| Optimization for AMD family 15h processors code-named Bulldozer. |
Table B.2. Support for Processor-specific Intrinsics and Instructions
| Option | Description |
|---|---|
-mavx2
| Support for Intel AVX2 intrinsics, built-in functions, and code generation. |
-mbmi2
| Support for Intel BMI2 intrinsics, built-in functions, and code generation. |
-mlzcnt
|
Implementation and automatic generation of __builtin_clz* using the lzcnt instruction.
|
-mfma
| Support for Intel FMA3 intrinsics and code generation. |
-mfsgsbase
| Enables the generation of new segment register read/write instructions through dedicated built-ins. |
-mrdrnd
|
Support for the Intel rdrnd instruction.
|
-mf16c
| Support for two additional AVX vector conversion instructions. |
-mtbm
| Support for TBM (Trailing Bit Manipulation) built-in functions and code generation. |
-mbmi
| Support for AMD's BMI (Bit Manipulation) built-in functions and code generation. |
-mcrc32
|
Support for crc32 intrinsics.
|
-mmovbe
|
Enables the use of the movbe instruction to implement __builtin_bswap32 and __builtin_bswap64.
|
-mxop, -mfma4, and -mlwp
| Support for the XOP, FMA4, and LWP instruction sets for the AMD Orochi processors. |
-mabm
|
Enables the use of the popcnt and lzcnt instructions on AMD processors.
|
-mpopcnt
|
Enables the use of the popcnt instruction on both AMD and Intel processors.
|
-fexcess-precision=standard and disabled by -fexcess-precision=fast. This feature is enabled by default when using standards conformance options such as -std=c99.
vector long long or vector long are passed and returned using the same method as other vectors with the VSX instruction set. Previously GCC did not adhere to the ABI for 128-bit vectors with 64-bit integer base types (see GCC PR 48857).
-mrecip command line option has been added, which indicates whether the reciprocal and reciprocal square root instructions should be used.
-mveclibabi=mass command line option has been added. This can be used to enable the compiler to auto-vectorize mathematical functions using the Mathematical Acceleration Subsystem library.
-msingle-pic-base command line option has been added, which instructs the compiler to avoid loading the PIC base register in function prologues. The PIC base register must be initialized by the runtime system.
-mblock-move-inline-limit command line option has been added, which enables the user to control the maximum size of inlined memcpy calls and similar.
-flto option needs to be specified at both compile time and link time. For further details, including interoperability with linkers and parallel execution of LTO, refer to the documentation for -flto in the GCC 4.7.0 Manual. Also note that the internal representation is not a stable interface, so LTO will only apply to code generated by the same version of GCC.
Note
-flto and the -g options together is unsupported in Red Hat Developer Toolset.
-Ofast is now supported as a general optimization level. It operates similar to -O3, adds options that can yield better-optimized code, but in turn might invalidate standards compliance (for example, -ffast-math is enabled by -Ofast).
const, pure, and noreturn to functions declared in header files. Use the -Wsuggest-attribute=[const|pure|noreturn] command line option to enable this.
-Wall).
abort() or memcpy()) must be declared with extern "C" to be considered as a redeclaration, otherwise it is ill-formed.
Duplicate Member
struct declaration:
struct A { int *a; union { struct { int *a; }; }; };
.a actually refers to and one of the fields therefore needs to be renamed.
Header Dependency Changes
<iostream>, <string>, and other STL headers that previously included <unistd.h> as an implementation detail (to get some feature macros for gthr*.h purposes) no longer do so, because it was a C++ standard violation. This can result in diagnostic output similar to the following:
error: ‘truncate’ was not declared in this scope error: ‘sleep’ was not declared in this scope error: ‘pipe’ was not declared in this scope error: there are no arguments to 'offsetof' that depend on a template parameter, so a declaration of 'offsetof' must be available
#include <unistd.h><cstddef> to get namespace-std-scoped versions of size_t and ptrdiff_t. As such, C++ programs that used the macros NULL or offsetof without including <cstddef> will no longer compile. The diagnostic produced is similar to the following:
error: 'ptrdiff_t' does not name a type error: 'size_t' has not been declared error: 'NULL' was not declared in this scope error: there are no arguments to 'offsetof' that depend on a template parameter, so a declaration of 'offsetof' must be available
#include <cstddef>Name Lookup Changes
- is either in scope at the point of the template's definition, or
- can be found by argument-dependent lookup at the point of instantiation.
template<typename T> int t(T i) { return f(i); } int f(int i) { return i; } int main() { return t(1); }
In instantiation of ‘int t(T) [with T = int]’ required from here error: ‘f’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] note: ‘int f(int)’ declared here, later in the translation unit
f() before the definition of template function t(). The -fpermissive compiler flag turns compile-time errors into warnings and can be used as a temporary workaround.
Uninitialized const
struct A { int a; A (); }; struct B : public A { }; const B b;
error: uninitialized const ‘b’ [-fpermissive] note: ‘const struct B’ has no user-provided default constructor
B does not have a user-provided default constructor. Either an initializer needs to be provided, or the default constructor needs to be added.
Visibility of Template Instantiations
std::vector with hidden user defined types such as struct my_hidden_struct can now expect hidden visibility for std::vector<my_hidden_struct> symbols. As a result, users that compile with the -fvisibility=hidden command line option should be aware of the visibility of types included from the library headers used. If the header does not explicitly control symbol visibility, types from those headers will be hidden, along with instantiations that use those types. For instance, consider the following code:
#include <vector> // template std::vector has default visibility #include <ctime> // struct tm has hidden visibility template class std::vector<tm>; // instantiation has hidden visibility
<foo.h> is to create a forwarding header on the -I include path consisting of the following:
#pragma GCC visibility push(default) #include_next <foo.h> #pragma GCC visibility push
User-defined Literal Support
-std={c++11,c++0x,gnu++11,gnu++0x} command line option, GCC 4.7.0 and later, unlike older versions, supports user-defined literals, which are incompatible with some valid ISO C++03 code. In particular, white space is now needed after a string literal before something that could be a valid user defined literal. Consider the following code:
const char *p = "foobar"__TIME__;
__TIME__ macro expands to some string literal and is concatenated with the other one. In C++11, __TIME__ is not expanded and instead, operator "" __TIME__ is being looked up, which results in a warning like:
error: unable to find string literal operator ‘operator"" __TIME__’
Taking the Address of Temporary
struct S { S (); int i; }; void bar (S *); void foo () { bar (&S ()); }
-fpermissive compiler flag turns compile-time errors into warnings and can be used as a temporary workaround.
Miscellaneous
__cplusplus to the correct value: 199711L for C++98/03, and 201103L for C++11.
struct A { A(); }; struct B : A { int i; }; const B b = B();
typedef names used in a template, which may cause G++ to reject some ill-formed code that was accepted by earlier releases. The -fno-access-control option can be used as a temporary workaround until the code is corrected.
- the injected-class-name is not accessible because it is from a private base, or
- the injected-class-name cannot be used as an argument for a template parameter.
-fno-access-control, the second is only rejected with -pedantic.
-Wall option. Although these warnings do not result in a compilation failure on their own, often -Wall is used in conjunction with -Werror, causing these warnings to act like errors. This section provides a list of these new or newly enabled warnings. Unless noted otherwise, these warnings apply to both C and C++.
-Wall command line option has changed and now includes the new warning flags -Wunused-but-set-variable and, with -Wall -Wextra, -Wunused-but-set-parameter. This may result in new warnings in code that compiled cleanly with previous versions of GCC. For example, consider the following code:
void fn (void) { int foo; foo = bar (); /* foo is never used. */ }
warning: variable "foo" set but not used [-Wunused-but-set-variable]
__attribute__((__unused__)). As a workaround, you can use the -Wno-error=unused-but-set-variable or -Wno-error=unused-but-set-parameter command line option.
-Wenum-compare option causes GCC to report a warning when values of different enum types are being compared. Previously, this option only worked for C++ programs, but now it works for C as well. This warning is enabled by -Wall and may be avoided by using a type cast.
-Wno-int-to-pointer-cast option, which is available for both C and C++.
-Wconversion. To disable these warnings, use the new -Wno-conversion-null command line option.
delete. This is unsafe to do because the pointer might refer to a base class that does not have a virtual destructor. The warning is enabled by -Wall and by a new command line option, -Wdelete-non-virtual-dtor.
-Wc++11-compat and -Wc++0x-compat options are now available. These options cause GCC to display a warning about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011 (such as identifiers in ISO C++ 1998 that are keywords in ISO C++ 2011). This warning is enabled by -Wall and enables the -Wnarrowing option.
- A new compile flag
-fstack-arrayshas been added. This flag causes all local arrays to be put on stack memory, which can significantly improve the performance of some programs. Note that programs that use very large local arrays may require you to extend your runtime limits for stack memory. - Compile time has been significantly improved. For example, the improvement may be noticeable when working with programs that use large array constructors.
- To improve code generation and diagnostics, the
-fwhole-filecompile flag is now enabled by default, and can be used with a newly supported-fwhole-programflag. To disable it, use the deprecated-fno-whole-fileflag. - A new command line option
-Mis now supported. Similarly togcc, this option allows you to generate Makefile dependencies. Note that the-cppoption may be required as well. - The
-finit-real=command line option now supportssnanas a valid value. This allows you to initialize REAL and COMPLEX variables with a signaling NaN (not a number), and requires you to enable trapping (for example, by using the-ffpe-trap=command line option). Note that compile-time optimizations may turn a signaling NaN into a quiet NaN. - A new command line option
-fcheck=has been added. This option accepts the following arguments:- The
-fcheck=boundsoption is equivalent to the-fbounds-checkcommand line option. - The
-fcheck=array-tempsoption is equivalent to the-fcheck-array-temporariescommand line option. - The
-fcheck=dooption checks for invalid modification of loop iteration variables. - The
-fcheck=recursiveoption checks for recursive calls to subroutines or functions that are not marked as recursive. - The
-fcheck=pointeroption performs pointer association checks in calls, but does not handle undefined pointers nor pointers in expressions. - The
-fcheck=alloption enables all of the above options.
- A new command line option
-fno-protect-parenshas been added. This option allows the compiler to reorder REAL and COMPLEX expressions with no regard to parentheses. - When OpenMP's
WORKSHAREis used, array assignments andWHEREwill now be run in parallel. - More Fortran 2003 and Fortran 2008 mathematical functions can now be used as initialization expressions.
- The
GCC$compiler directive now enables support for some extended attributes such asSTDCALL.
- The
-Ofastcommand line option now automatically enables the-fno-protect-parensand-fstack-arraysflags. - Front-end optimizations can now be disabled by the
-fno-frontend-optimizeoption, and selected by the-ffrontend-optimizeoption. The former is essentially only desirable if invalid Fortran source code needs to be compiled (for example, when functions—as compared to subroutines—have side-effects) or to work around compiler bugs. - The
GFORTRAN_USE_STDERRenvironment variable has been removed, and GNU Fortran now always prints error messages to standard error. - The
-fdump-corecommand line option and theGFORTRAN_ERROR_DUMPCOREenvironment variable have been removed. When encountering a serious error, GNU Fortran now always aborts the execution of the program. - The
-fbacktracecommand line option is now enabled by default. When a fatal error occurs, GNU Fortran now attempts to print a backtrace to standard error before aborting the execution of the program. To disable this behavior, use the-fno-backtraceoption. - GNU Fortran no longer supports the use of the
-Mcommand line option to generate Makefile dependencies for the module path. To perform this operation, use the-Joption instead. - To significantly reduce the number of warnings, the
-Wconversioncommand line option now only displays warnings when a conversion leads to information loss, and a new command line option-Wconversion-extrahas been added to display warnings about other conversions. The-Wconversionoption is now enabled with-Wall. - A new command line option
-Wunused-dummy-argumenthas been added. This option can be used to display warnings about unused dummy arguments, and is now enabled with-Wall. Note that the-Wunused-variableoption previously also warned about unused dummy arguments. - The
COMMONdefault padding has been changed. Previously, the padding was added before a variable. Now it is added after a variable to increase the compatibility with other vendors, as well as to help to obtain the correct output in some cases. Note that this behavior is in contrast with the behavior of the-falign-commonsoption. - GNU Fortran no longer links against the
libgfortranbeginlibrary. TheMAIN__assembler symbol is the actual Fortran main program and is invoked by themainfunction, which is now generated and put in the same object file asMAIN__. Note that thelibgfortranbeginlibrary is still present for backward compatibility.
- Improved but still experimental support for polymorphism between libraries and programs and for complicated inheritance patterns.
- Generic interface names which have the same name as derived types are now supported, which allows the creation of constructor functions. Note that Fortran does not support static constructor functions; only default initialization or an explicit structure-constructor initialization are available.
- Automatic (re)allocation: In intrinsic assignments to allocatable variables, the left-hand side will be automatically allocated (if unallocated) or reallocated (if the shape or type parameter is different). To avoid the small performance penalty, you can use
a(:) = ...instead ofa = ...for arrays and character strings — or disable the feature using-std=f95or-fno-realloc-lhs. - Experimental support of the
ASSOCIATEconstruct has been added. - In pointer assignments it is now possible to specify the lower bounds of the pointer and, for a rank-1 or a simply contiguous data-target, to remap the bounds.
- Deferred type parameter: For scalar allocatable and pointer variables the character length can now be deferred.
- Namelist variables with allocatable attribute, pointer attribute, and with a non-constant length type parameter are now supported.
- Support has been added for procedure-pointer function results and procedure-pointer components (including PASS).
- Support has been added for allocatable scalars (experimental),
DEFERREDtype-bound procedures, and theERRMSG=argument of theALLOCATEandDEALLOCATEstatements. - The
ALLOCATEstatement now supports type-specs and theSOURCE=argument. - Rounding (
ROUND=,RZ, ...) for output is now supported. - The
INT_FAST{8,16,32,64,128}_Tformat forISO_C_BINDINGintrinsic module type parameters is now supported. OPERATOR(*)andASSIGNMENT(=)are now allowed asGENERICtype-bound procedures (i.e. as type-bound operators).
PASS attribute now have to use CLASS in line with the Fortran 2003 standard; the workaround to use TYPE is no longer supported.
- A new command line option
-std=f2008tshas been added. This option enables support for programs that conform to the Fortran 2008 standard and the draft Technical Specification (TS) 29113 on Further Interoperability of Fortran with C. For more information, refer to the Chart of Fortran TS 29113 Features supported by GNU Fortran. - The
DO CONCURRENTconstruct is now supported. This construct can be used to specify that individual loop iterations do not have any interdependencies. - Full single-image support except for polymorphic coarrays has been added, and can be enabled by using the
-fcoarray=singlecommand line option. Additionally, GNU Fortran now provides preliminary support for multiple images via an MPI-based coarray communication library. Note that the library version is not yet usable as remote coarray access is not yet possible. - The
STOPandERROR STOPstatements have been updated to support all constant expressions. - The
CONTIGUOUSattribute is now supported. - Use of
ALLOCATEwith theMOLDargument is now supported. - The
STORAGE_SIZEintrinsic inquiry function is now supported. - The
NORM2andPARITYintrinsic functions are now supported. - The following bit intrinsics have been added:
- the
POPCNTandPOPPARbit intrinsics for counting the number of 1 bits and returning the parity; - the
BGE,BGT,BLE, andBLTbit intrinsics for bitwise comparisons; - the
DSHIFTLandDSHIFTRbit intrinsics for combined left and right shifts; - the
MASKLandMASKRbit intrinsics for simple left and right justified masks; - the
MERGE_BITSbit intrinsic for a bitwise merge using a mask; - the
SHIFTA,SHIFTL, andSHIFTRbit intrinsics for shift operations; - the transformational bit intrinsics
IALL,IANY, andIPARITY.
- The
EXECUTE_COMMAND_LINEintrinsic subroutine is now supported. - The
IMPUREattribute for procedures is now supported. This allows the use ofELEMENTALprocedures without the restrictions ofPURE. - Null pointers (including
NULL()) and unallocated variables can now be used as an actual argument to optional non-pointer, non-allocatable dummy arguments, denoting an absent argument. - Non-pointer variables with the
TARGETattribute can now be used as an actual argument toPOINTERdummies withINTENT(IN). - Pointers that include procedure pointers and those in a derived type (pointer components) can now also be initialized by a target instead of only by
NULL. - The
EXITstatement (with construct-name) can now be used to leave theASSOCIATE,BLOCK,IF,SELECT CASE, andSELECT TYPEconstructs in addition toDO. - Internal procedures can now be used as actual arguments.
- The named constants
INTEGER_KINDS,LOGICAL_KINDS,REAL_KINDS, andCHARACTER_KINDSof the intrinsic moduleISO_FORTRAN_ENVhave been added. These arrays contain the supported 'kind' values for the respective types. - The
C_SIZEOFmodule procedures of theISO_C_BINDINGSintrinsic module and theCOMPILER_VERSIONandCOMPILER_OPTIONSmodule procedures of theISO_FORTRAN_ENVintrinsic module have been implemented. - The
OPENstatement now supports theNEWUNIT=option. This option returns a unique file unit and therefore prevents inadvertent use of the same unit in different parts of the program. - Unlimited format items are now supported.
- The
INT{8,16,32}andREAL{32,64,128}format forISO_FORTRAN_ENVintrinsic module type parameters are now supported. - It is now possible to use complex arguments with the
TAN,SINH,COSH,TANH,ASIN,ACOS, andATANfunctions. Additionally, the new functionsASINH,ACOSH, andATANHhave been added for real and complex arguments, andATAN(Y,X)now serves as an alias forATAN2(Y,X). - The
BLOCKconstruct has been implemented.
-std=c++11 option is supported in Red Hat Developer Toolset 2.0 only when all C++ objects compiled with that flag have been built using the same major version of Red Hat Developer Toolset. The mixing of objects, binaries and libraries, built by the Red Hat Enterprise Linux 5 or 6 system toolchain GCC using the -std=c++0x or -std=gnu++0x flags, with those built with the -std=c++11 or -std=gnu++11 flags using the GCC in Red Hat Developer Toolset is explicitly not supported.
-std=c++11 or -std=gnu++11 options cannot be guaranteed, and so is not supported.
-std=c++98) can be freely mixed with binaries and shared libraries built by the Red Hat Enterprise Linux 5 or 6 system toolchain GCC. Red Hat recommends use of this default -std=c++98 mode for production software development.
Important
-Wabi will now display a warning about code that uses the old mangling.
strlen(), strchr(), strcpy(), strcat() and stpcpy() (as well as their respective _FORTIFY_SOURCE variants) by transforming them into custom, faster code. This means that there might be fewer or other calls to those functions than in the original source code. The optimization is enabled by default at -O2 or higher optimization levels. It is disabled when using -fno-optimize-strlen or when optimizing for size.
-fomit-frame-pointer is now enabled by default. The prior default setting can be chosen by using the -fno-omit-frame-pointer command line option.
-fexcess-precision=fast.
-gdwarf-2 -gstrict-dwarf or -gdwarf-3 -gstrict-dwarf options (the latter are handled partially by versions of GDB older than 7.0).
-gdwarf-2 -gstrict-dwarf options with those tools.
Note
-flto and the -g options together is unsupported in Red Hat Developer Toolset.
gcc and g++ report an error when invalid command line options are used. In particular, when only linking and not compiling code, earlier versions of GCC ignored all options starting with --. For example, options accepted by the linker such as --as-needed and --export-dynamic are not accepted by gcc and g++ anymore, and should now be directed to the linker using -Wl,--as-needed or -Wl,--export-dynamic if that is intended.
-combine command line option is not accepted anymore.
as), GNU linker (ld), and other binary tools that are part of binutils are now released under the GNU General Public License, version 3.
gold, is now available in addition to ld, the existing GNU linker. gold is intended to be a drop-in replacement for ld, so ld's documentation is intended to be the reference documentation. gold supports most of ld's features, except notable ones such as MRI-compatible linker scripts, cross-reference reports (--cref), and various other minor options. It also provides significantly improved link time with very large C++ applications.
gold linker is not enabled by default. Users can explicitly switch between ld and gold by using the alternatives mechanism.
Changes Since Red Hat Enterprise Linux 6.4
- A new
INPUT_SECTION_FLAGSkeyword has been added to the linker script language. This keyword can be used to select input sections by section header flags. - A new
SORT_BY_INIT_PRIORITYkeyword has been added to the linker script language. This keyword can be used to sort sections by numerical value of the GCCinit_priorityattribute encoded in the section name. - A new
SORT_NONEkeyword has been added to the linker script language. This keyword can be used to disable section sorting. - A new linker-provided symbol,
__ehdr_start, has been added. When producing ELF output, this symbol points to the ELF file header (and nearby program headers) in the program's memory image.
Changes Since Red Hat Enterprise Linux 5.9
- GNU/Linux targets now support the
STB_GNU_UNIQUEsymbol binding, a GNU extension to the standard set of ELF symbol bindings. The binding is passed on to the dynamic linker, which ensures that in the entire process there is only one symbol with the given name and type in use.Note
The implementation of this feature depends on capabilities only found in newer versions of theglibclibrary. Consequently, this feature is currently available in Red Hat Developer Toolset for Red Hat Enterprise Linux 6. - A new command line option
--no-export-dynamichas been added. This option can be used to undo the effect of the-Eand--export-dynamicoptions. - A new command line option
--warn-alternate-emhas been added. This option can be used to display a warning if an ELF format object file uses an alternate machine code. - A new linker script function
REGION_ALIAShas been added. This function can be used to create alias names of memory regions. - A new command line option
-Ttext-segmenthas been added for ELF-based targets. This option can be used to set the address of the first byte of the text segment.address - A new linker script command
INSERThas been added. This command can be used to augment the default script. - In a linker script input section, it is now possible to specify a file within an archive by using the
syntax.archive:file - The
--sort-commoncommand line option now acceptsascendinganddescendingas optional arguments. This can be used to specify which sorting order to use. - A new command line option
--build-idhas been added for ELF-based targets. This option can be used to generate a unique per-binary identifier embedded in a note section. - A new command line option
--default-script=(orfile_name-dT) has been added. This option can be used to specify a replacement for the built-in linker script.file_name - A new command line option
-Bsymbolic-functionshas been added. When creating a shared library, this option will cause references to global function symbols to be bound to the definitions with the shared library, if such exist. - The new command line options
--dynamic-list-cpp-newand--dynamic-list-datahave been added, which can be used to modify the dynamic list.
Changes Since Red Hat Enterprise Linux 6.4
- The
--copy-dt-needed-entriescommand line option is no longer enabled by default. Instead,--no-copy-dt-needed-entriesis now the default option. - Evaluation of linker script expressions has been significantly improved. Note that this can negatively affect scripts that rely on undocumented behavior of the old expression evaluation.
Changes Since Red Hat Enterprise Linux 5.9
- The
--add-neededcommand line option has been renamed to--copy-dt-needed-entriesin order to avoid confusion with the--as-neededoption. - For GNU/Linux systems, the linker no longer processes any relocations made against symbols of the
STT_GNU_IFUNCtype. Instead, it emits them into the resulting binary for processing by the loader.Note
The implementation of this feature depends on capabilities only found in newer versions of theglibclibrary. Consequently, this feature is currently available in Red Hat Developer Toolset for Red Hat Enterprise Linux 6. - The
--as-neededcommand line option has been adapted to link in a dynamic library in the following two cases:- if the dynamic library satisfies undefined symbols in regular objects, and
- if the dynamic library satisfies undefined symbols in other dynamic libraries unless the library is already found in a
DT_NEEDEDentry of one of the libraries that are already linked.
- The
-l:command line option now searches the library path for a file name calledfile_namefile_namewithout adding the.aor.sofile extension.
Changes Since Red Hat Enterprise Linux 6.4
- The GNU Assembler no longer requires double ampersands in macros.
- A new
--compress-debug-sectionscommand line option has been added to enable compression of DWARF debug information sections in the relocatable output file. Compressed debug sections are currently supported by thereadelf,objdump, andgoldtools, but not byld. - Support for
.bundle_align_mode,.bundle_lock, and.bundle_unlockdirectives for x86 targets has been added.. - On x86 architectures, the GNU Assembler now allows
rep bsf,rep bsr, andrep retsyntax.
Changes Since Red Hat Enterprise Linux 5.9
- GNU/Linux targets now support
gnu_unique_objectas a value of the.typepseudo operation. This value can be used to mark a symbol as globally unique in the entire process. - Support for the new discriminator column in the DWARF line table with a discriminator operand for the
.locdirective has been added. - The
.typepseudo operation now accepts a type ofSTT_GNU_IFUNC. This can be used to indicate that if the symbol is the target of a relocation, its value should not be used. Instead, the function should be invoked and its result used as the value. - A new pseudo operation
.cfi_val_encoded_addrhas been added. This pseudo operation can be used to record constant addresses in unwind tables without runtime relocation. - A new command line option
-msse-check=[none|error|warning]has been added for x86 targets. - The
-acommand line option now acceptsgas a valid sub-option. This combination can be used to enable assembly listings with additional information about the assembly, including the list of supplied command line options or the assembler version. - A new command line option
-msse2avxhas been added for x86 targets. This option can be used to encode SSE instructions with VEX prefix. - x86 targets now support the Intel XSAVE, EPT, MOVBE, AES, PCLMUL, and AVX/FMA instructions.
- New command line options
-march=,cpu[,+extension…]-mtune=,cpu-mmnemonic=[att|intel],-msyntax=[att|intel],-mindex-reg,-mnaked-reg, and-mold-gcchave been added for x86 targets. - New pseudo operations
.string16,.string32, and.string64have been added. These pseudo operations be used to generate wide character strings. - The i386 port now supports the SSE5 instruction set.
- A new pseudo operation
.relochas been added. This pseudo operation serves as a low-level interface for creating relocations.
Changes Since Red Hat Developer Toolset 1.1
- A manual page for the
dwputility has been added. - The binary tools now provide support for the AMD Family 15h processors, models 02h and 10-1fh.
Changes Since Red Hat Enterprise Linux 6.4
- Support for
dwz -moptimized debug information has been added. - The devtoolset-2-binutils-devel package now provides the
demangle.hheader file.
Changes Since Red Hat Enterprise Linux 5.9
- “Thin” archives are now supported. Instead of containing object files, such archives contain just pathnames pointing to those files.
- The i386 port now supports the SSE5 instruction set.
Changes Since Red Hat Enterprise Linux 5.9
- The
--as-neededcommand line option has been adapted to link in a dynamic library in the following two cases:- if the dynamic library satisfies undefined symbols in regular objects, and
- if the dynamic library satisfies undefined symbols in other dynamic libraries unless the library is already found in a
DT_NEEDEDentry of one of the libraries that are already linked.
- In the
libdwlibrary, theDW_LANG_Objcconstant has been correctly renamed toDW_LANG_ObjC. Note that any existing source code that uses the old name needs to be updated accordingly. - The
libdwlibrary now supports new constantsDW_ATE_UTFandDW_OP_GNU_parameter_ref. In addition, it also defines a family of constants to support the.debug_macrosection, namelyDW_MACRO_GNU_define,DW_MACRO_GNU_undef,DW_MACRO_GNU_start_file,DW_MACRO_GNU_end_file,DW_MACRO_GNU_define_indirect,DW_MACRO_GNU_undef_indirect, andDW_MACRO_GNU_transparent_include. - When working with the
libelflibrary, bothelf32_xlatetomdandelf64_xlatetomdnow work for cross-endian ELF note data. - The
elf_getshdr()function provided by thelibelflibrary has been corrected to work consistently on non-mmapped ELF files after making theelf_cntl(ELF_C_FDREAD)function call. - The
libelflibrary now supportsararchives with a 64-bit symbol table. - The
eu-readelfcommand is now able to display the contents of the.debug_macrosection. - The
eu-readelfcommand now correctly recognizes theDW_OP_GNU_parameter_refDWARF GNU extension opcode in location expressions.
- The
libdwlibrary now handles compressed debuginfo sections. Thedwarf_highpc()function now handles the DWARF 4DW_AT_high_pcconstant form.
- DWARF 4 is now supported. As well, support for
DW_OP_GNU_implicit_pointerandSTB_GNU_UNIQUEhas been added. - The
libdwfllibrary now supports automatic decompression of files compressed withgzip,bzip2andlzma, and of Linux kernel images made withgzip,bzip2orlzma. Files named with compression suffixes are searched for Linux kernel images. Core file support was improved. Support has been added for decoding DWARF CFI into location description form. Support has been added for some new DWARF 3 expression operations, which were previously omitted. A new function,dwfl_dwarf_line(), has been added. - The
libdwlibrary now has new functionsdwarf_next_unit(),dwarf_offdie_types(),dwarf_lineisa(),dwarf_linediscriminator(),dwarf_lineop_index(),dwarf_getlocation_implicit_pointer(), anddwarf_aggregate_size(). - The
libelflibrary now supports using more than 65536 program headers in a file. In addition, a new functionelf_getphdrnum()has been added. libcpuIntel SSE4 disassembler support has been added.
dwz included in Red Hat Developer Toolset 1.1:
- The
DW_FORM_data4,DW_FORM_data8, andDW_AT_high_pcattributes have been optimized. - The
dwzutility now allocates more memory when recomputing abbreviations and no longer terminates unexpectedly. - The
dwzutility no longer crashes when processing debugging information that contains several copies of the same Debugging Information Entry (DIE) within the same compilation unit. - The
dwzutility no longer writes an incorrectDW_FORMcode for a compilation unit version. - The
dwzutility now supports version 8 of the.gdb_indexsection.
- Target
recordhas been renamed torecord-full. Consequently, you can now use therecord fullcommand to record or replay an execution log. In addition, the following commands have been renamed:- The
set record insn-number-maxandshow record insn-number-maxcommands have been renamed toset record full insn-number-maxandshow record full insn-number-max. - The
set record memory-queryandshow record memory-querycommands have been renamed toset record full memory-queryandshow record full memory-query. - The
set record stop-at-limitandshow record stop-at-limitcommands have been renamed toset record full stop-at-limitandshow record full stop-at-limit.
- A new record target,
record-btrace, has been added. This target uses hardware support to record the control flow of a process and can be enabled by using therecord btracecommand. This record target does not support replaying the execution.Important
Therecord-btracetarget is only available on Intel Atom processors and requires the Linux kernel in version 2.6.32 or later. - New
record instruction-historyandrecord function-call-historycommands have been added. These commands allow you to view information about an execution log without having to replay it. Therecord instruction-historycommand displays the execution history at instruction granularity and therecord function-call-historydisplays the execution history at function granularity. The commands are only supported by therecord btracecommand. - A new command line option,
-nh, has been added. This option allows you to disable automatic loading of the~/.gdbinitfile without disabling other initialization files. - The
-epochcommand line option has been removed. This option was used by GDB mode in Epoch, a deprecated clone of the Emacs text editor. - The
ptypeandwhatiscommands have been updated to accept an argument to control the type formatting. - The
info proccommand has been updated to work on some core files. - The
cdcommand has been enhanced and no longer requires a directory path as its first argument. When executed with no arguments, the command now changes to the home directory. - GDB now uses GNU v3 ABI as the default C++ ABI. This has been the default option for GCC since November 2000.
- The
info tracepointscommand has been enhanced to displayinstalled on targetornot installed on targetfor each non-pending location of a tracepoint. - A new command,
fo, has been added. This commands serves as a shorter variant of theforward-searchcommand. - A new command,
catch signal, has been added. This command can be used to catch signals by their names and is similar to thehandlecommand, but also allows you to attach additional conditions or commands. - A new command,
maint info bfds, has been added. This command can be used to list all binary files (BFDs) opened by GDB. - Two new commands,
python-interactive [and its shorter variantcommand]pi [, have been added. These commands allow you to start an interactive Python prompt or evaluate a Python command and print the results to standard output.command] - A new command,
py [, has been added. This command serves as a shorter variant of thecommand]python [command.command] - New
enable type-printer [andname...]disable type-printer [commands have been added. These commands allow you to enable or disable type printers.name...] - New
set print type methods on|offandshow print type methodscommands have been added. These commands allow you to control whether method declarations are displayed by theptypecommand. This functionality is enabled by default. - New
set print type typedefs on|offandshow print type typedefscommands have been added. These commands allow you to control whethertypedefdefinitions are displayed by theptypecommand. This functionality is enabled by default. - New
set filename-display basename|relative|absoluteandshow filename-displaycommands have been added. These commands allow you to control the way in which file names are displayed: thebasenameoption displays only the base name of a file name,relativedisplays a path relative to the compilation directory, andabsolutedisplays an absolute path to the file. The default option isrelativeto preserve the previous behavior. - New
set trace-buffer-sizeandshow trace-buffer-sizecommands have been added. These commands allow you to control the size of the trace buffer for a target. - New
set remote trace-buffer-size-packet auto|on|offandshow remote trace-buffer-size-packetcommands have been added. These commands allow you to control the use of the remote protocolQTBuffer:sizepacket. - New
set debug notificationandshow debug notificationcommands have been added. These commands allow you to control whether to display debugging information for asynchronous remote notification. This functionality is disabled by default. - New convenience functions
$_memeq(buf1, buf2, length),$_streq(str1, str2),$_strlen(str), and$_regex(str, regex)have been added.
- Users can now create vectors by using the
gdb.Type.vector()method. - The
atexit.register()method is now supported. - Users can now pretty-print types by using the Python API.
- In addition to Python 2.4 and later, GDB now also supports Python 3.
- A new class,
gdb.Architecture, has been added. This class exposes the internal representation of the architecture in the Python API. - A new method,
Frame.architecture, has been added. This method can be used to return thegdb.Architectureobject corresponding to the frame's architecture. - Frame filters and frame decorators have been added.
- A new async record,
=cmd-param-changed, has been added. This async record reports that a command parameter has changed. - A new async record,
=traceframe-changed, has been added. This async record reports that a trace frame has been changed by using thetfindcommand. - New async records
=tsv-created,=tsv-deleted, and=tsv-modifiedhave been added. These async records report that a trace state variable has been created, deleted, or modified. - New async records
=record-startedand=record-stoppedhave been added. These async records report that a process record has been started or stopped. - A new async record,
=memory-changed, has been added. This async record reports that the memory has changed. - When the source is requested, the
-data-disassemblecommand now includes a newfullnamefield containing an absolute path to the source file name. - A new optional parameter,
COUNT, has been added to the-data-write-memory-bytescommand. This parameter can be used to allow pattern filling of memory areas. - New commands
-catch-loadand-catch-unloadhave been added. These commands can be used to intercept shared libraryload/unloadevents. - The response to breakpoint commands and breakpoint async records now includes a new
installedfield. This field reports the current state of each non-pending tracepoint location: when the tracepoint is installed, the value of this field isy, otherwise the value isn. - The output of the
-trace-statuscommand now includes a newtrace-filefield. This field is only present when examining a trace file and contains the name of this file. - The
fullnamefiled is now always present along with thefilefield. This field is included even if GDB cannot find the file.
Table B.3. New Remote Packets
| Remote Packet | Description |
|---|---|
QTBuffer:size
|
Sets the size of the trace buffer. The remote stub reports support for this packet to the qSupported query.
|
Qbtrace:bts
|
Enables branch tracing based on Branch Trace Store (BTS) for the current thread. The remote stub reports support for this packet to the qSupported query.
|
Qbtrace:off
|
Disables branch tracing for the current thread. The remote stub reports support for this packet to the qSupported query.
|
qXfer:btrace:read
|
Reads the traced branches for the current thread. The remote stub reports support for this packet to the qSupported query.
|
qXfer:libraries-svr4:read's annex
|
The previously unused annex of the
qXfer:libraries-svr4:read packet is now used to support passing of an argument list. The remote stub reports support for this argument list to the qSupported query.
The defined arguments are
start and prev. These arguments are used to reduce work necessary for updating the library list and significantly speed up the process.
|
New Features
- Support for linespecs has been improved (in particular, a more consistent handling of ambiguous linespecs, some support for labels in the program's source, and FILE:LINE support now extends to further linespecs types). Breakpoints are now set on all matching locations in all inferiors and will be updated according to changes in the inferior.
- New inferior control commands
skip functionandskip filehave been added. These commands can be uses to skip certain functions and files when stepping. - The
info threadscommand now displays the thread name as set byprctlorpthread_setname_np. In addition, new commandsthread nameandthread findhave been added. Thethread namecommand accepts a name as an argument and can be used to set the name of the current thread. Thethread findcommand accepts a regular expression and allows the user to find threads that match it. - GDB now provides support for reading and writing a new
.gdb_indexsection. The commandgdb-add-indexcan be used to add.gdb_indexto a file, which allows GDB to load symbols from that file faster. Note that this feature is already present in Red Hat Enterprise Linux 6.1 and later. - The
watchcommand has been adapted to accept-locationas an optional argument. - Two new special values can now be used when specifying the current search path for
libthread_db:$sdirrepresents the default system locations of shared libraries, and$pdirstands for the directory with thelibthreadthat is used by the application. - A new command
info macroshas been added. This command accepts linespec as an optional argument and can be used to display the definitions of macros at that linespec location. Note that in order to do this, the debugged program must be compiled with the-g3command line option to have macro information available in it. - A new command
aliashas been added. This command can be used to create an alias of an existing command. - The
info macrocommand now accepts-alland--as valid options. - To display a function parameter's entry value (that is, the value at the time of function entry), the suffix
@entrycan be added to the parameter. GDB now displays@entryvalues in backtraces, if available. - New
set print entry-valuesandshow print entry-valuescommands have been added. Theset print entry-valuescommand acceptsboth,compact,default,if-needed,no,only, andpreferredas valid arguments and can be used to enable printing of function arguments at function entry. Theshow print entry-valuescommand can be used to determine whether this feature is enabled. - New
set debug entry-valuesandshow debug entry-valuescommands have been added. Theset debug entry-valuescommand can be used to enable printing of debugging information for determining frame argument values at function entry and virtual tail call frames. !has been added as an alias ofcommandshell.command- The
watchcommand now acceptsmaskas an argument. This can be used to create masked watchpoints.mask_value - New
set extended-promptandshow extended-promptcommands have been added. Theset extended-promptcommand enables support for a defined set of escape sequences that can be used to display various information. Theshow extended-promptcommand can be used to determine whether the extended prompt is enabled. - New
set basenames-may-differandshow basenames-may-differcommands have been added. Theset basenames-may-differcommand enables support for source files with multiple base names. Theshow basenames-may-differcommand can be used to determine whether this support is enabled. The default option isoffto allow faster GDB operations. - A new command line option
-ix(or--init-command) has been added. This option acts like-x(or--command), but is executed before loading the debugged program. - A new command line option
-iex(or--init-eval-command) has been added. This option acts like-ex(or--eval-command), but is executed before loading the debugged program. - The
info oscommand has been changed and can now display information on several objects managed by the operating system, in particular:- The
info os procgroupscommand lists process groups. - The
info os filescommand lists file descriptors. - The
info os socketscommand lists internet-domain sockets. - The
info os shmcommand lists shared-memory regions. - The
info os semaphorescommand lists semaphores. - The
info os msgcommand lists message queues. - The
info os modulescommand lists loaded kernel modules.
- GDB now has support for Static Defined Tracing (SDT) probes. Currently, the only implemented back end is for SystemTap probes (the
sys/sdt.hheader file). You can set a breakpoint by using the new-probe,-pstap, or-probe-stapoptions, and inspect the probe arguments by using the new$_probe_argfamily of convenience variables. - The
symbol-reloadingoption has been deleted. gdbservernow supports STDIO connections, for example:(gdb)
target remote | ssh myhost gdbserver - hello- GDB is now able to print flag enums. In a flag enum, all enumerator values have no bits in common when pairwise AND-ed. When GDB prints a value whose type is a flag enum, GDB shows all the constants; for example, for enum
E { ONE = 1, TWO = 2}:(gdb)
print (enum E) 3$1 = (ONE | TWO) - The file name part of a linespec now matches trailing components of a source file name. For example,
break gcc/expr.c:1000now sets a breakpoint in thebuild/gcc/expr.cfile, but not inbuild/libcpp/expr.c. - The
info procandgenerate-core-filecommands now work on remote targets connected togdbserver. - The command
info catchhas been removed. - The Ada-specific
catch exceptionandcatch assertcommands now accept conditions at the end of the command. - The
info static-tracepoint-markercommand now works on native targets with an in-process agent. - GDB can now set breakpoints on inline functions.
- The
.gdb_indexsection has been updated to include symbols for inline functions. By default, GDB now ignores older.gdb_indexsections until their.gdb_indexsections can be recreated. The new commandset use-deprecated-index-sections oncauses GDB to use any older.gdb_indexsections it finds. If this option is set, the ability to set breakpoints on inline functions is lost in symbol files with older.gdb_indexsections.The.gdb_indexsection has also been updated to record more information about each symbol. - GDB now provides Ada support for GDB/MI Variable Objects.
- GDB now supports
breakpoint always-inserted modein therecordtarget. gdbservernow supports evaluation of breakpoint conditions. Note that you can instruct GDB to send the breakpoint conditions in bytecode form, butgdbserveronly reports the breakpoint trigger to GDB when its condition evaluates to true.- The
z0/z1breakpoint insertion packets have been extended to carry a list of conditional expressions over to the remote stub depending on the condition evaluation mode. You can use theset remote conditional-breakpoints-packetcommand to control the use of this extension. - A new RSP packet
QProgramSignalscan be used to specify the signals the remote stub can pass to the debugged program without GDB involvement. - A new command
-info-oshas been added as the MI equivalent ofinfo os. - Output logs, such as
set loggingand related, now include MI output. - New
set use-deprecated-index-sections on|offandshow use-deprecated-index-sections on|offcommands have been added. These commands allow you to control the use of deprecated.gdb_indexsections. - New
catch loadandcatch unloadcommands have been added. These commands allow you to stop execution of a debugged program when a shared library is loaded or unloaded. - A new command
enable counthas been added. This command allows you to auto-disable a breakpoint after several hits. - A new command
info vtblhas been added. This command allows you to show the virtual method tables for C++ and Java objects. - A new command
explorehas been added. It supports two subcommandsexplore valueandexplore type, and allows you to recursively explore values and types of expressions. Note that this command is only available with Python-enabled GDB. - A new command
dprintfhas been added. This command allows you to create a dynamiclocation,format,args...printf-type breakpoint, which performs aprintf-like operation and then resumes program execution. - New
set print symbolandshow print symbolcommands have been added. These commands allow you to control whether GDB attempts to display the symbol, if any, that corresponds to addresses it prints. This functionality is enabled by default, but you can restore the previous behavior by running theset print symbol offcommand. - New
set breakpoint condition-evaluationandshow breakpoint condition-evaluationcommands have been added. These commands allow you to control whether breakpoint conditions are evaluated by GDB (thehostoption), or bygdbserver(thetargetoption). The default option,auto, chooses the most efficient available mode. - New
set dprintf-style gdb|call|agentandshow dprintf-stylecommands have been added. These commands allow you to control the way in which a dynamicprintfis performed: thegdboption requests a GDBprintfcommand,callcausesdprintfto call a function in the inferior, andagentrequests that the target agent such asgdbserverdoes the printing. - New
set dprintf-function,expressionshow dprintf-function,set dprintf-channel, andexpressionshow dprintf-channelcommands have been added. These commands allow you to set the function and optional first argument to the call when using thecallstyle of dynamicprintf. - New
set disconnected-dprintf on|offandshow disconnected-dprintfcommands have been added. These commands allow you to control whether agent-style dynamicprintfs continue to be in effect after GDB disconnects.
- When debugging a template instantiation, parameters of the template are now put in scope.
- The
register_pretty_printerfunction in modulegdb.printingnow takes an optionalreplaceargument. - The
maint set python print-stack on|offcommand has been deprecated and will be deleted in GDB 7.5. The new commandset python print-stack none|full|messagehas replaced it. - A prompt substitution hook (
prompt_hook) is now available to the Python API. - A new Python module
gdb.prompthas been added to the GDB Python modules library. - Python commands and convenience-functions located in
anddata_directory/python/gdb/command/are now automatically loaded on GDB start-up.data_directory/python/gdb/function/ - Blocks now provide four new attributes:
global_block,static_block,is_static, andis_global. - The
gdb.breakpointfunction has been deprecated in favor ofgdb.breakpoints. - A new class
gdb.FinishBreakpointis provided. - Type objects for
structanduniontypes now allow access to the fields using standard Python dictionary (mapping) methods. - A new event
gdb.new_objfilehas been added. - A new function
deep_itemshas been added to thegdb.typesmodule. - The function
gdb.Writenow accepts an optional keywordstream. - Parameters can now be sub-classed in Python, which allows for implementation of the
get_set_docandget_show_docfunctions. - Symbols, Symbol Table, Symbol Table and Line, Object Files, Inferior, Inferior Thread, Blocks, and Block Iterator APIs now have an
is_validmethod. - Breakpoints can now be sub-classed in Python, which allows for implementation of the
stopfunction that is executed each time the inferior reaches that breakpoint. - A new function
gdb.lookup_global_symbolhas been added. This function can be used to look up a global symbol. - GDB values in Python are now callable if the value represents a function.
- A new module
gdb.typeshas been added. - A new module
gdb.printinghas been added. - New commands
info pretty-printers,enable pretty-printer, anddisable pretty-printerhave been added. - A new
gdb.parameter("directories")function call is now available. - A new function
gdb.newest_framehas been added. This function can be used to return the newest frame in the selected thread. - The
gdb.InferiorThreadclass now supports a newnameattribute. - Support for inferior events has been added. Python scripts can now add observers in order to be notified of events occurring in the process being debugged.
- GDB commands implemented in Python can now be put in the
gdb.COMMAND_USERcommand class. - The
maint set python print-stack on|offcommand has been removed and replaced byset python print-stack. - A new class
gdb.printing.FlagEnumerationPrinterhas been added. This class can be used to applyflag enum-style pretty-printing to enums. - The
gdb.lookup_symbolfunction now works correctly when there is no current frame. - The
gdb.Symbolobject now has an additional attributeline. This attribute holds the line number in the source at which the symbol was defined. - The
gdb.Symbolobject now has an additional attributeneeds_frame, and a new methodvalue. Theneeds_frameattribute indicates whether the symbol requires a frame to compute its value, and thevaluemethod computes the symbol's value. - The
gdb.Valueobject now has a new methodreferenced_value. This method can be used to dereference a pointer as well as C++ reference values. - The
gdb.Symtabobject now has two new methods,global_blockandstatic_block. These methods return the global and static blocks (asgdb.Blockobjects) of the underlying symbol table respectively. - A new method
gdb.find_pc_linereturns thegdb.Symtab_and_lineobject associated with a PC value. - The
gdb.Symtab_and_lineobject now has an additional attributelast. This attribute holds the end of the address range occupied by the code for the current source line.
Compatibility Changes
- A new command
info auto-loadhas been added and can be used to display the status of various automatically loaded files. Theinfo auto-load gdb-scriptscommand lists automatically loaded canned sequences of commands,info auto-load python-scriptsdisplays the status of automatically loaded Python scripts,info auto-load local-gdbinitdisplays whether a local.gdbinitfile in the current working directory is loaded, andinfo auto-load libthread-dbdisplays whether the inferior-specific thread debugging shared library is loaded. - New commands
set auto-loadandshow auto-loadhave been added and can be used to control automatic loading of files:- The
set auto-load gdb-scriptsandshow auto-load gdb-scriptscommands control automatic loading of GDB scripts. - The
set auto-load python-scriptsandshow auto-load python-scriptscommands control automatic loading of Python scripts. - The
set auto-load local-gdbinitandshow auto-load local-gdbinitcommands control automatic loading of.gdbinitfrom the current working directory. - The
set auto-load libthread-dbandshow auto-load libthread-dbcommands control automatic loading of inferior-specificlibthread_db. - The
set auto-load scripts-directoryandshow auto-load scripts-directorycommands control the list of directories from which to automatically load GDB and Python scripts. - The
set auto-load safe-pathandshow auto-load safe-pathcommands control the list of directories from which it is safe to automatically load all previously mentioned items. - The
set debug auto-loadandshow debug auto-loadcommands control displaying of debugging information for all previously mentioned items.
Theset auto-load offcommand can be used to disable automatic loading globally. You can also useshow auto-loadwith no subcommand to display current settings of all previously mentioned items. - The
maint set python auto-load on|offcommand has been replaced withset auto-load python-scripts on|off. - The
maintenance print section-scriptscommand has been renamed toinfo auto-load python-scripts [and is no longer classified as a maintenance-only command.pattern] - Support for the Guile extension language has been removed.
- The GNU Debugger has been adapted to follow GCC's rules on accessing volatile objects when reading or writing target state during expression evaluation.
New Features
- For remote targets, debugging of shared libraries is now supported by default.
- New commands
set observerandshow observerhave been added. Theset observercommand acceptsonoroffas an argument and can be used to allow or disallow the GNU Debugger to affect the execution of the debugged program. Use theshow observercommand to determine whether observer mode is enabled. - A new convenience variable
$_threadhas been added. This variable stores the number of the current thread. - The
sourcecommand now accepts-sas a valid option. This option can be used to search for the script in the source search path regardless of the path in the file name. - Support for tracepoints, including fast and static tracepoints, has been added to
gdbserver. - The
--batchcommand line option has been adapted to disable pagination and queries. - Direct support for the reading and writing byte, word, and double-word x86 general purpose registers such as
$alhas been added. - The
commandscommand now accepts a range of breakpoints as an argument. - The
rbreakcommand now accepts a file name as part of its argument. This can be used to limit the functions selected by the supplied regular expression to those that are defined in the specified file. - Support for multi-program (sometimes referred to as multi-executable or multi-exec) debugging has been added. In particular, the GNU Debugger now supports the following commands:
- The
add-inferiorcommand can be used to add a new inferior. - The
clone-inferiorcommand can be used to create a copy of an inferior with the same executable loaded. - The
remove-inferiorcommand accepts an inferior ID as an argument and can be used to remove an inferior.
- Support for trace state variables has been added. In particular, the GNU Debugger now supports the following commands:
- The
tvariable $command can be used to define or modify a trace state variable.variable_name[=expression] - The
info tvariablescommand can be used to display a list of currently defined trace state variables and their values. - The
delete tvariable $command can be used to delete one or more trace state variables.variable_name...
- A new
ftracehas been added. This command accepts a function name, a line number, or an address as an argument, and can be used to define a fast tracepoint at that location. - Support for disconnected tracing, trace files, and circular trace buffer has been added.
- A new
tevalcommand has been added. This command accepts one or more expressions to evaluate at a tracepoint. - The GNU Debugger has been adapted to parse the
0bprefix of binary numbers exactly the same way as the GNU Compiler Collection. - The GNU Debugger now supports the following commands for process record and replay:
- New commands
set record memoryandshow record memoryhave been added. Theset record memorycommand acceptsonoroffas an argument and can be used to enable or disable stopping the inferior when a memory change of the next instruction cannot be recorded. Use theshow record memory-querycommand to determine whether this feature is enabled. - A new command
record savehas been added. This command accepts a file name as an argument and can be used to save the execution log to a file. - A new command
record restorehas been added. This command accepts a file name as an argument and can be used to restore the execution log from a file.
- A new command
evalhas been added. This command accepts a format string followed by one or more arguments, transforms it to a command, and then executes it. - A new command
save breakpointshas been added. This command accepts a file name as an argument and can be used to store all currently defined breakpoints to a file. To restore the saved breakpoints from this file, use thesourcecommand. - New commands
set may-write-registers,set may-write-memory,set may-insert-breakpoints,set may-insert-tracepoints,set may-insert-fast-tracepoints, andset may-interrupthave been added. All of these commands accept eitheronoroffas an argument, and can be used to set individual permissions for the target. - A new command
main info program-spaceshas been added. This command can be used to display information about currently loaded program spaces. - New commands
set remote interrupt-sequenceandshow remote interrupt-sequencehave been added. Theset remote interrupt-sequencecommand acceptsCtrl-C,BREAK, andBREAK-gas valid arguments, and can be used to specify which interrupt sequence to send to the remote target in order to interrupt its execution. Use theshow remote interrupt-sequenceto determine the current setting. - New commands
set remote interrupt-on-connectandshow remote interrupt-on-connecthave been added. Theset remote interrupt-on-connectaccepts eitheronoroffas an argument, and can be used to enable sending an interrupt sequence to the remote target when the GNU Debugger connects to it. Use theshow remote interrupt-on-connectcommand to determine whether this feature is enabled. - The
set remotebreakandshow remotebreakcommands have been deprecated and users are advised to useset remote interrupt-sequenceandshow remote interrupt-sequenceinstead. - The
disassemblecommand has been adapted to accept two arguments in the form ofstart,+length. - The
sourcecommand can now be used to read commands from Python scripts.
- Argument-dependent lookup (ADL) now directs function search to the namespaces of its arguments regardless of whether the namespace has been imported.
- In addition to member operators, the GNU Debugger can now look up operators that are:
- defined in the global scope,
- defined in a namespace and imported via the
usingdirective, - implicitly imported from an anonymous namespace, or
- the argument-dependent lookup (ADL operators.
- Support for printing of static const class members that are initialized in the class definition has been enhanced.
- Support for importing of namespaces has been added.
- The C++ expression parser has been adapted to handle the cast operators
static_cast<>,dynamic_cast<>,const_cast<>, andreinterpret_cast<>.
- The GNU Debugger is now installed with a new directory located at
/opt/rh/devtoolset-2/root/usr/share/gdb/python/. This directory serves as a standard location for Python scripts written for GDB. - The Python API has been adapted to provide access to symbols, symbol tables, program spaces, breakpoints, inferiors, threads, and frame's code blocks. Users are now also allowed to create custom GDB parameters from the API and manipulate them by using the
setandshowcommands. - New functions
gdb.target_charset,gdb.target_wide_charset,gdb.progspaces,gdb.current_progspace, andgdb.string_to_argvhave been added. - A new exception
gdb.GdbErrorhas been added. - The GNU Debugger now searches pretty-printers in the current program space.
- The GNU Debugger can now enable or disable pretty-printers individually.
- The GNU Debugger has been adapted to look for names of Python scripts to automatically load in a special section named
.debug_gdb_scripts.
- A new command line option,
-y, has been added. This option can be used to print file descriptor paths. - A new command line option,
-P, has been added. This option can be used to filter system calls based on the file descriptor paths. - A new command line option,
-I, has been added. This option can be used to control how interactivestraceis. - A new command line utility,
strace-log-merge, has been added. This utility can be used to merge timestampedstraceoutput into a single file. - The
straceutility now uses optimized interfaces to extract data from the traced process for better performance. - The
straceutility now provides improved support for decoding of arguments for various system calls. In addition, a number of new system calls are supported.
- SystemTap has been updated to provide experimental support for Dyninst-based probing in the user space. Users can now execute the
staputility with the--dyninstcommand line option to instrument their own programs without the need to acquirerootprivileges. - SystemTap is now distributed with a number of manual pages that provide a detailed explanation of common errors:
- The
error::buildid(7stap) manual page documents build-id verification failures. - The
error::dwarf(7stap) manual page documents common DWARF debuginfo quality problems. - The
error::fault(7stap) manual page documents memory access faults. - The
error::inode-uprobes(7stap) manual page documents current limitations of inode-uprobes. - The
error::pass1(7stap) manual page documents pass 1 (parsing) errors. - The
error::pass2(7stap) manual page documents pass 2 (elaboration) errors. - The
error::pass3(7stap) manual page documents pass 3 (translation) errors. - The
error::pass4(7stap) manual page documents pass 4 (compilation) errors. - The
error::pass5(7stap) manual page documents pass 5 (execution) errors. - The
error::process-tracking(7stap) manual page documents user-space process tracking errors. - The
error::reporting(7stap) manual page documents how to report SystemTap bugs.
- The scripting language used by SystemTap now supports the
=~operator. Users can use this operator to match regular expressions. - The preprocessor used by the
staputility now supports an experimental macro facility. Users can use the following construct to define new macros:@define
name(parameter...) %(body%)Refer to the PREPROCESSOR MACROS section of thestap(1) manual page for more information on how to use this feature. - The backtrace-related tapset functions have been improved and standardized.
- A new command line utility,
operf, has been added. This utility can be executed by a non-rootuser and can be used to collect profiling data.Important
Theoperfutility relies on a kernel feature that is currently not available in Red Hat Enterprise Linux 5. Consequently, this utility only works and is supported on Red Hat Enterprise Linux 6. - OProfile now supports Intel processors code-named Ivy Bridge.
- OProfile now supports AMD family11h, family12h, family14h, and AMD family15h processors.
- Generation of XML output has been corrected.
- Handling of the
--session-dircommand line option has been improved and a possible buffer overflow in the XML generator has been fixed.
- The DWARF debug information for Valgrind is now distributed in a separate package, devtoolset-2-valgrind-debuginfo.
- The SGCHECK OPTIONS section of the
valgrind(1) manual page has been corrected and no longer includes the BBV options. As well, the BBV options are now listed in a separate section.
- When running in 64-bit mode, Valgrind now supports the SSE4.2 instruction set with the exception of SSE4.2 AES instructions. In 32-bit mode, Valgrind only provides support up to and including the SSSE3 instruction set.
- A new processing script cg_diff has been added to Cachegrind. This processing script can find the difference between two profiles, and can therefore be used to evaluate the performance effects of a change in a program.
- The behavior of the cg_annotate's rarely-used
--thresholdoption has been changed. - Callgrind now supports branch prediction simulation and can optionally count the number of executed global bus events. Note that in order to use this functionality for a better approximation of a “Cycle Estimation” as a derived event, you must manually update the event formula in KCachegrind.
- To accommodate machines with three levels of caches, both Cachegrind and Callgrind now refer to the LL (last-level) cache rather than the L2 cache. When Cachegrind or Callgrind auto-detects the cache configuration of such a machine, it now runs the simulation as if the L2 cache is not present. Consequently, the results are less likely to match the true result for the machine and should not be considered authoritative, but provide a general idea about a program's locality.
- A new command line option
--pages-as-heaphas been added to Massif. When this option is enabled, Massif tracks memory allocations at the level of memory pages (as mapped bymmap,brkand similar functions) instead of tracking allocations at the level of heap blocks (as allocated withmalloc,new, ornew[]). Each mapped page is treated as its own block. Interpreting the page-level output is harder than the heap-level output, but allows you to account for every byte of memory used by a program. By default, the--pages-as-heapoption is disabled. - New command line options
--free-is-writeand--trace-allochave been added to DRD. The--free-is-writeoption allows you to detect reading from already freed memory, the--trace-alloccan be used to trace of all memory allocations and deallocations. - A number of new allocations have been added to DRD. As well, you can now annotate custom barrier implementations and benign races on static variables.
- DRD's happens before and happens after annotations have been enhanced and can be used to annotate, for example, a smart pointer implementation.
- Helgrind's annotation set has been significantly improved to provide a general set of annotations to describe locks, semaphores, barriers, and condition variables. In addition, Helgrind now supports annotations to describe thread-safe reference counted heap objects.
- A new command line option
--show-possibly-losthas been added to Memcheck. By default this option is enabled and causes the leak detector to show possibly-lost blocks. - A new experimental heap profiler, DHAT (Dynamic Heap Analysis Tool), has been added. DHAT keeps track of allocated heap blocks, and also inspects every memory reference to see which block (if any) is being accessed. This gives a lot of insight into block lifetimes, utilization, turnover, liveness, and the location of hot and cold fields. You can use DHAT to do hot-field profiling.
- Support for unfriendly self-modifying code has been improved, and the extra overhead incurred by
--smc-check=allhas been reduced by approximately a factor of 5 as compared with the previous version of Valgrind. - A new command line option
--fullpath-afterhas been added. This option can be used to display directory names for source files in error messages, and is combined with a flexible mechanism for specifying which parts of the paths should be shown. - A new command line option
--require-text-symbolhas been added. This option stops the execution if a specified symbol is not found in a given shared object when loaded into the process. As a result, working with function intercepting and wrapping is now safer and more reliable. - Valgrind now implements more reliable stack unwinding on amd64-linux, particularly in the presence of function wrappers, and with gcc-4.5 compiled code.
- Valgrind now implements modest scalability (performance improvements) for very large, long-running applications.
- Valgrind now provides improved support for analyzing programs that are running in Wine. Users can now include the
valgrind/valgrind.h,valgrind/memcheck.h, andvalgrind/drd.hheader files in Windows programs that are compiled with MinGW or one of the Microsoft Visual Studio compilers.
| Revision History | |||
|---|---|---|---|
| Revision 2.0-2 | Tue 11 Mar 2014 | ||
| |||
| Revision 1.0-3 | Tue 11 Feb 2014 | ||
| |||
| Revision 1.0-2 | Tue 10 Sep 2013 | ||
| |||
| Revision 1.0-1 | Tue 06 Aug 2013 | ||
| |||
| Revision 1.0-0 | Tue 28 May 2013 | ||
| |||
A
- ABI
- compatibility, ABI Compatibility
- addr2line
- features, New Features
- overview, binutils
- usage, Using Other Binary Tools
- application binary interface (see ABI)
- ar
- overview, binutils
- usage, Using Other Binary Tools
- as (see GNU assembler)
- assembling (see GNU assembler)
B
- bfd
- features, New Features
- binutils
- documentation, Additional Resources
- features, Main Features
- installation, Installing binutils
- overview, binutils
- usage, Using the GNU Assembler, Using the GNU Linker, Using Other Binary Tools
- version, About Red Hat Developer Toolset, binutils
C
- C programming language
- compiling, Using the C Compiler, Preparing a Program for Debugging
- running, Running a C Program
- support, GNU C Compiler
- C++ programming language
- compiling, Using the C++ Compiler, Preparing a Program for Debugging
- running, Running a C++ Program
- support, GNU C++ Compiler
- C++11 (see GNU Compiler Collection)
- c++filt
- overview, binutils
- usage, Using Other Binary Tools
- C11 (see GNU Compiler Collection)
- Cachegrind
- overview, Valgrind
- usage, Using Valgrind
- Callgrind
- overview, Valgrind
- usage, Using Valgrind
- compatibility
- GNU Compiler Collection, Language Compatibility, Compatibility Changes, Fortran 2003 Compatibility, Fortran 2008 Compatibility, Fortran 77 Compatibility, ABI Compatibility, Debugging Compatibility, Other Compatibility
- Red Hat Developer Toolset, Compatibility
- compiling (see GNU Compiler Collection)
D
- debugging (see GNU Debugger)
- Developer Toolset (see Red Hat Developer Toolset)
- documentation
- Red Hat Product Documentation, Accessing Red Hat Product Documentation
- DRD
- overview, Valgrind
- usage, Using Valgrind
- dwp
- overview, binutils
- usage, Using Other Binary Tools
- dwz
- documentation, Additional Resources
- installation, Installing dwz
- overview, dwz
- usage, Using dwz
- version, About Red Hat Developer Toolset, dwz
- Dyninst
- documentation, Additional Resources
- installation, Installing Dyninst
- overview, Dyninst
- usage, Using Dyninst
- version, About Red Hat Developer Toolset, Dyninst
E
- Eclipse
- configuration, Using the Red Hat Enterprise Linux Toolchain
- documentation, Additional Resources
- installation, Installing Eclipse
- overview, Eclipse
- usage, Using Eclipse
- version, About Red Hat Developer Toolset, Eclipse
- elfedit
- features, New Features
- overview, binutils
- usage, Using Other Binary Tools
- elfutils
- documentation, Additional Resources
- installation, Installing elfutils
- overview, elfutils
- usage, Using elfutils
- version, About Red Hat Developer Toolset, elfutils
- eu-addr2line
- features, Changes Since Red Hat Enterprise Linux 5.9
- overview, elfutils
- usage, Using elfutils
- eu-ar
- features, Changes Since Red Hat Enterprise Linux 6.4
- overview, elfutils
- usage, Using elfutils
- eu-elfcmp
- features, Changes Since Red Hat Enterprise Linux 5.9
- overview, elfutils
- usage, Using elfutils
- eu-elflint
- features, Changes Since Red Hat Enterprise Linux 6.4
- overview, elfutils
- usage, Using elfutils
- eu-findtextrel
- overview, elfutils
- usage, Using elfutils
- eu-make-debug-archive
- overview, elfutils
- usage, Using elfutils
- eu-nm
- features, Changes Since Red Hat Enterprise Linux 6.4
- overview, elfutils
- usage, Using elfutils
- eu-objdump
- overview, elfutils
- usage, Using elfutils
- eu-ranlib
- overview, elfutils
- usage, Using elfutils
- eu-readelf
- features, Changes Since Red Hat Enterprise Linux 6.4, Changes Since Red Hat Enterprise Linux 5.9
- overview, elfutils
- usage, Using elfutils
- eu-size
- overview, elfutils
- usage, Using elfutils
- eu-strings
- overview, elfutils
- usage, Using elfutils
- eu-strip
- features, Changes Since Red Hat Enterprise Linux 6.4, Changes Since Red Hat Enterprise Linux 5.9
- overview, elfutils
- usage, Using elfutils
- eu-unstrip
- overview, elfutils
- usage, Using elfutils
F
- feedback
- contact information for this manual, We Need Feedback!
- Fortran programming language
- compiling, Using the Fortran Compiler
- running, Running a Fortran Program
- support, GNU Fortran Compiler
G
- g++ (see GNU Compiler Collection)
- GAS (see GNU assembler)
- GCC (see GNU Compiler Collection)
- gcc (see GNU Compiler Collection)
- GDB (see GNU Debugger)
- gfortran (see GNU Compiler Collection)
- Git
- configuration, Configuring Git
- documentation, Additional Resources
- installation, Installing Git
- overview, Git
- usage, Using Git
- version, About Red Hat Developer Toolset, Git
- Global Support Services
- contacting, Contacting Global Support Services
- GNU assembler
- documentation, Additional Resources
- installation, Installing binutils
- overview, binutils
- usage, Using the GNU Assembler
- GNU Binutils (see binutils)
- GNU Compiler Collection
- C support, GNU C Compiler
- C++ support, GNU C++ Compiler
- compatibility, Language Compatibility, Compatibility Changes, Fortran 2003 Compatibility, Fortran 2008 Compatibility, Fortran 77 Compatibility, ABI Compatibility, Debugging Compatibility, Other Compatibility
- documentation, Additional Resources
- features, Main Features, Status and Features, New Features, Fortran 2003 Features, Fortran 2008 Features
- Fortran support, GNU Fortran Compiler
- installation, Installing the C Compiler, Installing the C++ Compiler, Installing the Fortran Compiler
- overview, GNU Compiler Collection (GCC)
- usage, Using the C Compiler, Using the C++ Compiler, Using the Fortran Compiler, Preparing a Program for Debugging
- version, About Red Hat Developer Toolset, GNU Compiler Collection (GCC)
- GNU Debugger
- documentation, Additional Resources
- features, Main Features
- installation, Installing the GNU Debugger
- overview, GNU Debugger (GDB)
- preparation, Preparing a Program for Debugging
- usage, Running the GNU Debugger, Listing Source Code, Setting Breakpoints, Starting Execution, Displaying Current Values, Continuing Execution
- version, About Red Hat Developer Toolset, GNU Debugger (GDB)
- GNU linker
- documentation, Additional Resources
- installation, Installing binutils
- overview, binutils
- usage, Using the GNU Linker
- gprof
- features, New Features
- overview, binutils
- usage, Using Other Binary Tools
- GSS (see Global Support Services)
H
- Helgrind
- overview, Valgrind
- usage, Using Valgrind
- help
- getting help, Do You Need Help?
- Global Support Services, Contacting Global Support Services
- Red Hat Product Documentation, Accessing Red Hat Product Documentation
L
- ld (see GNU linker)
- linking (see GNU linker)
M
- Massif
- overview, Valgrind
- usage, Using Valgrind
- Memcheck
- overview, Valgrind
- usage, Using Valgrind
- memstomp
- documentation, Additional Resources
- installation, Installing memstomp
- overview, memstomp
- usage, Using memstomp
- version, About Red Hat Developer Toolset
N
- nm
- overview, binutils
- usage, Using Other Binary Tools
O
- objcopy
- features, New Features
- overview, binutils
- usage, Using Other Binary Tools
- objdump
- features, New Features
- overview, binutils
- usage, Using Other Binary Tools
- opannotate
- overview, OProfile
- usage, Using OProfile
- oparchive
- overview, OProfile
- usage, Using OProfile
- opcontrol
- overview, OProfile
- usage, Using OProfile
- opgprof
- overview, OProfile
- usage, Using OProfile
- ophelp
- overview, OProfile
- usage, Using OProfile
- opimport
- overview, OProfile
- usage, Using OProfile
- opjitconv
- overview, OProfile
- usage, Using OProfile
- opreport
- overview, OProfile
- usage, Using OProfile
- OProfile
- documentation, Additional Resources
- installation, Installing OProfile
- overview, OProfile
- usage, Using OProfile
- version, About Red Hat Developer Toolset, OProfile
- oprofiled
- overview, OProfile
- usage, Using OProfile
R
- ranlib
- overview, binutils
- usage, Using Other Binary Tools
- readelf
- features, New Features
- overview, binutils
- usage, Using Other Binary Tools
- Red Hat Developer Toolset
- compatibility, Compatibility
- documentation, Additional Resources, Accessing Red Hat Product Documentation
- features, Main Features
- installation, Installing Red Hat Developer Toolset
- overview, About Red Hat Developer Toolset
- subscription, Getting Access to Red Hat Developer Toolset
- support, About Red Hat Developer Toolset
- uninstallation, Uninstalling Red Hat Developer Toolset
- update, Updating Red Hat Developer Toolset
- Red Hat Enterprise Linux
- documentation, Additional Resources, Accessing Red Hat Product Documentation
- supported versions, Compatibility
- Red Hat Subscription Management
- subscription, Using Red Hat Subscription Management
- RHN Classic
- subscription, Using RHN Classic
S
- scl (see Software Collections)
- size
- overview, binutils
- usage, Using Other Binary Tools
- Software Collections
- documentation, Additional Resources, Accessing Red Hat Product Documentation
- overview, About Red Hat Developer Toolset
- stap
- overview, SystemTap
- usage, Using SystemTap, Using Dyninst with SystemTap
- stap-merge
- overview, SystemTap
- usage, Using SystemTap
- stap-prep
- overview, SystemTap
- usage, Installing SystemTap
- stap-report
- overview, SystemTap
- usage, Using SystemTap
- staprun
- overview, SystemTap
- usage, Using SystemTap
- stapsh
- overview, SystemTap
- usage, Using SystemTap
- strace
- documentation, Additional Resources
- installation, Installing strace
- overview, strace
- usage, Using strace
- version, About Red Hat Developer Toolset, strace
- strings
- overview, binutils
- usage, Using Other Binary Tools
- strip
- overview, binutils
- usage, Using Other Binary Tools
- support
- Red Hat Developer Toolset, About Red Hat Developer Toolset
- SystemTap
- documentation, Additional Resources
- installation, Installing SystemTap
- overview, SystemTap
- usage, Using SystemTap, Using Dyninst with SystemTap
- version, About Red Hat Developer Toolset, SystemTap
V
- Valgrind
- documentation, Additional Resources
- installation, Installing Valgrind
- overview, Valgrind
- usage, Using Valgrind
- version, About Red Hat Developer Toolset, Valgrind
- version
- version, memstomp

