Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE Podręcznik Użytkownika

Przeglądaj online lub pobierz Podręcznik Użytkownika dla Systemy operacyjne Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE. Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE User guide Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 100
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 0
1 2 3 4 5 6 ... 99 100

Podsumowanie treści

Strona 1 - Developer Guide

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

Strona 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

Strona 3 - Edition 0

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

Strona 4

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

Strona 5

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

Strona 6

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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+

Strona 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

Strona 13 - 1.2. Help In Eclipse

Developer GuideJeff JohnstonBenjamin KosnikAleksander KurtakovChris MollerPhil MuldoonAndrew OverholtCharley WangKent Sebastian

Strona 14

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

Strona 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

Strona 16

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

Strona 17 - Environment (IDE)

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

Strona 18

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

Strona 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

Strona 20

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

Strona 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

Strona 22

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

Strona 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

Strona 24

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

Strona 26

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

Strona 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.

Strona 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

Strona 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_

Strona 30

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

Strona 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

Strona 32 - 3.2.3. Policy

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

Strona 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

Strona 34

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

Strona 35

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

Strona 36

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

Strona 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

Strona 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

Strona 39 - 3.3.3.1. Boost Updates

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

Strona 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

Strona 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

Strona 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.

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 52

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

Strona 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

Strona 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 [

Strona 55

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

Strona 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

Strona 57

Developer Guidevi5.2. GDB ...

Strona 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

Strona 59

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

Strona 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

Strona 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

Strona 62

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

Strona 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

Strona 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

Strona 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.

Strona 66

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

Strona 67

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

Strona 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

Strona 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

Strona 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

Strona 71 - Profiling

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

Strona 72 - 6.2. Valgrind

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

Strona 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

Strona 74 - 6.3. OProfile

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

Strona 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

Strona 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

Strona 77

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

Strona 78 - Unprivileged Users)

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

Strona 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

Strona 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.

Strona 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

Strona 82

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

Strona 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

Strona 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

Strona 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

Strona 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

Strona 87 - 6.7. ftrace

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

Strona 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

Strona 89 - Appendix A. Revision History

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

Strona 90

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

Strona 92

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

Strona 93

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

Strona 94

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

Strona 95

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

Strona 96

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

Strona 97

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

Strona 98

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

Strona 99

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

Strona 100

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

Komentarze do niniejszej Instrukcji

Brak uwag