Red Hat Developer Toolset 2.1

User Guide

Installing and Using Red Hat Developer Toolset

Edition 0

Jaromír Hradílek

Red Hat Engineering Content Services

Jacquelynn East

Red Hat Engineering Content Services

Matt Newsome

Red Hat Software Engineering

Legal Notice

Copyright © 2013, 2014 Red Hat, Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.

Abstract

Red Hat Developer Toolset is a Red Hat offering for developers on the Red Hat Enterprise Linux platform. The Red Hat Developer Toolset User Guide provides an overview of this product, explains how to invoke and use the Red Hat Developer Toolset versions of the tools, and links to resources with more in-depth information.
Preface
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. Getting Help and Giving Feedback
2.1. Do You Need Help?
2.2. We Need Feedback!
I. Introduction
1. Red Hat Developer Toolset
1.1. About Red Hat Developer Toolset
1.2. Main Features
1.3. Compatibility
1.4. Getting Access to Red Hat Developer Toolset
1.4.1. Using RHN Classic
1.4.2. Using Red Hat Subscription Management
1.5. Installing Red Hat Developer Toolset
1.5.1. Installing All Available Components
1.5.2. Installing Individual Package Groups
1.5.3. Installing Optional Packages
1.5.4. Installing Debugging Information
1.6. Updating Red Hat Developer Toolset
1.6.1. Updating to a Minor Version
1.6.2. Updating to a Major Version
1.7. Uninstalling Red Hat Developer Toolset
1.8. Additional Resources
II. Integrated Development Environments
2. Eclipse
2.1. Installing Eclipse
2.1.1. Building Eclipse from the Source RPM Packages
2.2. Using Eclipse
2.2.1. Using the Red Hat Developer Toolset Toolchain
2.2.2. Using the Red Hat Enterprise Linux Toolchain
2.3. Additional Resources
III. Development Tools
3. GNU Compiler Collection (GCC)
3.1. GNU C Compiler
3.1.1. Installing the C Compiler
3.1.2. Using the C Compiler
3.1.3. Running a C Program
3.2. GNU C++ Compiler
3.2.1. Installing the C++ Compiler
3.2.2. Using the C++ Compiler
3.2.3. Running a C++ Program
3.3. GNU Fortran Compiler
3.3.1. Installing the Fortran Compiler
3.3.2. Using the Fortran Compiler
3.3.3. Running a Fortran Program
3.4. Additional Resources
4. binutils
4.1. Installing binutils
4.2. Using the GNU Assembler
4.3. Using the GNU Linker
4.4. Using Other Binary Tools
4.5. Additional Resources
5. elfutils
5.1. Installing elfutils
5.2. Using elfutils
5.3. Additional Resources
6. dwz
6.1. Installing dwz
6.2. Using dwz
6.3. Additional Resources
IV. Revision Control Systems
7. Git
7.1. Installing Git
7.2. Configuring Git
7.2.1. Configuring the Default Text Editor
7.2.2. Setting Up User Information
7.3. Using Git
7.3.1. Creating a New Repository
7.3.2. Cloning an Existing Repository
7.3.3. Adding, Renaming, and Deleting Files
7.3.4. Viewing Changes
7.3.5. Committing Changes
7.3.6. Sharing Changes
7.3.7. Updating a Git Repository
7.4. Additional Resources
V. Debugging Tools
8. GNU Debugger (GDB)
8.1. Installing the GNU Debugger
8.2. Preparing a Program for Debugging
8.3. Running the GNU Debugger
8.4. Listing Source Code
8.5. Setting Breakpoints
8.6. Starting Execution
8.7. Displaying Current Values
8.8. Continuing Execution
8.9. Additional Resources
9. strace
9.1. Installing strace
9.2. Using strace
9.2.1. Redirecting Output to a File
9.2.2. Tracing Selected System Calls
9.2.3. Displaying Time Stamps
9.2.4. Displaying a Summary
9.3. Additional Resources
10. memstomp
10.1. Installing memstomp
10.2. Using memstomp
10.3. Additional Resources
VI. Performance Monitoring Tools
11. SystemTap
11.1. Installing SystemTap
11.2. Using SystemTap
11.3. Additional Resources
12. Valgrind
12.1. Installing Valgrind
12.2. Using Valgrind
12.3. Additional Resources
13. OProfile
13.1. Installing OProfile
13.2. Using OProfile
13.3. Additional Resources
14. Dyninst
14.1. Installing Dyninst
14.2. Using Dyninst
14.2.1. Using Dyninst with SystemTap
14.2.2. Using Dyninst as a Stand-alone Application
14.3. Additional Resources
VII. Getting Help
15. Accessing Red Hat Product Documentation
16. Contacting Global Support Services
16.1. Gathering Required Information
16.2. Escalating an Issue
16.3. Re-opening a Service Request
16.4. Additional Resources
A. Changes in Version 2.1
A.1. Changes in Eclipse
A.1.1. Changes Since Red Hat Developer Toolset 2.0
A.2. Changes in GCC
A.3. Changes in elfutils
A.3.1. Changes Since Red Hat Developer Toolset 2.0
A.4. Changes in Git
A.4.1. Changes Since Red Hat Enterprise Linux 6.5
A.5. Changes in GDB
A.5.1. Changes Since Red Hat Developer Toolset 2.0
A.6. Changes in Valgrind
A.6.1. Changes Since Red Hat Developer Toolset 2.0
A.7. Changes in OProfile
A.7.1. Changes Since Red Hat Developer Toolset 2.0
B. Changes in Version 2.0
B.1. Changes in Eclipse
B.1.1. Changes Since Red Hat Enterprise Linux 6.4
B.2. Changes in GCC
B.2.1. Changes Since Red Hat Developer Toolset 1.1
B.2.2. Changes Since Red Hat Enterprise Linux 6.4 and 5.9
B.3. Changes in binutils
B.3.1. GNU Linker
B.3.2. GNU Assembler
B.3.3. Other Binary Tools
B.4. Changes in elfutils
B.4.1. Changes Since Red Hat Developer Toolset 1.1
B.4.2. Changes Since Red Hat Enterprise Linux 6.4
B.4.3. Changes Since Red Hat Enterprise Linux 5.9
B.5. Changes in dwz
B.5.1. Changes Since Red Hat Developer Toolset 1.1
B.6. Changes in GDB
B.6.1. Changes Since Red Hat Developer Toolset 1.1
B.6.2. Changes Since Red Hat Enterprise Linux 6.4
B.6.3. Changes Since Red Hat Enterprise Linux 5.9
B.7. Changes in strace
B.7.1. Changes Since Red Hat Enterprise Linux 6.4 and 5.9
B.8. Changes in SystemTap
B.8.1. Changes Since Red Hat Developer Toolset 1.1
B.9. Changes in OProfile
B.9.1. Changes Since Red Hat Developer Toolset 1.1
B.9.2. Changes Since Red Hat Enterprise Linux 5.9
B.10. Changes in Valgrind
B.10.1. Changes Since Red Hat Developer Toolset 1.1
B.10.2. Changes Since Red Hat Enterprise Linux 5.9
C. Revision History
Index