Red Hat Developer Toolset 7.0 Beta

User Guide

Installing and Using Red Hat Developer Toolset

Jaromír Hradílek

Red Hat Customer Content Services

Matt Newsome

Red Hat Software Engineering

Robert Krátký

Red Hat Customer Content Services

Vladimír Slávik

Red Hat Customer Content Services

Legal Notice

Copyright © 2014-2017 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, OpenShift, 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.


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.
This version of the document is provided only as a preview. It is under development and is subject to substantial change. Consider the included information incomplete and use it with caution.
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.5. Installing Red Hat Developer Toolset
1.6. Updating Red Hat Developer Toolset
1.7. Uninstalling Red Hat Developer Toolset
1.8. Using Red Hat Developer Toolset Container Images
1.9. Additional Resources
II. Development Tools
2. GNU Compiler Collection (GCC)
2.1. GNU C Compiler
2.2. GNU C++ Compiler
2.3. GNU Fortran Compiler
2.4. Additional Resources
3. GNU make
3.1. Installing make
3.2. Using make
3.3. Using Makefiles
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
III. Debugging Tools
7. GNU Debugger (GDB)
7.1. Installing the GNU Debugger
7.2. Preparing a Program for Debugging
7.3. Running the GNU Debugger
7.4. Listing Source Code
7.5. Setting Breakpoints
7.6. Starting Execution
7.7. Displaying Current Values
7.8. Continuing Execution
7.9. Additional Resources
8. strace
8.1. Installing strace
8.2. Using strace
8.3. Additional Resources
9. ltrace
9.1. Installing ltrace
9.2. Using ltrace
9.3. Additional Resources
10. memstomp
10.1. Installing memstomp
10.2. Using memstomp
10.3. Additional Resources
IV. 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.3. Additional Resources
V. LLVM Toolset (Technology Preview)
15. LLVM Toolset
15.1. About LLVM Toolset
15.2. Compatibility
15.3. Getting Access to LLVM Toolset
15.4. Installing LLVM Toolset
15.5. Additional Resources
16. clang
16.1. Installing clang
16.2. Using the C Compiler
16.3. Running a C Program
16.4. Using the C++ Compiler
16.5. Running a C++ Program
16.6. Using the clang Integrated Assembler
16.7. Additional Resources
17. lldb
17.1. Installing lldb
17.2. Preparing a Program for Debugging
17.3. Running lldb
17.4. Listing Source Code
17.5. Using Breakpoints
17.6. Starting Execution
17.7. Displaying Current Values
17.8. Continuing Execution
17.9. Additional Resources
VI. Rust Toolset (Technology Preview)
18. Rust Toolset
18.1. About Rust Toolset
18.2. Compatibility
18.3. Getting Access to Rust Toolset
18.4. Installing Rust Toolset
18.5. Additional Resources
19. cargo
19.1. Installing cargo
19.2. Creating a New Rust Project
19.3. Building a Rust Project
19.4. Checking a Rust Program
19.5. Running a Rust Program
19.6. Running Rust Project Tests
19.7. Configuring Project Dependencies
19.8. Building Rust Project Documentation
19.9. Vendoring Rust Project Dependencies
19.10. Additional Resources
VII. Go Toolset (Technology Preview)
20. Go Toolset
20.1. About Go Toolset
20.2. Compatibility
20.3. Getting Access to Go Toolset
20.4. Installing Go Toolset
20.5. Additional Resources
21. go
21.1. Installing go
21.2. Writing Go Programs
21.3. Using the go Compiler
21.4. Running a Go Program
21.5. Installing Go Projects
21.6. Downloading Go Projects
21.7. Additional Resources
22. gofmt
22.1. Installing gofmt
22.2. Formatting Code
22.3. Previewing Changes To Code
22.4. Simplifying Code
22.5. Refactoring Code
22.6. Additional Resources
23. Go Race Detector
23.1. Installing the Race Detector
23.2. Using the Race Detector
23.3. Additional Resources
VIII. Getting Help
24. Accessing Red Hat Product Documentation
25. Contacting Global Support Services
25.1. Gathering Required Information
25.2. Escalating an Issue
25.3. Re-opening a Service Request
25.4. Additional Resources
A. Changes in Version 7.0
A.1. Changes in binutils
A.2. Changes in dyninst
A.3. Changes in elfutils
A.4. Changes in GCC
A.5. Changes in GDB
A.6. Changes in make
A.7. Changes in OProfile
A.8. Changes in strace
A.9. Changes in SystemTap
A.10. Changes in Valgrind
A.11. Changes in devtoolset-7-perftools-rhel7
A.12. Changes in devtoolset-7-toolchain-rhel7
B. Revision History