Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE Guide de l'utilisateur

Naviguer en ligne ou télécharger Guide de l'utilisateur pour Systèmes d'exploitation Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE. Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE User guide Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 100
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
Red Hat Enterprise Linux 6
Developer Guide
An introduction to application development
tools in Red Hat Enterprise Linux 6
Dave Brolley
William Cohen
Roland Grunberg
Aldy Hernandez
Karsten Hopp
Jakub Jelinek
Vue de la page 0
1 2 3 4 5 6 ... 99 100

Résumé du contenu

Page 1 - Developer Guide

Red Hat Enterprise Linux 6Developer GuideAn introduction to application developmenttools in Red Hat Enterprise Linux 6Dave BrolleyWilliam CohenRoland

Page 2

Prefacex• search or browse through a knowledgebase of technical support articles about Red Hat products.• submit a support case to Red Hat Global Supp

Page 3 - Edition 0

Index90VValgrindprofiling, 62commands, 62documentation, 64plug-in for Eclipse, 63tools, 62usage, 63toolscachegrind, 63callgrind, 63helgrind, 63massif,

Page 4

Chapter 1.1Introduction to EclipseEclipse is a powerful development environment that provides tools for each phase of the developmentprocess. It is in

Page 5

Chapter 1. Introduction to Eclipse2A project can be imported directly into Eclipse if it contains the necessary Eclipse metafiles. Eclipseuses these f

Page 6

Help In Eclipse3Figure 1.3. Import Wizard1.2. Help In EclipseEclipse features a comprehensive internal help library that covers nearly every facet of

Page 7 - 1. Document Conventions

Chapter 1. Introduction to Eclipse4Figure 1.4. HelpTo open the main Help menu, navigate to Help > Help Contents. The Help menu displays all theavai

Page 8 - 1.2. Pull-quote Conventions

Development Toolkits5The tabs at the bottom of the Contents field provides different options for accessing Eclipsedocumentation. You can navigate thr

Page 9 - 2.1. Do You Need Help?

Chapter 1. Introduction to Eclipse6editor, for example, provides error parsing in the context of a single file, but some errors may onlybe visible whe

Page 10 - 2.2. We Need Feedback!

Chapter 2.7The Eclipse Integrated DevelopmentEnvironment (IDE)The entire user interface in Figure 2.1, “Eclipse User Interface (default)” is referred

Page 11 - Introduction to Eclipse

Chapter 2. The Eclipse Integrated Development Environment (IDE)8Figure 2.1, “Eclipse User Interface (default)” displays the default workbench for C/C+

Page 12

User Interface9The View Menu button in the Project Explorer View allows you to configure whether projects orworking sets are the top-level items in th

Page 13 - 1.2. Help In Eclipse

Developer GuideJeff JohnstonBenjamin KosnikAleksander KurtakovChris MollerPhil MuldoonAndrew OverholtCharley WangKent Sebastian

Page 14

Chapter 2. The Eclipse Integrated Development Environment (IDE)10The Tasks view allows you to track specially-marked reminder comments in the code. Th

Page 15 - 1.3. Development Toolkits

Useful Hints11Alternatively, you can also use Edit > Add Task to open the task Properties menu (Figure 2.8, “TaskProperties”). This will allow you

Page 16

Chapter 2. The Eclipse Integrated Development Environment (IDE)12Figure 2.10. Quick Access MenuIn Figure 2.10, “Quick Access Menu”, clicking Views >

Page 17 - Environment (IDE)

The quick access menu13Figure 2.11. Keyboard ShortcutsTo configure Eclipse keyboard shortcuts, press Shift+Ctrl+L again while the Keyboard Shortcutsli

Page 18

Chapter 2. The Eclipse Integrated Development Environment (IDE)14To customize the current perspective, navigate to Window > Customize Perspective.

Page 19

The quick access menu15Figure 2.15. Menu Visibility TabThe Menu Visibility tab configures what functions are visible in each main menu item. For a bri

Page 20

Chapter 2. The Eclipse Integrated Development Environment (IDE)16Figure 2.16. Command Group Availability TabCommand groups add functions or options to

Page 21 - 2.2. Useful Hints

libhover Plug-in17Figure 2.17. Shortcuts TabThe Shortcuts tab configures what menu items are available under the following submenus:• File > New• W

Page 22

Chapter 2. The Eclipse Integrated Development Environment (IDE)18In addition, C++ also has type definitions and templated classes to deal with. Such i

Page 23

libhover Plug-in19Figure 2.19. Using Hover HelpTo use code completion, select a string in the code and press Ctrl+Space. This will display allpossible

Page 24

Red Hat Enterprise Linux 6 Developer GuideAn introduction to application development tools in Red HatEnterprise Linux 6Edition 0Author Dave Brolley br

Page 26

Chapter 3.21Libraries and Runtime SupportRed Hat Enterprise Linux 6 supports the development of custom applications in a wide variety ofprogramming la

Page 27 - 2.2.2. libhover Plug-in

Chapter 3. Libraries and Runtime Support22This type of compatibility is defined by conformance with specified Application Binary Interfaces(ABIs).3.2.

Page 28 - 2.2.2.1. Setup and Usage

Static Linking23compliant to the latest revision of the language standards available in more recent Red Hat EnterpriseLinux releases.As such, Red Hat

Page 29

Chapter 3. Libraries and Runtime Support24• bo_CN• bo_IN• shs_CA• ber_DZ• ber_MA• en_NG• fil_PH• fur_IT• fy_DE• ha_NG• ig_NG• ik_CA• iu_CA• li_BE• li_

Page 30

The GNU C Library25• sched_getcpu• accept4• fallocate• fallocate64• inotify_init1• dup3• epoll_create1• pipe2• signalfd• eventfd• eventfd_read• eventf

Page 31 - Libraries and Runtime Support

Chapter 3. Libraries and Runtime Support263.3.2. The GNU C++ Standard LibraryThe libstdc++ package contains the GNU C++ Standard Library, which is an

Page 32 - 3.2.3. Policy

The GNU C++ Standard Library27• <mutex>• <random,• <ratio>• <regex>• <system_error>• <thread>• <tuple>• <typ

Page 33 - 3.3.1. The GNU C Library

Chapter 3. Libraries and Runtime Support28SYNOPSIS Inherits std::_Vector_base< _Tp, _Alloc >. Public Types typedef _Alloc allocato

Page 34

Boost29• boost-test• boost-thread• boost-waveNot included in the meta-package are packages for static linking or packages that depend on theunderlying

Page 35

Developer Guide This document describes the different features and utilities that make Red Hat Enterprise Linux 6an ideal enterprise platform for app

Page 36

Chapter 3. Libraries and Runtime Support30• Statechart• TR1• Typeof• Xpressive• Asio• Bitmap• Circular Buffer• Function Types• Fusion• GIL• Interproce

Page 37 - elements in any order

Qt31The main site for the development of Boost is hosted on boost.org11.3.3.4. QtThe qt package provides the Qt (pronounced "cute") cross-pl

Page 38 - 3.3.3. Boost

Chapter 3. Libraries and Runtime Support32• http://doc.qt.nokia.com/4.6/qt4-intro.html3.3.4.2. Qt CreatorQt Creator is a cross-platform IDE tailored t

Page 39 - 3.3.3.1. Boost Updates

KDE Development Framework33SonnetSonnet is a multilingual spell-checking application that supports automatic language detection,primary/backup diction

Page 40 - 3.3.3.2. Boost Documentation

Chapter 3. Libraries and Runtime Support34KNewStuff2KNewStuff2 is a collaborative data sharing library used by many KDE4 applications. For moreinforma

Page 41 - 3.3.4. Qt

Java35Help on module math:NAME mathFILE /usr/lib64/python2.6/lib-dynload/mathmodule.soDESCRIPTION This module is always available. It provides access

Page 42 - 3.3.5.1. KDE4 Architecture

Chapter 3. Libraries and Runtime Support363.3.8. RubyThe ruby package provides the Ruby interpreter and adds support for the Ruby programminglanguage.

Page 43

Perl37The main site for the development of Ruby is hosted on http://www.ruby-lang.org. The http://www.ruby-doc.org site also contains Ruby documentati

Page 44 - 3.3.6. Python

Chapter 3. Libraries and Runtime Support383.3.9.3. Perl DocumentationThe perldoc tool provides documentation on language and core modules. To learn mo

Page 45 - 3.3.7. Java

Chapter 4.39Compiling and BuildingRed Hat Enterprise Linux 6 includes many packages used for software development, inluding tools forcompiling and bui

Page 47 - 3.3.9. Perl

Chapter 4. Compiling and Building40• Updates in the 4.2 Series: http://gcc.gnu.org/gcc-4.2/changes.html• Updates in the 4.3 Series: http://gcc.gnu.or

Page 48 - 3.3.9.3. Perl Documentation

Language Compatibility41The default system C++ compiler included with Red Hat Enterprise Linux 6 conforms to the C++ ABIdefined by the Itanium C++ ABI

Page 49 - Compiling and Building

Chapter 4. Compiling and Building42The C ABI is considered to be stable, and has been so since at least RHEL3 (again, barring anyincompatibilities me

Page 50 - 4.1.2. Language Compatibility

Backwards Compatibility Packages43Object file changes, such as the ones listed above, may interfere with the portable use of prelink.4.1.4. Backwards

Page 51

Chapter 4. Compiling and Building44In brief, the tools work via the gcc command. This is the main driver for the compiler. It can be usedfrom the com

Page 52

Running GCC45}The following procedure illustrates the compilation process for C++ in its most basic form.Procedure 4.2. Compiling a 'Hello World&

Page 53 - 4.1.6. Running GCC

Chapter 4. Compiling and Building464.1.6.4. Recommended Optimization OptionsDifferent projects require different optimization options. There is no on

Page 54 - 4.1.6.2. Simple C++ Usage

Running GCC47String dump of section '.GCC.command.line': [ 0] hello.c [ 8] -mtune=generic [ 17] -O3 [ 1b] -Wall [

Page 55

Chapter 4. Compiling and Building483. Recompile and optimize source.c with profiling information gathered in step one:gcc source.c -fprofile-use -O2

Page 56

Running GCC49$ file hello64hello64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6

Page 57

Developer Guidevi5.2. GDB ...

Page 58

Chapter 4. Compiling and Building50Also important is to note that building with -m32 will in not adapt or convert a program to resolve anyissues aris

Page 59

Autotools Plug-in for Eclipse51The Autotools suite's most commonly-used tools are:autoconfGenerates the configure script from an input file (e.g.

Page 60 - 4.3. Autotools

Chapter 4. Compiling and Building52If a configure.ac file is available instead, then autoconf will automatically create the configurescript based on

Page 61 - 4.3.2. Configuration Script

Chapter 5.53DebuggingUseful, well-written software generally goes through different phases of application development,and mistakes can occur in each p

Page 62

Chapter 5. Debugging54not only the characteristics of each individual elements in the structure, but the morphology of thestructure as well.GDB requir

Page 63 - Debugging

Running GDB55The execution of a stopped program can be resumed in a number of ways. The following are the mostcommon.c (continue)The continue command

Page 64 - 5.2.1. Simple GDB

Chapter 5. Debugging56Ensure that the resulting binary hello is in the same directory as hello.c.2. Run gdb on the hello binary, i.e. gdb hello.3. Aft

Page 65 - 5.2.2. Running GDB

Conditional Breakpoints57 (gdb) n Hello, World! 9 return (0);The following sections describe more complex applications of GDB.5.2.3.

Page 66

Chapter 5. Debugging58 1 breakpoint keep y 0x080483f5 in main at iterations.c:8 stop only if i == 8936 brea

Page 67

Variable Tracking at Assignments59NoteNot all documented characteristics will apply to all instances of GDB because it is still in activedevelopment,

Page 68 - 5.2.7. GDB Documentation

viiPrefaceThis book describes the some of the more commonly-used programming resources in Red HatEnterprise Linux 6. Each phase of the application dev

Page 69 - 5.4. Python Pretty-Printers

Chapter 5. Debugging60To address this, the Red Hat Enterprise Linux 6 version of GDB is now compatible with Python pretty-printers. This allows the re

Page 70 - Easy to Learn

Chapter 6.61ProfilingDevelopers profile programs to focus attention on the areas of the program that have the largestimpact on performance. The types

Page 71 - Profiling

Chapter 6. Profiling62Figure 6.2. Profile ConfigurationFor more information on configuring and performing a profile run with each tool in Eclipse, ref

Page 72 - 6.2. Valgrind

Using Valgrind63cachegrindCachegrind is a cache profiler that accurately pinpoints sources of cache misses in code byperforming a detailed simulation

Page 73 - 6.2.2. Using Valgrind

Chapter 6. Profiling64• Memcheck• Massif• CachegrindThe Valgrind plug-in for Eclipse is provided by the eclipse-valgrind package. For moreinformation

Page 74 - 6.3. OProfile

Using OProfile65oparchiveThe oparchive command generates a directory populated with executable, debug, and OProfilesample files. This directory can be

Page 75 - 6.3.2. Using OProfile

Chapter 6. Profiling66Ease of UseThe OProfile Plug-in provides generally useful defaults for all options, usable for a majority of profilingruns. In a

Page 76 - 6.4. SystemTap

SystemTap Compile Server67The following sections describe new SystemTap features available in the Red Hat Enterprise Linux 6release.6.4.1. SystemTap C

Page 77

Chapter 6. Profiling68• The module was compiled using the --unprivileged option.• The module meets the restrictions required for use by an unprivilege

Page 78 - Unprivileged Users)

Eclipse-Callgraph69• SystemTap Beginner's Guide• SystemTap Tapset Reference• SystemTap Language Reference (documentation supplied by IBM)The Sys

Page 79 - 6.5. Eclipse-Callgraph

PrefaceviiiFile-related classes include filesystem for file systems, file for files, and dir fordirectories. Each class has its own associated set of

Page 80 - Chapter 6. Profiling

Chapter 6. Profiling70Figure 6.3. Eclipse-Callgraph ProfileAfter selecting an executable to profile, Eclipse-Callgraph will ask which files to probe.

Page 81 - 6.5.2. The Callgraph View

The Callgraph View71Figure 6.4. Selecting Files to Probe6.5.2. The Callgraph ViewThe Callgraph view's toolbar allows you to select a perspective

Page 82

Chapter 6. Profiling72Figure 6.6. Radial ViewThe Radial View displays all functions branching out from main(), with each function represented asa node

Page 83

The Callgraph View73Tree View also includes a thumbnail viewer to help you navigate through different call depths of thefunction tree.Figure 6.8. Leve

Page 84 - Go to Code

Chapter 6. Profiling74Figure 6.10. Aggregate ViewThe Aggregate View depicts all functions as boxes; the size of each box represents a function'se

Page 85 - 6.6.2. Using Perf

Perf Tool Commands75switches. For example, PCL counters can compute the Instructions Per Clock (IPC) from a process'scounts of instructions retir

Page 86

Chapter 6. Profiling76The perf tool can also record samples. For example, to record data on the make command and itschildren, use:perf record -- make

Page 87 - 6.7. ftrace

ftrace77 11.63%54959620202 libxml2.so.2.7.6 [.] xmlXPathNodeSetAdd__internal_alias 8.60%40634845107 libxml2.so.2.7.6

Page 88 - 6.7.2. ftrace Documentation

Chapter 6. Profiling786.7.2. ftrace DocumentationThe ftrace framework is fully documented in the following files:• ftrace - Function Tracer: file:///u

Page 89 - Appendix A. Revision History

79Appendix A. Revision HistoryRevision 1.0 Thu Oct 08 2009 Don Domingo [email protected] push

Page 90

Notes and Warningsixbooks Desktop documentation drafts mss photos stuff svnbooks_tests Desktop1 downloads images notes scrip

Page 92

81IndexSymbols.spec filespecfile Editorcompiling and building, 52Aadded localesGNU C Librarylibraries and runtime support, 24advantagesPython pretty-p

Page 93

Index82SystemTap, 67compiling a C Hello World programusageGCC, 44compiling a C++ Hello World programusageGCC, 45compiling and buildingAutotools, 50com

Page 94

83Rubylibraries and runtime support, 36SystemTapprofiling, 68Valgrindprofiling, 64DTK (development toolkits)development toolkitsEclipse, 5Dynamic Help

Page 95

Index84function tracerprofilingftrace, 77fundamental commandsfundamentalsGNU debugger, 54fundamental mechanismsGNU debuggerdebugging, 53fundamentalsGN

Page 96

85installationdebuginfo-packagesdebugging, 53integrated development environmentEclipse, 7interfaces (added new)GNU C Librarylibraries and runtime supp

Page 97

Index86Java, 35documentation, 35KDE Development Framework, 32Akonadi, 33documentation, 34KDE4 architecture, 32kdelibs-devel, 32KHTML, 33KIO, 33KJS, 33

Page 98

87new librariesBoostlibraries and runtime support, 29New Project WizardprojectsEclipse, 2nexttoolsGNU debugger, 55OopannotatetoolsOProfile, 64oparchiv

Page 99

Index88oprofiled, 64Performance Counters for Linux (PCL) andperf, 74plug-in for EclipseEclipse-Callgraph, 69SystemTap, 66Valgrind, 62Project Exploreru

Page 100

89Boostlibraries and runtime support, 28subsystem (PCL)profilingPerformance Counters for Linux (PCL) andperf, 74supported templatesAutotoolscompiling

Commentaires sur ces manuels

Pas de commentaire