diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/about.html b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/about.html new file mode 100644 index 00000000000..5ee8cf34cec --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/about.html @@ -0,0 +1,115 @@ + + + + + +About This Guide + + + + +

About This Guide

+ + + + +

The C/C++ Development Tools (CDT) User's Guide describes the components +of the CDT Eclipse plugins that are available as part of the Eclipse project. This guide +describes how to use the CDT tools environment to build your C/C++ based applications. + +

+ +

The following may help you find information quickly: + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
If you want to:See:
Learn about perspectives, views, and editors IDE Concepts
Create a C or C++ program Developing C/C++ Programs
Track and control different versions of software Source Control
Debug your executables Debugging Programs
Create a new QNX C Application project Common Wizards
Run or debug your program Starting Your Programs
+ + +

+

This book is organized so you can learn what you need to know quickly and easily. Each chapter has these common sections: +

+ +

The tutorials are in a separate guide so you can print and use them side by side with the corresponding chapters in this guide.

+

+ +

+ + +

Assumptions

+ +

This guide assumes the following: + + +

+ + +

Note to Windows users

+ +

In our documentation, we use a forward slash +(/) as a delimiter in all pathnames, +including those pointing to Windows files. + + +

+

We also generally follow POSIX/UNIX filesystem conventions. + +

+ + + + + + diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/cdev.html b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/cdev.html new file mode 100644 index 00000000000..76b5c2c6bff --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/cdev.html @@ -0,0 +1,812 @@ + + + + + +Developing C/C++ Programs + + + +
+ + +

Developing C/C++ Programs

+ + + + +

+ +The C/C++ Development perspective is probably the perspective +where you'll spend most of your time. In it, you'll develop and build +your programs. As you move further through your project, you'll likely +use this perspective as the jump point for doing your debugging, program +analysis, and target system integration.

+

+ +Suggested prior reading:

+ +

+ +Related information:

+ +

+In this chapter: + + + +

Introduction

+ + +

+ +Before you begin C/C++ development, you must create a project to contain your code; in the IDE, all your work must be contained in projects.

+

+ +The views in the C/C++ Development perspective are driven primarily by selections you make in the C/C++ Editor and the C/C++ Projects view, a specialized version of the Navigator view. Ensure you understand their functionality thoroughly. + +

+ +

Wizards and the Launch Configurations dialog

+ +

In addition to perspectives and views, the IDE has two major "sections": wizards and the Launch Configurations dialog. To create and run your first program, you need both. The wizards let you quickly create a new project; the Launch Configurations dialog lets you set up how your program runs. +Once you've used all these parts of the IDE for the first time, you'll be able to create, build, and run your programs very quickly. For more information, see the Common Wizards and Starting Your Programs chapters.

+

+ +The C/C++ Development perspective also has many features that help you develop code quickly. Once you've learned the basics of creating programs and running them (in this chapter), take some time to browse through this chapter.

+

+ +

+ +

Controlling the IDE (C/C++ Projects view)

+ +

C/C++ Projects view

+

The C/C++ Projects view is probably the most important view in the IDE because you control your projects with it. The selections you make in the C/C++ Projects view greatly affect what information the other views display.

+

+ +The C/C++ Projects view offers a filtered and slightly rearranged version of the Navigator view.

+

The Navigator view is part of the core Eclipse platform, so some of the features are documented there: + +

+ +

The C/C++ Projects view has many of the same features as the Navigator view, but is configured specifically for C and C++ development. At first glance, the two may seem identical, but the C/C++ Projects view:

+ + +

Opening files

+ +

To open files and display them in the editor area:

+ + + + +
=>>In the C/C++ Projects view, double-click the file to be opened. +The file -- even if it's executable -- opens in the editor area.
+ + + +

Opening projects

+ +

Because the C/C++ Projects view hides closed projects, you must use the Navigator view to open them.

+

+ +To open projects:

+ + + + +
=>>In the Navigator view, right-click your project, and select Open Project. +The project opens and appears in the C/C++ Projects view.
+ + + +

Filtering files

+ +

To filter files in the C/C++ Projects view:

+
    + +
  1. In the C/C++ Projects view, click the menu dropdown button Icon; menu dropdown. +
  2. +
  3. Select Filter. + The File Filter dialog appears:

    C/C++ Projects view; File Filter dialog +

  4. +
  5. In the filter pane, select the types of files you wish to hide. The .* selection hides files that start with a period, such as .cdtproject and .project. +
  6. +
  7. Click OK. + The C/C++ Projects view automatically refreshes and shows only the unfiltered file types. +
  8. +
+ + +

Outlines of source and executable files

+ +

+ +The C/C++ Projects view shows you the outline of .c, .cc, and .h files:

+

C/C++ Projects view; outline; source

+

This outline is similar to that found in the Outline view. To learn more about the Outline view, see the "Code synopsis (Outline view)" section in this chapter.

+

+

The C/C++ Projects view shows you the outlines of executables as well. You can examine the structure of executables to see not only the functions that you declared and used in the file, but the elements that were called indirectly, such as malloc(), _init(), and errno:

+

C/C++ Projects view; outline; executable

+

+

To view a file outline in the C/C++ Project view:

+ + + + +
=>>In the C/C++ Projects view, click the "+" symbol to the left of any .c, .cc, or .h, or executable file. All the executables are grouped in the virtual bin directory. The tree expands to show the outline for that file. Click the "-" symbol to collapse the tree again.
+ + + +

Creating projects (New Project wizard)

+ +

+@@@ NOTE I've left this in even though it is QNX specific, we would have to +customize it to make it CDT generic +

+ +

If you're creating an application from scratch, you'll probably want to create a QNX C Application Project or a QNX C ++ Application Project.

+

+ +
+ + + +
Note:For examples of creating specific types of projects, see the Tutorials book. We recommend that you create a few tutorial projects before you do too much reading. Having hands-on experience with the IDE gives you a better context for what you read in this guide. +

+ +For a complete explanation of all the C/C++ project types and options, see the Common Wizards chapter.

+
+ + +

To create a "Hello World!" QNX C Application Project:

+
    + +
  1. In the C/C++ Development perspective, click the Create a new QNX C Application Project button Icon: Create a QNX C Application Project button. + The New Project dialog appears:

    Wizard: Create a QNX C Application Project +

  2. +
  3. In the Name field, type a name for your project (e.g. myHelloWorldProject). +
  4. +
  5. Click Next. The dialog displays the appropriate with tabs. +
  6. +
  7. In the Options tab, enable Build debug version and Build release version:

    Common wizards: C/C++ Projects; Options tab + +

  8. +
  9. Click Finish. + The IDE creates the project and displays the C file (e.g. myHelloWorldProject.c in the C Editor. It contains a working "Hello, World!" program:

    C/C++ Editor; Hello World! program +

  10. +
+ + +

Building projects (make)

+ +

Once you've created your project, you can build it. The IDE uses the same make utility and makefiles used on the command line. The IDE can perform makes automatically or let you do them manually. When you do manual builds, you can also decide on the scope of the build.

+

+ +You can watch the progress and see the build information in the C-Build view. If building your programs generates any errors or warnings, you can see them in the Tasks view.

+

This section includes:

+ + +

Build terminology

+ +

The IDE uses a number of terms to describe the scope of the build: + +

+
+ +
Build +
+
Build only the components affected by modified files in that particular project (i.e. make all). +
+
Clean +
+
Delete all the built components (i.e. .o, .so, .exe, and so on) without building anything (i.e. make clean). +
+
Rebuild +
+
Build every component from scratch. A Rebuild is really a Clean followed by a Build (i.e. make clean; make all). + +
+
+ + +

Choosing autobuild or manual build

+ +

By default, the IDE automatically rebuilds every time you change a resource (e.g. file). This is handy if you have only a few open projects and if they're small. As the projects get larger, this feature can become a bit of a hindrance. You may find that you prefer to turn autobuilding off.

+

+ +To turn off autobuilding:

+
    + +
  1. From the main menu, select Window-->Preferences. +
  2. +
  3. In the left pane, select Workbench. + The dialog displays your workbench preferences:

    Window; Preferences; Workbench +

  4. +
  5. In the right pane, disable the Perform build automatically on resource modification option. The IDE now builds only when you ask it to. + +
  6. +
+ + +

Autobuilds

+ +

+ +The IDE builds automatically every time you save a change. Thus, if you're using the default IDE configuration, you don't need to do anything. Even in this setting, you can build manually as well. Because the IDE always does incremental builds while in autobuild mode, you may wish to manually do a clean build to ensure you have fresh executables.

+ +

Manual builds

+ +

Manual builds let you choose the scope of the build, as well as whether to do a Build, a Clean, or a Rebuild.

+ +

Building everything

+ +

The IDE lets you manually choose to rebuild all your open projects. Depending on the number of projects, the size of the projects, and the number of target architectures, this can take a significant amount of time.

+

+ +To rebuild all your open projects:

+ + + + +
=>>From the main menu, select Project-->Rebuild All.
+ + + +

Building selected projects

+ +

Because rebuilding all your open projects may be time-consuming, you may often wish to build only certain projects individually.

+

+ +To rebuild a single project:

+ + + + +
=>>In the C/C++ Projects view, right-click a project and select one of: +
    +
  • Build +
  • +
  • Rebuild +
  • +
  • Clean.
  • +
+

The IDE builds the selected project as you desired. For more information on the build methods, see the "Build terminology" section in this chapter.

C/C++ Projects view; building

+ + + +

Manual build preferences

+ +

To have the IDE save your unsaved resources before manual builds:

+
    + +
  1. From the main menu, select Window-->Preferences. +
  2. +
  3. In the left pane, select Workbench. +
  4. +
  5. In the right pane, enable the Save all modified resources automatically prior to manual build option. + The IDE saves your resources before it builds.
  6. +
+ + +

Configuring project build order

+ +

The IDE lets you determine the build order of your projects. If certain projects must be built before others, you can set that. If your project refers to another project, the IDE builds that project first. + +

+ +
+ + + +
Note:Setting the build order doesn't cause the IDE to rebuild projects that depend on the project; you must rebuild all projects to ensure all the changes are propagated.
+
+ + +

+ +To manually configure the project build order:

+
    + +
  1. From the main menu, select Window-->Preferences. +
  2. +
  3. In the left pane, select Build Order. +
  4. +
  5. Disable the Use default build order option. + You may now configure the build order as you desire. When you're done, click Apply, then OK.
  6. +
+ + +

Creating personal build options (make targets)

+ + +
+ + + +
Note:In this subsection, "targets" refer to actions in the makefiles, not target machines.
+
+ + +

A make target is an action called by the make utility to perform a customized build-related task. For example, many makefiles support a target named clean, which gets called as make clean. The IDE lets you call your own target such as myMakeAction to be called as make myMakeAction. You can also use a make target to pass options such as CPULIST=x86, which causes the make utility to build only for x86. Of course, these options work only if they're already defined in the makefile.

+

+ +If you've added your own make targets, you can configure the IDE to call them specifically.

+

+ +To add a customized make target to the C/C++ Project view right-click menu:

+
    + +
  1. In the C/C++ Projects view, right-click a project and select Add Make Targets. +
  2. +
  3. Type the name of the make target (e.g. myMakeOption): +

    C/C++ Projects view; Targets Dialog dialog

  4. +
  5. Click OK. + The target option appears in the right-click menu of the C/C++ Projects view.
  6. +
+ +

+ +To use a customized make target:

+
    + +
  1. In the C/C++ Projects view, right-click a project. The right-click context menu appears. If there are any customized make targets for your project, the Make item is selectable. +
  2. +
  3. Choose your make target from the Make menu: +

    C/C++ Projects view; make target; using

  4. +
+ + +

Running projects (launcher)

+

+@@@ Again the same thing applies here about stripping out the QNX +specific information (ie regarding needing a target for launch) and +replacing it with generic CDT information. I've much of it in for +context. +

+

+ +Once you've built your project, you'll want to run it. The IDE lets you +run or debug your executables on either a local or a remote QNX Neutrino +target machine. For a description of local and remote targets, see the +IDE Concepts chapter.

+

+ +To run or debug your program, you must create a QNX Target System Project +that specifies how the IDE communicates with your target. You must also create +a Launch Configuration that describes how the program runs on your target. +

+ +
+ + + +
Note:For a complete description of the Launch Configurations dialog and the available options, see the Starting Your Programs chapter.

+
+ +To run your "Hello World!" QNX C Application Project:

+
    + +
  1. In the C/C++ Projects view, select your project (e.g. myHelloWorldProject). +
  2. +
  3. In the C/C++ Development perspective, click the dropdown menu Icon: Menu dropdown part of the run menu button set Icon: RunIcon: Menu dropdown. +
  4. +
  5. Select Run. + The Launch Configurations dialog appears:

    Launcher +

  6. +
  7. In the left pane, select C/C++ QNX QConn (IP). +
  8. +
  9. Click New. + The dialog displays the appropriate tabs:

    Launcher; Main tab +

  10. +
  11. In the Name field, type a meaningful name for your launch configuration (e.g. myHelloProject IP launch). + The IDE automatically fills in the Project field. +
  12. +
  13. Click the Search button beside the C/C++ Application field. + The Program Selection dialog appears. + +
    + + + +
    Note:If the Program Selection dialog is blank, you must cancel and build your project. To learn how to build projects, see the "Building projects (make)" section. +
    +
    + + +
  14. +
  15. Select a program to run. The _g indicates it's compiled with debug symbols. If you wish to run on an x86 target, select myHelloWorldProject [x86le] +
  16. +
  17. Click OK. +
  18. +
  19. In the Target Options pane, select your target. +
  20. +
  21. Click Run. + Your program runs. The IDE displays the output in the Console view. For example: +

    Console view; Hello World! +

  22. +
+ + +

Writing code (C/C++ Editor)

+ +

Within the C/C++ Development perspective, the C/C++ Editor is where you'll likely spend the great majority of your time -- you use it to write and modify your code:

+

C/C++ Editor

+

The C/C++ Editor drives many of the other views. As you code, many of the other views update dynamically (even if you haven't saved).

+

This section includes:

+ + +

C/C++ Editor layout

+ +

The C/C++ Editor has a gray border on each side. The border on the left margin might contain icons that flag errors, warnings, or problems detected by the IDE. It also displays icons for any bookmarks, breakpoints, or tasks from the Tasks view. The icons in the left margin correspond to the line of code.

+

The border on the right margin displays red and yellow bars that correspond to the errors and warnings from the Tasks view. Unlike the left margin, the right margin displays the icons for the entire length of the file.

+

+ + +

+ +

Finishing function names (Content Assist)

+ +

The IDE can help you finish the names of functions if they're long, or you can't remember the exact spelling.

+

+ +To use Content Assist:

+
    + +
  1. In the C/C++ Editor, type at least the first letter of the function. +
  2. +
  3. Press Ctrl-Space. (Or, right-click near the cursor and select Content Assist). + A menu with the available functions appears:

    C/C++ Editor; Content Assist +

  4. +
  5. You may do one of the following: +
  6. +
+ + +

Inserting code snippets (Code Templates)

+ +

+ +The IDE can help you by inserting snippets of code such as an empty do-while structure. If you've used the Content Assist feature, you may have already noticed this feature; you access it the same way.

+

+ +To use Code Templates:

+ + + + +
=>>Follow the procedure for using Content Assist, with the following exception: +
    +
  • If any code templates start with the letter combination you've typed, they appear first in the list and have a different icon:

    C/C++ Editor; Code Templates; using

  • +
+ + +

To add Code Templates:

+
    + +
  1. From the main menu, select Window-->Preferences. +
  2. +
  3. In the left pane, select C/C++-->Code Templates. +
  4. +
  5. Click New. + A dialog for adding new templates appears. You can view the format of existing templates by selecting them and clicking Edit:

    Window; Preferences; C/C++; Code Templates dialog

  6. +
+ + +

Adding #include directives (Add Include)

+ +

To insert the #include directive for any documented QNX Neutrino function:

+
    + +
  1. In the C/C++ Editor, highlight the entire function name by double-clicking it. Don't highlight the parentheses or any leading tabs or spaces. +
  2. +
  3. Right-click and select Add Include. + The IDE automatically adds the #include statement to the top of the file, if it isn't already there.
  4. +
+ + +

Hover help

+ +

The IDE can give you information about functions while you're coding.

+

+ +To use hover help:

+ + + + +
=>>In the C/C++ Editor, place your pointer over a function. +A tag appears, showing the function summary and synopsis:

C/C++ Editor; Hover help

+ + + +

Commenting out code

+ +

The IDE makes it easy to comment out large sections of code. You can quickly add // characters to the beginning of lines, letting you comment out large sections, even if they have /* */ comments. +When you uncomment lines, the IDE removes the leading // characters from all lines that have them, so be careful not to accidentally uncomment sections. Also, the IDE comments or uncomments the selected lines -- if you select a partial line, the IDE comments out the entire line, not just the highlighted section of code.

+

+ +To comment or uncomment a block of code:

+
    + +
  1. In the C/C++ Editor, highlight a section of code to be commented or uncommented. For one line, place your cursor on that line. +
  2. +
  3. Right-click and select Comment or Uncomment. +
  4. +
+ + +

Customizing the C/C++ Editor appearance

+ +

You can change the font, set the background color, display line numbers, and control many other visual aspects of the C/C++ Editor. You can also configure context highlighting, and change how the Code Assist feature works. + +

+

To access the C/C++ Editor preferences dialog:

+
    + +
  1. Select Window-->Preferences. + The Preferences dialog appears. +
  2. +
  3. In the left pane, select C/C++-->C/C++ Editor.
  4. +
+ + +

Using other editors

+ +

The IDE lets you use other editors, but you should consider the added functionality the C/C++ Editor offers before changing.

+

+ +The C/C++ Editor is highly integrated with the IDE. The other views are designed to support the C/C++ Editor by updating dynamically. Since other editors aren't designed to interface with the IDE, you won't get the support from the views that the IDE provides.

+

+ +You can use other editors either outside or inside the IDE. + +

+ +

Outside the IDE

+ +

You can edit your code with an editor started outside of the IDE (e.g. from the command line). When you're done editing, you'll have to synchronize the IDE with the changes.

+

+ +To synchronize the IDE with changes you've made outside of the IDE:

+ + + + +
=>>In the C/C++ Projects view, right-click the tree pane and select Refresh. +The IDE updates to reflect any changes you've made (such as creating new files).
+ + + +

Within the IDE

+ +

+ +The IDE lets you set file associations that determine the editor you use for each file type. For example, you can tell the IDE to use an external program such as WordPad to edit all .h files. Once that preference is set, you can double-click a file in the C/C++ Projects view, and the IDE automatically opens the file in your selected program.

+

+ +If the IDE doesn't have a set association for a certain file type, it uses the OS defaults. Thus, in Windows, double-clicking on a .DOC file automatically opens the file in MS Word or WordPad.

+

+ +For information about file associations, follow these links in the Eclipse Workbench User Guide: Reference-->Preferences-->File Associations.

+

+ +

More development features

+ +

The IDE has many features that help you work faster. Not all the features are things you'd necessarily think to look for; after you've used the IDE for a while, take some time to read this entire section.

+

+ +This section includes:

+ + +

Tracking remaining work (Tasks view)

+ +

+ +The Tasks view provides you with a list of errors and warnings related to your projects. These are typically syntax errors, typos, and other programming errors found by the compiler:

+

Tasks view + +

+

The Tasks view is part of the core Eclipse platform. For more information about the Tasks view, follow these links in the Workbench User Guide: Reference-->User interface information-->View and Editors-->Tasks view.

+

+ +The IDE also shows corresponding markers in several other locations:

+ + +

Jumping to errors

+ +

To quickly jump to the source of errors (if the IDE can determine where it is):

+ + + + +
=>>In the Tasks view, double-click the error marker Icon: Error marker or warning marker Icon: Warning marker. +The file opens in the editor area, and the cursor jumps to the offending line.
+ + +

+ +To jump to errors sequentially:

+ + + + +
=>>Click the Jump to next error marker button Icon: Jump to next error marker button or Jump to previous error marker button Icon: Jump to previous error marker button.
+ + + +

Filtering errors

+ +

Depending on the complexity and stage of your program, the IDE can generate an overwhelming number of errors. The IDE lets you customize the Tasks view so you see only the errors you want to see.

+

+ +To access the error filtering dialog:

+ + + + +
=>>In the Tasks view, click the Filter icon Icon: Filter button. +The Filter Tasks dialog appears and lets you adjust the scope of the errors shown in the Tasks view. To see all errors and warnings, check all the boxes in Show items of type and enable On any resource:

Tasks view; Filter Tasks dialog

+ + + +

Setting reminders

+ +

The Tasks view lets you create your own tasks. In addition to having the Tasks view automatically list build errors, you can set personal reminders regarding the unfinished function you're writing, the error handling routine you want to check, or anything else.

+

+ +To access the New Tasks dialog to add a personal task:

+ + + + +
=>>In the Tasks view, right-click the tasks pane and select New Task. +A New Tasks dialog appears:

Tasks view; New Tasks dialog

+ + +

To remove a personal task:

+ + + + +
=>>In the Tasks view, right-click the task and select one of Delete or Mark Completed.
+ + + +

Code synopsis (Outline view)

+ +

+ +The Outline view gives you a structural view of your C/C++ source code:

+

Outline view

+

It shows the elements in the source file in the order they occur, including functions, libraries, and variables. You may also sort the list alphabetically. If you double-click an entry in the Outline view, the C/C++ Editor moves the cursor to the start of the item selected. (For example, to jump to the start of main() in the C/C++ Editor, double-click main() in the Outline view.)

+ +

Checking your build (C-Build view)

+ +

+ +The IDE displays the output from the make utility in the C-Build view:

+

C-Build view + +

+ +

Customizing the C-Build view

+ +

You can choose to clear the C-Build view before each new build or let the results of each subsequent build to append to the display. You can have the C-Build view brought to the top when you build.

+

+ +To access the C-Build view configurations:

+
    + +
  1. From the main menu, select Window-->Preferences. +
  2. +
  3. In the left pane, select C/C++:

    C-Build view; configurations

  4. +
+ + + + + + + + diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/conc.html b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/conc.html new file mode 100644 index 00000000000..915c47f13f1 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/conc.html @@ -0,0 +1,273 @@ + + + + + +IDE Concepts + + + +
+ + +

IDE Concepts

+ + + + + +

+ +This chapter introduces a number of terms and concepts that are used throughout this +guide and the core Eclipse documentation.

+

Related information:

+ +

+In this chapter: + + +

Workbench

+ +

The workbench is the window that appears when you run the IDE. It includes:

+ +

+

+ +
+

IDE Concepts; workbench with C/C++ Development perspective

+
+ + +

Major components of the IDE workbench.

+
+
+
+ + + +
+ + + +
Note:Eclipse is written in JAVA and is interpreted by a Java Virtual Machine (JVM) +that's specific to the host OS. So, whether you run Eclipse on Windows, +QNX Neutrino, or Solaris, you're running the same code. However, you might +notice some differences in the user interface.
+
+ + +

The CDT provides a graphical development environment for C and C++ +developers. The CDT works in a complimentary manner with many of the +same tools that you use on the command line. The CDT communicates with +and interprets messages from many utilities, including:

+ + + +

+ +

Perspectives

+ +

A perspective is a task-oriented configuration of the workbench window.

+

+ +For example, if you're debugging, you use the preconfigured Debug +perspective. This perspective sets up the IDE to show all the tools related to +debugging, but doesn't show the elements and tools related to profiling, for example. +You can customize a perspective by adding and removing views.

+ +Perspectives generally consist of these components:

+ + +

Editors and views

+ +

+ +Editors are what you use to change the content of your files. Each editor +in the IDE is for a specific set of files. The editor that you'll likely use +the most for C and C++ development is the C/C++ Editor.

+

+ +Views take information and organize it in various convenient ways. +For example, the Outline view shows you a list of all the function +names when you're editing a C file in the C/C++ Editor. +The Outline view is dynamic; if you declare a function called mynewfunc(), the Outline view immediately lists it, even if you haven't saved the file yet.

+

Views provide:

+ +

+

+ +Different views may show you different interpretations of the same +information. For example, the Navigator view shows all +your projects; the C/C++ Projects view shows just the +C and C++ projects you have open.

+

+ +The editor area is a section of the workbench window reserved for editors. All the editors live together in the editor area; all the views can be anywhere except in the editor area.

+

+ +The IDE lets you rearrange views and editors so they're beside each other (tiled) or stacked on top of each other (tabbed), among other possibilities.

+

+ +To see how dynamic the interface is, see the Perspectives, Views, and Editors movie. + +

+ +

Projects and workspace

+ +

Projects are generic containers for your source code, makefiles, +and binaries. Before you do any work in the IDE, you must create projects to +store your work. Developers using the CDT will most ofent work with C Project.

+

Projects can be open or closed. If they're closed, you can't access them.

+

When you create a file within a project, the IDE also creates a record +(local history) of every time you changed that file and how you changed it.

+

+ +Your workspace is where you keep your projects. For the exact location of your workspace, see the appendix Where Files Are Stored.

+

+ +
+ + + +
Note:Don't use spaces in projects and filenames; they can cause problems with some tools, such as the make utility. +

Also, don't use case alone to distinguish files and projects; Unix-based OS filenames are case-sensitive, but Windows filenames aren't. Thus, Hello.c and hello.c overwrite each other in Windows, but are separate files elsewhere.

+
+ + + +

How the IDE looks at projects

+ +

The IDE associates projects with natures, tags that tell the IDE about the properties of each project. + +

+

The IDE doesn't support nested projects; each project must be organized as a discrete entity. The IDE does support project dependencies by allowing a project to reference other projects that reside in your workspace.

+

+ +The most common projects look like this to the IDE:

+ + + + + + + + + + + + + + + + + + +
Project Associated natures
Simple Project  
Standard Make C Application Project C
Standard Make C++ Application Project C, C++
+ +

The natures tell the IDE what can and can't be done with each project. The IDE also uses the natures to filter out projects that would be contextually irrelevant (e.g. nonlibrary projects from a list of library projects).

+

+ +In this guide, you'll see mixed references such as:

+ +

The IDE saves these natures and other information in .project and .cdtproject files in each project. To ensure the natures persist in CVS, include these files when you commit your project. + + + +

+ +

Launcher

+ +

Before you run any program, you must use the launcher to specify what +program to run, what arguments to pass to the program, and so on.

+

+ +If you want to run the program with different you can either modify +an existing launch configuration or create a new Launch Configuration. +Once you save the Launch Configuration, you can quickly rerun +each configuration. + +

+ +

Resources

+ +

Resources is a collective term for projects, folders, and files that exist in the workbench. You store all your resources in your workspace.

+ +

Wizards

+ +

Wizards guide you through a sequenced set of tasks. For example, to create a QNX C Application Project, you run a wizard that takes you through all the steps and gathers all the necessary information before creating the project. For more information, see the Common Wizards chapter.

+

+ + + +

+ + + + + + + diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/cvs.html b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/cvs.html new file mode 100644 index 00000000000..3e63d6c5726 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/cvs.html @@ -0,0 +1,130 @@ + + + + + +Source Control + + + +
+ + +

Source Control

+ +

+If you use CVS, you can check code in and out without leaving the IDE.

+

+ +Related information:

+ +

Suggested prior reading:

+ +

+In this chapter: + + +

Introduction

+ +

The CVS Repository Exploring perspective lets you bring code from CVS into your workspace. +While you're working on your code, the IDE automatically keeps track of the changes you make; it lets you roll back to an earlier version of a file that you saved but didn't commit to CVS. If another developer changes the source in CVS while you're working on it, the IDE helps you synchronize with CVS and resolve any conflicts. Finally, the CVS Repository Exploring perspective lets you check the modified code back into CVS.

+

+ +
+ + + +
Note:The IDE stores project information in .project and .cdtproject +files; you must include them with your project when you commit it to CVS. Otherwise, +you must manually set the nature of the project (e.g. Standard C Project). +For more information about setting project natures, see the Common +Wizards chapter.
+
+ + +

Unlike many other components of the IDE, the CVS Repository Exploring perspective doesn't connect to a utility. Instead of connecting via the cvs utility, the IDE uses its own engine to connect directly to your CVS repository. + +

+

Because the CVS Repository Exploring perspective is a core Eclipse feature, we've covered the perspective only lightly in this book. For more information, follow these links the Eclipse Workbench User Guide: Tasks-->Working in the team environment.

+

+ +

This table may help you find information more easily:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
If you want to: + See:
Connect to a CVS repository + Tasks-->Working in the team environment-->Working with a CVS repository-->Creating a CVS repository location
Check code out of a CVS repository + Tasks-->Working in the team environment-->Working with projects shared with CVS-->Checking out a project from a CVS repository
Synchronize with a CVS repository + Tasks-->Working in the team environment-->Synchronizing with the repository, especially the Updating section
Resolve CVS conflicts + Tasks-->Working in the team environment-->Synchronizing with the repository-->Resolving conflicts +
Prevent certain files from being committed to CVS + Tasks-->Working in the team environment-->Synchronizing with the repository-->Version control life cycle: adding and ignoring resources + +
Create and apply a patch + Tasks-->Working in the team environment-->Working with patches
Track code changes that haven't been committed to CVS + Tasks-->Working with local history, especially the Comparing resources with the local history section
View an online FAQ about the CVS Repository Exploring perspective + Reference-->Team Support-->CVS
+ + + + + + + + diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/cwiz.html b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/cwiz.html new file mode 100644 index 00000000000..cb364e3f12b --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/cwiz.html @@ -0,0 +1,470 @@ + + + + + +Common Wizards + + + +
+ + +

Common Wizards

+ +

+ +

+

+In this chapter: + +

+ +

Introduction

+ +

Wizards guide you through a sequenced set of tasks. In the IDE, these tasks may +be creating something new (e.g. a project) or converting one thing to another +(e.g. converting to a Standard C project). Most often, you use wizards to create +new projects and folders.

+

+ +Wizards aren't directly connected to any perspective, though you're more likely to call them from some perspectives than from others (most likely from the C/C++ Development perspective).

+

You can access all the wizards from the main menu by selecting File-->New. The File-->New-->Project selection filters out all the wizards except projects; File-->New-->Other doesn't filter anything. (The exception to this is Target System Project, which, while labeled as a project, isn't a project as far as the IDE is concerned.)

+

In the New Project dialog, the wizards are further sorted: selecting C in the left pane displays all the projects with a C nature in the IDE; selecting QNX in the left pane shows all the projects with a QNX nature:

+

Common wizards dialog

+

Notice the overlap: the QNX C Application Project wizard appears in the right pane for both C and QNX.

+

+ +So-called "simple" wizards show the very basic elements of projects: Project, Folder, and File. These elements have no natures associated with them. You can access the wizards for these by selecting File-->New-->Other, then selecting Simple from the left pane.

+

+ +
+ + + +
Note:

Although projects may appear as directories in your workspace, the IDE attaches special meaning to them. The IDE won't automatically recognize a directory you create in your workspace directory as a project.

+ +The IDE automatically recognizes directories and new files of any type if you create them outside of the IDE (i.e. using Windows Explorer) and place them in a project directory. To have the IDE recognize them, in the Navigator view, right-click the navigator pane and select Refresh.

+
+ + + +

Creating a C/C++ project (New Project wizard)

+ +

The New Project wizard helps you create a C or C++ project.

+

This section includes:

+ + +

Types of projects

+ +

The IDE lets you create a variety of projects, each with certain properties. Most of these projects are also subdivided into C or C++ projects: + +

+
+ +
Standard Make C Project
Standard Make C++ Project +
+
A basic C or C++ project that uses a standard makefile and GNU make to build the source files. You don't get the added functionality provided by the QNX build organization and the common.mk file. + +
+
+ +

Creating your C/C++ project (New Projects wizard)

+ +

To create a C/C++ project : + +

+
    + +
  1. From the menu, select File-->New-->Project. +The New dialog appears. Projects are filtered by the natures listed in the left pane. +
  2. +
  3. In the left pane, select the nature in the table:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    If you want to build: + Select:
    Standard Make C Application Project + C
    QNX C Application Project + C or QNX
    QNX C Library Project + C or QNX
    Standard Make C++ Application Project + C++
    QNX C++ Application Project + C++ or QNX
    QNX C++ Library Project + C++ or QNX
    + + +
  4. +
  5. In the right pane, select the type of project that you want (e.g. QNX C Application Project). +
  6. +
  7. Click Next. +
  8. +
  9. Type a name for your project in the Name field. +
  10. +
  11. Ensure that Use Default Location is checked. Don't use a different location. +
  12. +
  13. Click Next. + The wizard displays the appropriate tabs. +
  14. +
  15. Select each tab and fill in the required information. The fields for each tab are described in the "New C/C++ Project wizard tabs" section, below. +
  16. +
  17. Click Finish. +The IDE creates your new project in your workspace.
  18. +
+ + +
+ + + +
Note:In the C/C++ Development perspective, you can also access the QNX C/C++ Projects with the +Icon: QNX C++ Library Project   +Icon: QNX C Library Project  +Icon: QNX C++ Application Project  +Icon: QNX C Application Project  + buttons. +
+
+ + + +

New C/C++ Project wizard tabs

+ +

Depending on the type of project you choose, the New Project wizard displays different tabs: + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Project Type + Architecture tab,
Options tab +
Projects tab,
Build Settings tab +
Library tab + +
Standard Make C Project or
Standard Make C++ Project +
Yes + No + No + +
QNX C Application Project or
QNX C++ Application Project +
Yes + Yes + No + +
QNX C Library Project or
QNX C++ Library Project +
Yes + Yes + Yes + +
+ + +
+ + + +
Note: You can find the default settings for the New Project wizard by selecting Window-->Preferences from the main menu. From the left pane, select C/C++, then New QNX Projects.
+
+ + + +

Architecture tab

+ +

The Architecture tab lets you choose the platforms to compile executables for:

+

Common wizards: C/C++ Projects; Architecture tab

+

For example, to build for a PowerPC platform, enable PPC (Big Endian).

+

+ +If you've already created a QNX Target System Project, you'll also see entries such as Doug [localhost - x 86]. These let you build specifically for a configured target. If you also enable X86 (Little Endian), the IDE builds only one executable, not two.

+

+ +You must choose at least one platform. + +

+ +

Projects tab

+ +

The Projects tab lets you configure your preferred order of building:

+

Common wizards: C/C++ Projects; Projects tab

+

For example, if you associate myProject with mySubProject, the IDE builds mySubProject first during rebuilds. If you change mySubProject, the IDE doesn't automatically rebuild myProject. + + +

+ +

Build Settings tab

+ +

The Build Settings tab lets you configure how the IDE handles make errors and what command to use to build your project:

+

Common wizards: C/C++ Projects; Build Settings tab + + +

+
+ +
Build Settings
+
If you want the IDE to stop building when it encounters a make error, enable Stop on Error. Otherwise, enable Keep Going On Error. + +
+
Build Command
+
If you want the IDE to use the default make command, enable Use Default. If you want to use a different utility to build your project, disable Use Default and enter your own command in the Build Command field (e.g. C:\myCustomizedMakeProgram). + +
+
+ + +

Options tab

+ +

The Options tab lets you choose what type of executables the IDE builds:

+

Common wizards: C/C++ Projects; Options tab + +

+
+ +
Build Type
+
To build a regular executable, enable Build release version. To build a debuggable executable, enable Build debug version (debug versions have _g appended to their filename). +

+ +You must select at least one build type. + + +

+
Build Options
+
To fully enable profiling with the QNX Application Profiler perspective, enable Build with Profiling. The IDE adds profiling code to all the versions selected in Build Types. See the Profiling Your Application chapter.
+
+ + +

Library tab

+ +

The Library tab lets you choose the type of library you wish to build (e.g. Static library, Shared library):

+

Common wizards: C/C++ Projects; Library tab

+
+ +
Static library (libxx.a) +
+
Combine binary object files (i.e. *.o) into an archive that will later be directly linked into an executable. + +
+
Shared library (libxx.so) +
+
Combine binary objects together and join them so they are relocatable and can be shared by many processes. Shared libraries are named using the format libxx.so.version, where version is a number with a default of 1. The libxx.so file symlinks to the latest version. + +
+
Static library for shared objects (libxxS.a) +
+
Same as static library, but using position-independent code (PIC). Use this for a library that will later be linked into a shared object. The System Builder uses these types of libraries to create new shared libraries that contain only the symbols that are absolutely required by a specific set of programs. + +
+
Shared library without export (xx.so) +
+
A shared library without versioning. Generally, you manually open the library with the dlopen() function and look up specific functions with the dlsym() function.
+
+ +

You must choose one of the options. + + +

+ +

Creating a target (New Target System Project wizard)

+ +

You must create a Target System Project for every target you have. When you create a launch configuration, you have the option of adding a new target from within the Launch Configurations dialog. When you do, the IDE opens up the New Target System Project wizard.

+

+ +To create a new target:

+
    + +
  1. From the menu, select File-->New-->Other. +
  2. +
  3. In the left pane, select QNX. +
  4. +
  5. In the right pane, select QNX Target System Project. +
  6. +
  7. Click Next. + The New QNX Target System Project wizard appears:

    + Common wizards: New Target System Project +

  8. +
  9. Fill in the fields described below: +
    + +
    Target Name +
    +
    Type a descriptive name for your QNX Target System Project. + +
    +
    Project contents +
    +
    Enable Use default to store it in your workspace, or disable it and select another location in the Directory field. + +
    +
    QNX Connector Selection +
    +
    Type the target connection in the Hostname or IP and Port fields. If you're running the IDE on a QNX Neutrino machine running qconn, make sure Use local QNX Connector is enabled; the IDE automatically fills in the connection information. (If you wish to connect to a different target, you may disable Use local QNX Connector and fill in the fields manually.) + +
    +
    Target Configuration +
    +
    This section is for a future feature. +
    +
    + + + +
  10. +
  11. Click Finish. + Your new QNX Target System Project appears in the Navigator view. When you create a Launch Configuration, the target is listed under the Main tab in the Target Options pane. + + +
    + + + +
    Note:You can also reach the New Target System Project wizard by right-clicking in the Target Options pane and selecting Add target.
    +
    + + +
  12. +
+ + +

Converting projects (Convert to a QNX Project wizard)

+ +

At various times, you may want to convert projects to give them a QNX nature. For example:

+ +

The QNX nature causes the IDE to use QNX make tools and the QNX make structure when building them.

+

+

The IDE lets you convert many projects in the same step, but the projects are all converted into projects of the same type.

+

+ +
+ + + +
Note:If you wish to convert a QNX Project back into a Standard Make C/C++ Project, you can use the Convert C/C++ Projects wizard. From the main menu, select File-->New-->Project. In the left pane, select C. In the right pane, select Convert to a C or C++ Project.
+
+ + +

+ +To convert to a QNX Project:

+
    + +
  1. From the menu, select File-->New-->Project. +
  2. +
  3. In the left pane, select QNX. +
  4. +
  5. In the right pane, select Convert to a QNX Project:

    Common wizards: Convert to a QNX Project; selecting wizard +

  6. +
  7. Click Next. +
  8. +
  9. Fill in the fields described below: + +

    The fields let you to convert a selection of projects to one of the following types of projects:

    + +
    + +
    Candidates for conversion
    +
    The IDE lists all the projects that can be converted. Check off all the projects you wish to convert. + +
    +
    Convert to C or C++
    +
    Select whether your projects are C or C++. + +
    +
    Convert to QNX project type
    +
    Select QNX Application Project or QNX Library Project, depending on whether or not your projects are applications or libraries.
    +
    + + + +
  10. +
  11. Click Finish.
  12. +
+ + + + + + + + diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/dbug.html b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/dbug.html new file mode 100644 index 00000000000..5d3a166c0e9 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/dbug.html @@ -0,0 +1,942 @@ + + + + + +Debugging Programs + + + +
+ + +

Debugging Programs

+ +

+ +Once you've written your program, you might need to debug it. The IDE debugger lets you detect and diagnose errors in your programs, whether they're running locally or remotely.

+

Suggested prior reading:

+ +

Related information:

+ +

+In this chapter: + + +

Introduction

+ +

The debugger lets you see what's going on "inside" a program while it executes, and what it was doing at the moment it crashed or misbehaved.

+

+ +In order to use the full power of the Debug perspective, you must use executables compiled for debugging. These executables contain additional debug information that lets the debugger make direct associations between the source code and the binaries generated from that original source. The debuggable executables have _g appended to their filenames.

+

+ +The IDE debugger uses GDB as the underlying debug engine. It translates each GUI action into a sequence of GDB commands and processes the output from GDB to display the current state of the program being debugged.

+

+ +The views update only when the program is suspended.

+

+ +
+ + + +
Note:Editing the source after compiling causes the line numbering to be out of step because the debug information is tied directly to the source. +Similarly, debugging optimized binaries can also cause unexpected jumps in the execution trace.
+
+ + + +

Debugging your program

+ +

To debug a program, you must build an executable and launch the debugging session. Once you've launched your debugging session, you'll want to control the session.

+ +

Building a debuggable executable

+ +

Although you can debug a regular executable, you get far more control by building debug variants of the executables. When you created your project, you may have already set the option to make the IDE build one. If so, you should have debuggable executables with _g appended to the filename. If not, you must set the IDE to build debug variants:

+
    + +
  1. In the C/C++ Projects view (or the Navigator view), right-click the project and select Properties. +
  2. +
  3. In the left pane, select QNX C/C++ Project. +
  4. +
  5. In the right pane, select the Options tab. +
  6. +
  7. Under Build Type, ensure Build debug version is enabled:

    Properties dialog; options tab +

  8. +
  9. Click Apply. +
  10. +
  11. Click OK. +
  12. +
  13. If it's not done automatically, rebuild the project.
  14. +
+ +

For more information about setting project options, see the Common Wizards chapter.

+ +

Starting your debugging session

+ + +
+ + + +
Note:For a full description of starting your programs and the Launch Configurations options, see the Starting Your Programs chapter.
+
+ + +

+ +Once you've got a debuggable executable, you must create a launch configuration.

+

+ +To launch a debuggable executable:

+
    + +
  1. From the main menu, select Run-->Debug. (This menu item appears by default in the C/C++ Development perspective. If it doesn't, or you wish to add it to another perspective, select Window-->Customize Perspective. In the left pane, select Other-->Launch. Enable Launch.) + The Launch Configurations dialog appears. +
  2. +
  3. Create a launch configuration as you normally would, but don't click OK. +
  4. +
  5. Select the Debugger tab. +
  6. +
  7. Ensure Run program in debugger is selected. +
  8. +
  9. Ensure Stop at main() on startup is enabled. +
  10. +
  11. Click Apply. +
  12. +
  13. By default, the IDE automatically changes to the Debug perspective when you debug a program. If the default is no longer set, or you wish to change to a different perspective when you debug, see the "Setting execution options (Launch Configurations tabs)" section in the Starting Your Programs chapter. +
  14. +
  15. Click Debug.
  16. +
+ + +

Controlling your debug session (Debug view)

+ +

The Debug view shows a listing of your debug sessions and lets you run your code step-by-step. The IDE is powerful; you can simultaneously debug multiple processes, each with multiple threads.

+ +

Understanding the Debug view

+ +

The Debug view lets you manage the debugging or running of a program in the workbench. This view displays the stack frame for the suspended threads for each target you're debugging. Each thread in your program appears as a node in the tree. The view displays the process for each program you're running.

+

Debug view

+

The Debug view shows the target information in a tree hierarchy as follows (shown here with a sample of the possible icons):

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Session item + Description + Possible
icons
Launch instance + Launch configuration name and launch type (e.g. Stack Builder [C/C++ QNX QConn (IP)]) + Icon: Debug executable + Icon: Run executable + +
Debugger instance + Debugger name and state (e.g. GDB Debugger (Breakpoint hit)) + Icon: Debugger + +
Thread instance + Thread number and state (e.g. Thread[1] (Suspended)) + Icon: Thread; suspended + Icon: Thread; running + Icon: Thread; stopped + +
Stack frame instance + Stack frame number, function, filename, and file line number + Icon: Stackframe + Icon: Stack frame; running
+ + +
+ + + +
Note:The number beside the thread label is a reference counter for the IDE, not a thread identification number (TID).
+
+ + +

+ +The IDE displays stack frames as child elements. It displays the reason for the suspension beside the target, such as end of stepping range, breakpoint hit, signal received, and so on. When a program exits, the IDE displays the exit code.

+

+ +The label includes the thread's state. In the example above, the label indicates that the thread was suspended because the program hit a breakpoint. You can't suspend only one thread in a process; when one thread is suspended, they all are.

+

+ +The Debug view also drives the C/C++ Editor; as you step through your program, the C/C++ Editor highlights the location of the execution pointer. + +

+ +

Controlling your debug execution

+ +

After you start your debug execution, it stops (by default) in main() and waits for your input. (For information about changing this setting, see the "Debugger tab" section in the Starting Your Programs chapter.) You can control your debug execution in various ways, but they all rely on a core set of debug controls.

+ +

Debug execution controls

+ +

The debug execution controls appear in the following places (though they don't all appear in any one place):

+ +

The debug execution controls are superceded by breakpoints. For example, if you ask the program to step over a function (i.e. run until it finishes that function) and the program hits a breakpoint, it pauses, even though it hasn't finished the function.

+

+ +The icons and menu items are context-sensitive. For example, you can terminate a process, but you can't terminate a stack frame.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Action + Icon + Hotkey + Description +
Resume + Icon: Resume + F8 + Run the process freely from current point + +
Suspend + Icon: Suspend +   + + Regain control of the running process +
Terminate + Icon: Terminate +   + + Kill the process + +
Restart + Icon: Restart +   + + Rerun the process from the beginning +
Step into + Icon: Step Into + F5 + Step forward one line, going into function calls + +
Step over + Icon: Step Over + F6 + Step forward one line, not going into function calls + +
Run to return + Icon: Step Return + F7 + Finish this function
+ + +

Controlling your debug execution (Debug view)

+ +

You can control how many steps the program runs before it suspends again (if you want it to suspend at all). You'll probably use the Debug view primarily to control your program flow.

+

+ +To control your debug execution:

+

+
    + +
  1. In the Debug view, select the thread you wish to control. +
  2. +
  3. Click one of the debug stepping icons described in the "Debug execution controls" section, above. +
  4. +
  5. Repeat step 2 as desired. +
  6. +
  7. Finish the debug session by choosing one of the controls described in the "Debug launch controls" section in this chapter.
  8. +
+ + +

Controlling your debug execution (hotkeys)

+ +

If you're running your debug session without the Debug view showing, you can use either the hotkeys or the Run menu to step through your program. The customization works on a per-perspective basis; if you want to use the hotkeys in another perspective, you must enable them there, too.

+

+ +To enable the debug hotkeys:

+
    + +
  1. Open the perspective you want to enable the hotkeys for. +
  2. +
  3. From the menu, select Window-->Customize Perspective. +
  4. +
  5. In the left pane, select Other-->Debug. +
  6. +
  7. In the left pane, enable Debug. +
  8. +
  9. Click OK. + The hotkeys are enabled for that particular perspective. You can also access the controls from the Run menu. +
  10. +
+ + +

Controlling your debug execution (C/C++ Editor)

+ +

You can control your debug session using the C/C++ Editor by having the program run until it hits the line your cursor is sitting on. (This is the same as the gdb until command.) If the program never hits that line, the program runs until it finishes.

+

+ +You enable this option on a per-perspective basis. The option is enabled by default in the Debug perspective.

+

+ +To enable debug execution using the C/C++ Editor:

+

+
    + +
  1. From the menu, select Window-->Customize Perspective. +
  2. +
  3. In the left pane, select Other-->C/C++ Debug. +
  4. +
  5. In the left pane, enable C/C++ Debug. +
  6. +
  7. Click OK. + The controls for debug execution in the C/C++ Editor are enabled for your active perspective.
  8. +
+ +

+ +To debug using the C/C++ Editor:

+

+
    + +
  1. In the C/C++ Editor, select a file associated with the process being debugged (e.g. myProgram.c). +
  2. +
  3. Left-click to insert the cursor where you want to interrupt the execution. +
  4. +
  5. Right-click near the cursor and select Run to C/C++ Line: +

    Debug view; run to line

    The program continues running until it hits that line.

  6. +
+ + +

Debug launch controls

+ +

In addition to controlling the individual stepping of your programs, you can also control the debug session itself. You can perform actions such as terminating the session, stopping the program, and so on, using the debug launch controls available in the Debug view or in the Debug view's right-click context menu. As with the other debug controls, these are context-sensitive; some are disabled depending on whether you've selected a thread, a process, and so on, in the Debug view.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Action + Icon + Description
Terminate + Icon: Terminate + Kill the selected process
Terminate & Remove + Icon: Terminate and Remove + Kill the selected process and remove it from the Debug view
Terminate All + Icon: Terminate All + Kill all active processes in the Debug view
Disconnect + Icon: Disconnect + Detach the debugger (i.e. gdb) from the selected process (useful for debugging attached processes)
Remove All Terminated Launches + Icon: Remove All Terminated + Clear all the killed processes from the Debug view
Relaunch + Icon: Relaunch + Restart the process
+ + +

Disassembly mode

+ +

When you're debugging, you can also examine your program as it steps into functions that you don't have source code for, such as printf(). Normally, the debugger steps over these functions, even when you click Step Into. When the instruction pointer enters functions for which it doesn't have the source, the IDE shows the function in the Assembly Editor. + +

+

To step into assembler functions during debugging:

+ + + + +
=>>In the Debug view, click the Disassembly Mode On/Off toggle button Icon: Disassembly Mode On/Off. + As you Step Into assembler functions, the IDE shows the execution trace in the Assembly Editor.
+ + + +

More debugging features

+ +

This section contains the following subsections:

+ + +

Inspecting your variables (Variables view)

+ +

+ +The Variables view displays information about the variables in the currently selected stack frame:

+

Variables view

+

When the execution stops, the changed values are highlighted in red (by default). Like the other debug-related views, the Variables view doesn't try to keep up with the execution of a running program; it updates only when execution stops. + +

+

You can set whether or not the variable type (e.g. int) is displayed by clicking the Show Type Names toggle button Icon: Show Type Names.

+ +

Customizing the Variables view

+ +

You can customize the look of the Variables view and set the color of changed variables (red by default). + +

+

To access the Variables view preferences:

+
    + +
  1. From the main menu, select Window-->Preferences. +
  2. +
  3. In the left pane, select Debug-->Variables View:

    Variables view; customization

  4. +
+ + +

Changing variable values

+ +

During the course of debugging, you may wish to artificially change the value of a variable to test how your program handles the setting or to speed through a loop.

+

+ +To change a variable value while debugging:

+

+
    + +
  1. In the Variables view, right-click the variable and select Change Variable Value. +
  2. +
  3. Enter the new value in the available field.
  4. +
+ + +

Using breakpoints and watchpoints (Breakpoints view)

+ +

The Breakpoints view lists all the breakpoints and watchpoints you've set in your open projects:

+

Breakpoints view + +

+

A breakpoint makes your program stop whenever a certain point in the program is reached. For each breakpoint, you can add conditions to better control whether or not your program stops.

+

+ +A watchpoint is a special breakpoint that stops the program's execution whenever the value of an expression changes, without specifying where this may happen. Unlike breakpoints, which are line-specific, watchpoints are event-specific and take effect whenever a specified condition is true, regardless of when or where it occurred.

+

+ + + + + + + + + + + + + + + + + + + + + + +
Object + Icon
Breakpoint + Icon: Breakpoint
Watchpoint (read) + Icon: Watchpoint; read
Watchpoint (write) + Icon: Watchpoint; write
Watchpoint (read and write) + Icon: Watchpoint; read and write
+ +

If the breakpoint or watchpoint is for a connected target, a check mark Icon: Checkmark; overlay is superimposed on the icon. + + +

+

The rest of this section describes how to: + +

+ + +
+ + + +
Note:While the Breakpoints view displays both breakpoints and watchpoints, the procedures for setting them differ somewhat.
+
+ + + +

Adding breakpoints

+ +

You set breakpoints on an executable line of a program. If the breakpoint is enabled when you debug, the execution suspends before that line of code executes.

+

+ +To add a breakpoint:

+
    + +
  1. In the editor area, open the file that you want to add the breakpoint to (e.g. myProgram.c). +
  2. +
  3. Notice that the left edge of the C/C++ Editor has a blank space called a marker bar. +
  4. +
  5. Hover your pointer over the marker bar, beside the exact line of code where you want to add a breakpoint. Right-click the marker bar and select Add Breakpoint:

    Breakpoints view; adding breakpoints

    A dot Icon: Breakpoint object appears, indicating a breakpoint. A corresponding dot Icon: Breakpoint object also appears in the Breakpoints view, along with the name of the file in which you set the breakpoint:

    Breakpoints view; breakpoint added +

  6. +
+ + +

Adding watchpoints

+ +

To add a watchpoint:

+
    + +
  1. From the main menu, select Run-->Add C/C++ Watchpoint. (If this option isn't available, select Window-->Customize Perspective. In the left pane, select Other. Enable C/C++ Debug. Click OK.) + The Add C/C++ Watchpoint dialog appears:

    Breakpoints view; adding watchpoints +

  2. +
  3. Enter an expression in the Expression to watch field. The expression may be anything that can be evaluated inside an if statement. (e.g. y==1) +
  4. +
  5. If you want the program to stop when it reads the watch expression, enable Read; to have the program stop when it writes the watch expression, enable Write. You must enable at least one. +
  6. +
  7. Click OK. + The watchpoint appears in the Breakpoints view list.
  8. +
+ + +

Setting properties of breakpoints and watchpoints

+ +

After you've set your breakpoint or watchpoint, the IDE unconditionally halts the program when:

+ +

+ +To set the properties for a breakpoint or watchpoint:

+
    + +
  1. In the Breakpoints view, right-click the breakpoint or watchpoint and select Properties. (Or for breakpoints only, in the C/C++ Editor, right-click the breakpoint and select Breakpoint Properties.) + The C/C++ Line Breakpoint Properties or C/C++ Watchpoint Properties dialog appears (they're very similar). You need to fill in at least one field:

    Breakpoints view; setting breakpoint properties + +

  2. +
  3. In the Condition field, enter the Boolean expression to evaluate. The expression may be anything that can be evaluated inside an if statement (e.g. x > y ). The default is TRUE. +
  4. +
  5. In the Ignore Count field, enter the number of times the breakpoint or watchpoint may be hit before it begins to take effect (not the number of times the condition is true). The default is 0. +
  6. +
  7. Click OK. + When in debug mode, your program stops when it meets the conditions you've set for the breakpoint or watchpoint.
  8. +
+ + +

Disabling and enabling breakpoints and watchpoints

+ +

You may wish to temporarily deactivate a breakpoint or watchpoint without losing the information it contains.

+

+ +To disable or enable a breakpoint or watchpoint:

+ + + + +
=>>In the Breakpoints view, right-click the breakpoint or watchpoint and select Disable or Enable (Or for breakpoints only, right-click the breakpoint in the editor area and select Disable Breakpoint or Enable Breakpoint):

Breakpoints view; disabling breakpoints

+ + +

To disable or enable all (or many) breakpoints or watchpoints: + +

+
    + +
  1. In the Breakpoints view, use any of the following methods: + +
  2. +
  3. Right-click the highlighted breakpoints and watchpoints and select Disable or Enable.
  4. +
+ + +

Removing breakpoints and watchpoints

+ +

+ +To remove one or more breakpoints and watchpoints:

+ + + + +
=>>Follow the procedure described in "Disabling and enabling breakpoints and watchpoints", with the following exceptions: +
    +
  • Instead of selecting Disable or Enable, select Remove. +
  • +
+ + +

+ +To remove all breakpoints and watchpoints: + +

+ + + + +
=>>In the Breakpoints view, right-click and select Remove All.
+ + + +

Evaluating your expressions (Expressions view)

+ +

The Expressions view lets you evaluate and examine the value of expressions:

+

Expressions view + + +

+

To evaluate an expression:

+
    + +
  1. From the menu, select Run-->Add C/C++ Expression. (Or, right-click in the C/C++ Editor and select Add C/C++ Expression.) + The Add Expression dialog opens:

    Expressions view; add expressions + +

  2. +
  3. Enter the expression you want to evaluate (e.g. (x-5)*3 ). +
  4. +
  5. Click OK. + The expression and its value appear in the Expressions view. When the execution of a program is suspended, the IDE reevaluates all expressions and highlights the changed values.
  6. +
+ + +

Inspecting your registers (Registers view)

+ +

The Registers view displays information about the registers in the currently selected stack frame. When the execution stops, the changed values are highlighted. The functionality of the Registers view is very similar to that of the Variables view; for more information, see the "Inspecting your variables (Variables view)" section in this chapter.

+

Registers view

+

You can also customize the colors in the Registers view and change the default value of the Show Type Names option. + +

+

To access the Registers view customization dialog:

+
    + +
  1. From the main menu, select Window-->Preferences. +
  2. +
  3. In the left pane, select Debug-->Registers View.
  4. +
+ + +

Inspecting your process memory (Memory view)

+ +

The Memory view lets you inspect and change your process memory. The view consists of four tabs that let you inspect multiple sections of memory:

+

Memory view + +

+

+ + +

Inspecting memory

+ +

The Memory view supports the same addressing as the C language. You can address memory using expressions such as 0x0847d3c, (&y)+1024, and *ptr. + +

+

To inspect your process memory:

+
    + +
  1. In the Debug view, select a process. Selecting a thread automatically selects the associated process. +
  2. +
  3. In the Memory view, select one of the four tabs labeled Memory 1, Memory 2, and so on. +
  4. +
  5. In the Address field, type the address and press Enter.
  6. +
+ + +

Changing memory

+ +

+ +
+ + + +
Caution:Changing your process memory can make your program crash.
+
+ + +

To change your process memory:

+
    + +
  1. Follow the procedure for inspecting your process memory. +
  2. +
  3. In the memory pane, type the new value for the memory. The Memory view works in "typeover" mode; use the arrow keys to jump from byte to byte:

    Memory view; changing +

  4. +
  5. Click the Save Changes buttonIcon: Save Changes. + The changed memory appears in red.
  6. +
+ + +

Configuring output format

+ +

You can configure your output to display hexadecimal or decimal. You can also set the number of display columns and the memory unit size. You can configure each memory tab independently.

+

+ +To configure the output format:

+
    + +
  1. In the Memory view, select one of the four tabs labeled Memory 1, Memory 2, and so on. +
  2. +
  3. Right-click the pane and select any of Format, Memory Unit Size, or Number of Columns. Choose your desired output format:

    Memory view; configure

    The output reflects your selection. Note that some output formats are best viewed in a nonproportional font such as Courier. + +

  4. +
+ + +

Customizing the Memory view

+ +

You can customize the Memory view to display in different colors and fonts. You can also customize some of its behavior. The customizations affect the entire Memory view.

+

+ +To access the Memory view customization dialog:

+
    + +
  1. From the menu, select Window-->Preferences. +
  2. +
  3. In the left pane, select Debug-->Memory View. +
  4. +
  5. You can now change the colors, font, and behavior of the Memory view. When you're done, click Apply, then OK. +
  6. +
+ + +

Viewing your output (Console view)

+ +

The Console view shows you the output of the execution of your program and lets you supply input to your program:

+

Console view

+

+ +
+ + + +
Note:See also the "Debugging with GDB (Console view)" section, below.
+
+ + +

+ +The console shows three different kinds of text, each in a different default color:

+ +

You can choose different colors for these kinds of text on the preferences pages. + +

+

To access the Console view customization dialog:

+
    + +
  1. From the menu, select Window-->Preferences. +
  2. +
  3. In the left pane, select Debug-->Console.
  4. +
+ + +

Debugging with GDB (Console view)

+ +

The IDE lets you debug using a subset of the commands that the gdb utility offers:

+

Console view; GDB

+

+ +
+ + + +
Note:See also the "Viewing your output (Console view)" section, above.
+
+ +

+ +

Enabling the GDB Console view

+ +

The GDB Console view is part of the regular Console view but isn't accessible until you toggle to it. Once you do, GDB output appears in place of the regular Console view output. + +

+

To enable the GDB Console view:

+
    + +
  1. In the Debug view, select a debug session. +
  2. +
  3. In the Debug view, click the Show Debugger Console on Target Selection button Icon: Show Debugger Console on Target Selection. + The Console view changes to the GDB Debugger Console view.
  4. +
+ + +

Using the GDB Console view

+ +

The GDB Console view lets you bypass the IDE and talk directly to GDB; the IDE is unaware of anything done in the GDB Console view. Thus, items such as breakpoints that you set from the GDB Console view don't appear in the C/C++ Editor.

+

+ +
+ + + +
Note:You can't use the Tab key for line completion because the commands are sent to GDB only when you press Enter.
+
+ + +

To use the GDB Console view:

+ + + + +
=>>In the GDB Console view, enter a command. For example, enter help to get a list of commands; nexti to step one instruction, proceeding through subroutine calls; nexti 3 to step three:

Console view; GDB; using

+ + + + + + + + + diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/image-lib/caution.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/image-lib/caution.gif new file mode 100644 index 00000000000..f4ec4e7b194 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/image-lib/caution.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/image-lib/onestep.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/image-lib/onestep.gif new file mode 100644 index 00000000000..239243c1059 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/image-lib/onestep.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/image-lib/pointing.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/image-lib/pointing.gif new file mode 100644 index 00000000000..903f23707c9 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/image-lib/pointing.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz.jpg new file mode 100644 index 00000000000..23d9f690a84 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c.jpg new file mode 100644 index 00000000000..c1898523069 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_architecture.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_architecture.jpg new file mode 100644 index 00000000000..a07df4a7457 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_architecture.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_buildsettings.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_buildsettings.jpg new file mode 100644 index 00000000000..1a45dcad259 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_buildsettings.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_library.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_library.jpg new file mode 100644 index 00000000000..d824c834336 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_library.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_options.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_options.jpg new file mode 100644 index 00000000000..aaf0bdfad6c Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_options.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_projects.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_projects.jpg new file mode 100644 index 00000000000..5c80aa3fd32 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_c_projects.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_convert_1.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_convert_1.jpg new file mode 100644 index 00000000000..e1027e3438b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_convert_1.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_target.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_target.jpg new file mode 100644 index 00000000000..1f4530af3e8 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/cwiz_target.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c.jpg new file mode 100644 index 00000000000..775044e2c13 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_codetemplates_use.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_codetemplates_use.jpg new file mode 100644 index 00000000000..0382955bdf7 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_codetemplates_use.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_contentassist.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_contentassist.jpg new file mode 100644 index 00000000000..b7db881d3e6 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_contentassist.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_helloworld.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_helloworld.jpg new file mode 100644 index 00000000000..9fb6c01590b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_helloworld.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_hoverhelp.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_hoverhelp.jpg new file mode 100644 index 00000000000..0971f4ee3cf Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/editor_c_hoverhelp.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/findit b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/findit new file mode 100644 index 00000000000..34010dbfb31 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/findit @@ -0,0 +1,13 @@ +#!/bin/sh + +for i in `ls *.gif *.jpg` +do + + grep $i ../*.html > /dev/null + result=$? + if [ $result -ne 0 ] + then + echo "Removing $i ($result)" + /bin/rm -f $i + fi +done diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/first_look.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/first_look.jpg new file mode 100644 index 00000000000..8c73a267472 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/first_look.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_breakpoint_obj.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_breakpoint_obj.gif new file mode 100644 index 00000000000..06d007905b2 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_breakpoint_obj.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_debug_exc.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_debug_exc.gif new file mode 100644 index 00000000000..3052a80cd67 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_debug_exc.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_debugger_console.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_debugger_console.gif new file mode 100644 index 00000000000..e6d5b138d46 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_debugger_console.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_debugt_obj.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_debugt_obj.gif new file mode 100644 index 00000000000..d139cde9dd4 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_debugt_obj.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_disassembly.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_disassembly.gif new file mode 100644 index 00000000000..a78e3024c87 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_disassembly.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_disconnect.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_disconnect.gif new file mode 100644 index 00000000000..f1d5fb31e51 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_disconnect.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_error_obj.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_error_obj.gif new file mode 100644 index 00000000000..b04020bc723 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_error_obj.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_filter_tsk.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_filter_tsk.gif new file mode 100644 index 00000000000..1492b4efae2 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_filter_tsk.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_installed_ovr.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_installed_ovr.gif new file mode 100644 index 00000000000..7f4a31ee7eb Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_installed_ovr.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_memory_update.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_memory_update.gif new file mode 100644 index 00000000000..ca4fe2b1cff Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_memory_update.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_menu.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_menu.gif new file mode 100644 index 00000000000..a492838d248 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_menu.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newccqnx_app.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newccqnx_app.gif new file mode 100644 index 00000000000..b7165fa005a Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newccqnx_app.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newccqnx_lib.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newccqnx_lib.gif new file mode 100644 index 00000000000..af20154d34b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newccqnx_lib.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newcqnx_app.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newcqnx_app.gif new file mode 100644 index 00000000000..385a8ba0cc8 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newcqnx_app.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newcqnx_lib.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newcqnx_lib.gif new file mode 100644 index 00000000000..a48b45c47ce Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_newcqnx_lib.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_next_error_nav.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_next_error_nav.gif new file mode 100644 index 00000000000..775842e89d1 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_next_error_nav.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_prev_error_nav.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_prev_error_nav.gif new file mode 100644 index 00000000000..3b1bb7ca128 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_prev_error_nav.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_relaunch.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_relaunch.gif new file mode 100644 index 00000000000..6b0c23d8f61 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_relaunch.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_remove_all.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_remove_all.gif new file mode 100644 index 00000000000..2c069ab3f43 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_remove_all.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_restart.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_restart.gif new file mode 100644 index 00000000000..a063c230aca Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_restart.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_resume.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_resume.gif new file mode 100644 index 00000000000..2088548a499 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_resume.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_run_exc.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_run_exc.gif new file mode 100644 index 00000000000..8174dade2bb Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_run_exc.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stackframe.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stackframe.gif new file mode 100644 index 00000000000..b9783c814a7 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stackframe.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stackframe_running.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stackframe_running.gif new file mode 100644 index 00000000000..ef406cf24c9 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stackframe_running.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stepinto.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stepinto.gif new file mode 100644 index 00000000000..cc1378e0e0d Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stepinto.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stepover.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stepover.gif new file mode 100644 index 00000000000..5e24fb9b8fe Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stepover.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stepreturn.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stepreturn.gif new file mode 100644 index 00000000000..6081cba13ba Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_stepreturn.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_suspend.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_suspend.gif new file mode 100644 index 00000000000..457893c1ba5 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_suspend.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_terminate.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_terminate.gif new file mode 100644 index 00000000000..d47876f6857 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_terminate.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_terminate_all.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_terminate_all.gif new file mode 100644 index 00000000000..ec56a24fabc Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_terminate_all.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_terminate_rem.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_terminate_rem.gif new file mode 100644 index 00000000000..bd53994fb7b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_terminate_rem.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_thread1.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_thread1.gif new file mode 100644 index 00000000000..7e4a43cd78c Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_thread1.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_thread2.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_thread2.gif new file mode 100644 index 00000000000..fb5175f5c68 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_thread2.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_thread3.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_thread3.gif new file mode 100644 index 00000000000..f2a16394e6d Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_thread3.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_tnames.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_tnames.gif new file mode 100644 index 00000000000..1bbbb95c8ea Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_tnames.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_warning_obj.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_warning_obj.gif new file mode 100644 index 00000000000..cf8d571833d Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_warning_obj.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_watchpoint_read_obj.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_watchpoint_read_obj.gif new file mode 100644 index 00000000000..793b189d849 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_watchpoint_read_obj.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_watchpoint_readwrite_obj.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_watchpoint_readwrite_obj.gif new file mode 100644 index 00000000000..0b1184d72a8 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_watchpoint_readwrite_obj.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_watchpoint_write_obj.gif b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_watchpoint_write_obj.gif new file mode 100644 index 00000000000..b5fa352bb51 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/icon_watchpoint_write_obj.gif differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch.jpg new file mode 100644 index 00000000000..735c3b3e553 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_arguments.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_arguments.jpg new file mode 100644 index 00000000000..dab157b564b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_arguments.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_common.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_common.jpg new file mode 100644 index 00000000000..12a27679ef8 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_common.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_customize.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_customize.jpg new file mode 100644 index 00000000000..df901271dbd Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_customize.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_debug_debug.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_debug_debug.jpg new file mode 100644 index 00000000000..1f241c0cfb5 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_debug_debug.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_debugger.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_debugger.jpg new file mode 100644 index 00000000000..92679ca2c29 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_debugger.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_environment.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_environment.jpg new file mode 100644 index 00000000000..d5d29676680 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_environment.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_main.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_main.jpg new file mode 100644 index 00000000000..9ba0a2b2cc7 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_main.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_run2_faster.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_run2_faster.jpg new file mode 100644 index 00000000000..f575b571111 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_run2_faster.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_run_run.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_run_run.jpg new file mode 100644 index 00000000000..6d428f53843 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/lnch_run_run.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/persp_dbug_properties_options.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/persp_dbug_properties_options.jpg new file mode 100644 index 00000000000..2ac4b01c9d1 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/persp_dbug_properties_options.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints.jpg new file mode 100644 index 00000000000..b90f436f57c Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_added.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_added.jpg new file mode 100644 index 00000000000..6c46064d6d9 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_added.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_adding.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_adding.jpg new file mode 100644 index 00000000000..b0cefdcf9c5 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_adding.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_disable.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_disable.jpg new file mode 100644 index 00000000000..d2713acb7a0 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_disable.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_prop.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_prop.jpg new file mode 100644 index 00000000000..33dc1b97a31 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_prop.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_watch_add.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_watch_add.jpg new file mode 100644 index 00000000000..51d66095f5b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_breakpoints_watch_add.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cbuild.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cbuild.jpg new file mode 100644 index 00000000000..22eb91ce741 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cbuild.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cbuild_configurations.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cbuild_configurations.jpg new file mode 100644 index 00000000000..d51d5e9b2cf Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cbuild_configurations.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console.jpg new file mode 100644 index 00000000000..f0e8fcba1f6 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console_gdb.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console_gdb.jpg new file mode 100644 index 00000000000..201fd624130 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console_gdb.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console_gdb_using.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console_gdb_using.jpg new file mode 100644 index 00000000000..1450ef52ee8 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console_gdb_using.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console_helloworld.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console_helloworld.jpg new file mode 100644 index 00000000000..7d73ca6d547 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_console_helloworld.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects.jpg new file mode 100644 index 00000000000..7b26f7986bd Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_building.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_building.jpg new file mode 100644 index 00000000000..81a98ae2d48 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_building.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_filter.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_filter.jpg new file mode 100644 index 00000000000..fe2068b3aed Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_filter.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_outline_executable.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_outline_executable.jpg new file mode 100644 index 00000000000..48e0c86bcd7 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_outline_executable.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_outline_source.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_outline_source.jpg new file mode 100644 index 00000000000..17469f7dea9 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_outline_source.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_target_add.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_target_add.jpg new file mode 100644 index 00000000000..2dc8b6c61a7 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_target_add.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_target_use.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_target_use.jpg new file mode 100644 index 00000000000..15d968fcbeb Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_cprojects_target_use.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_debug.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_debug.jpg new file mode 100644 index 00000000000..5ffbab51a2d Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_debug.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_debug_runtoline.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_debug_runtoline.jpg new file mode 100644 index 00000000000..43674afff51 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_debug_runtoline.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_expressions.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_expressions.jpg new file mode 100644 index 00000000000..4d706ed99ab Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_expressions.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_expressions_add.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_expressions_add.jpg new file mode 100644 index 00000000000..8836ec003c2 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_expressions_add.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_memory.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_memory.jpg new file mode 100644 index 00000000000..414cb658784 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_memory.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_memory_change.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_memory_change.jpg new file mode 100644 index 00000000000..3636d953921 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_memory_change.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_memory_configure.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_memory_configure.jpg new file mode 100644 index 00000000000..9a8a809b78a Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_memory_configure.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_outline.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_outline.jpg new file mode 100644 index 00000000000..420c4787856 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_outline.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_registers.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_registers.jpg new file mode 100644 index 00000000000..bc2ee4ebf26 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_registers.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_tasks.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_tasks.jpg new file mode 100644 index 00000000000..5284ac82218 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_tasks.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_tasks_filter_tasks.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_tasks_filter_tasks.jpg new file mode 100644 index 00000000000..e7ede1228cb Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_tasks_filter_tasks.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_tasks_new_tasks.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_tasks_new_tasks.jpg new file mode 100644 index 00000000000..294c6fcfb45 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_tasks_new_tasks.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_variables.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_variables.jpg new file mode 100644 index 00000000000..9435b70d68f Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_variables.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_variables_customize.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_variables_customize.jpg new file mode 100644 index 00000000000..bfc696b7b00 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/view_variables_customize.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/window_preferences_c_codetemplates.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/window_preferences_c_codetemplates.jpg new file mode 100644 index 00000000000..ee85448640b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/window_preferences_c_codetemplates.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/window_preferences_workbench.jpg b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/window_preferences_workbench.jpg new file mode 100644 index 00000000000..bc1e73b061b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/images/window_preferences_workbench.jpg differ diff --git a/doc/org.eclipse.cdt.doc.user/raw/hackedguide/lnch.html b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/lnch.html new file mode 100644 index 00000000000..f86b9bbb092 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/raw/hackedguide/lnch.html @@ -0,0 +1,457 @@ + + + + + +Starting Your Programs (launcher) + + + +
+ + +

Starting Your Programs (launcher)

+ +

+ + +

+

Before running or debugging a program, you must configure how and where to +run it, and what options to pass to it. To do all this, you must use the +launcher. + +

+

+ +In this chapter: + + +

How the launcher works

+ +

To run or debug programs with the IDE, you must set up a launch +configuration. Launch configurations define which programs to launch, +the command-line options to use, and what values to use for environment +variables.

+

+ +The IDE saves your launch configurations so you can quickly reproduce the +execution conditions by running existing configurations, even if the setup +is complicated.

+ +

Types of launch configurations

+ +

The IDE supports these types of launch configurations: + +

+
+ +
C/C++ Local
+
If you're developing on your target (self-hosted), you may create a C/C++ Local launch configuration. You don't need to use qconn; the IDE launches your program through gdb. + +
+
C/C++ Postmortem debugger
+
If your program produced a corefile (via the dumper utility) when it faulted, you can examine the state of your program by loading it into the postmortem debugger. This option is available only when you select Debug. When you debug, you're prompted with the Select the corefile dialog. + +
+
+ +

+ +

Running and debugging the first time (Launch Configurations dialog)

+ +

You can use the same launch configuration to run or debug a program. Your choices in the Launch Configurations dialog may +cause subtle changes in the dialog but greatly affect such things as which options in the +dialog are enabled. + +

Enabling the Run and Debug menu items

+ +

The Run and Debug menu items appear in the C/C++ Development perspective by default, but they might not appear in all perspectives. It's also possible to remove them. If the Run-->Run menu item doesn't appear, you must enable it. + +

+

To enable the Run and Debug menu items:

+
    + +
  1. From the main menu, select Window-->Customize Perspective. + The Customize Perspective dialog appears. +
  2. +
  3. In the left pane, select Other-->Launch. +
  4. +
  5. Enable Launch: +

    Launch Configuration dialog; customization +

  6. +
  7. Click OK. + The Run-->Run menu item is now accessible in your current perspective.
  8. +
+ + +

Debugging a program the first time

+ +

When you first debug a program, you have to create a launch configuration.

+

+ +To debug a program the first time:

+
    + +
  1. In the C/C++ Projects view (or the Navigator view), select your project. +
  2. +
  3. From the main menu, select Run-->Debug (or, click the Debug icon and select Debug from the dropdown menu): +

    Launch Configuration dialog; debugging +

  4. +
  5. Select a launch configuration type: +

    Launch Configuration dialog

    If you're connecting to your target via IP, select C/C++ QNX QConn (IP). If not, see the +"Types of Launch Configurations" section in this chapter before deciding: + +

  6. +
  7. Click New. +The dialog displays the appropriate tabs +
  8. +
  9. Enter an appropriate description for your configuration in the Name field. +
  10. +
  11. Fill in the details in the various tabs. See the "Setting execution options (Launch Configurations tabs)" section in this chapter for details about each tab. +
  12. +
  13. Click Debug. + You can now debug your program.
  14. +
+ + +

Running a program the first time

+ +

When you configure a program to run, you should also configure it to debug as well. + +

+ +
+ + + +
Note:There are fewer options for running programs than for debugging. Some configurations aren't available.
+
+ + +

+ +To run a program the first time:

+ + + + +
=>>Repeat the procedure for debugging a program (see "Debugging a program the first time"), with the following changes: +
    +
  • Instead of selecting Run-->Debug from the main menu, select Run-->Run (or, click the Run icon and select Run from the dropdown menu): +

    Launch Configuration dialog; running +

  • +
  • Instead of clicking Debug when you're done, click Run. +
  • +
  • Instead of running under the control of a debugger, your program runs.
  • +
+ + + +

Running and debugging subsequent times (Launch Configurations dialog)

+ +

Once you've created your launch configuration, running or debugging a program is as easy as selecting your previous configuration. There are several ways to do it:

+ + +

Launching a selected program

+ +

+ +To debug or run a program that you've created a launch configuration for:

+
    + +
  1. From the main menu, select Run-->Debug or Run-->Run. + The Launch Configurations dialog appears. +
  2. +
  3. In the left pane, select the launch configuration you created when you first ran or debugged your program. +
  4. +
  5. Click Debug or Run. +
  6. +
+ + +

Launching from a list of favorites

+ +

If you have a program that you launch frequently, you can add it to the Debug or Run drop-down menu so you can launch it quickly.

+

+ +
+ + + +
Note:To use this method, you must have selected Display in favorites when you first created your Launch Configuration. If you didn't, edit the Display in favorites option under the Common tab. See the "Setting execution options (Launch Configurations tabs)" section in this chapter.
+
+ + +

To debug or run a program using your favorites list:

+
    + +
  1. Do one of the following: + + A list appears, showing all the launch configurations for which you enabled Display in favorites: +

    Launch Configuration dialog; running a program subsequent times (faster) + +

  2. +
  3. Select your launch configuration.
  4. +
+ + +

Launching the last-launched program

+ +

To relaunch the last program you ran or debugged:

+

+ + + + +
=>>Press F11 or click one of: +
    +
  • the Debug Last Launched: yourLaunchName button +Icon: Debug +
  • +
  • the Run Last Launched: yourLaunchName +Icon:Run
  • +
+ + + +

Setting execution options (Launch Configurations tabs)

+ +

The Launch Configurations dialog has many tabs, including:

+

+ +

Depending on what type of launch configuration you've selected, only certain tabs appear:

+

+ + + + + + + + + + + + + + + + + + + + +
Launch Configuration + Main tab,
+ Common tab + +
Arguments tab,
+ Environment tab +
Debugger tab +
C/C++ Local + Yes + Yes + Yes +
C/C++ Postmortem debug*** + Yes + No + Yes +
+ +

***Debug only; core file required.

+

+ + +

+ +

Main tab

+ +

This tab lets you specify the project and program that you want to run or debug. The IDE might fill in some of the fields for you:

+

Launch Configurations dialog; Main tab

+

+ +The Main tab varies, depending on the type of configuration you're creating. If you're creating a C/C++ QNX QConn (IP) launch configuration, you'll see a section for Target Options; for C/C++ PDebug (Serial), you'll see Serial Options. + +

+
+ +
Project
+
Enter the name of your project. You may also select from the open projects by clicking Browse. You can create or edit launch configurations only for open projects. + +
+
C/C++ Application
+
Enter the relative path of the executable from the project directory (e.g. x86/o/KillerApp). +For QNX projects, an executable with a _g suffix indicates it was compiled for debugging. +You may also select from the available executables by clicking Search. + +
+
Target Options
+
You'll see this section only for C/C++ QNX QConn (IP) launch configurations. +Select a target from the available list. If you haven't created a target, right-click the empty pane and select Add Target. For more information about creating a target, see the Common Wizards chapter. + +
+
Filter targets based on C/C++ Application selection
+
Enable this option to hide platforms that don't match your chosen executable. For example, if you've chosen a program compiled for PPC, you'll see only PPC targets. + +
+
Serial Options
+
You'll see this section only for C/C++ QNX PDebug (Serial) launch configurations. + +
+
Serial Port
+
Enter the communication port (e.g. COM1 for Windows; /dev/ser1 for QNX Neutrino). + +
+
Baud Rate
+
Select the baud rate from the dropdown list.
+
+ + +

Arguments tab

+ +

This tab lets you specify the arguments your program uses and the directory where it runs:

+

Launch Configurations dialog; Arguments tab + +

+
+ +
C/C++ Program Arguments
+
Enter the arguments that you want to pass on the command line. For example, if you want to send the equivalent of myProgram -v -L 7, type -v -L 7 in this field. You can put -v and -L 7 on separate lines because the IDE automatically strings the entire contents together. + +
+
Working directory
+
Enable Use default working directory to run the executable from the directory where the IDE is running. If you disable Use default working directory, you can specify a full path in the Local directory field or a relative path in the Workspace field.
+
+ + +

Environment tab

+ +

The Environment tab lets you set the environment variables and values to use when the program launches:

+

Launch Configurations dialog; Environment tab

+

For example, if you want to set the environment variable named PHOTON to the value /dev/photon_2 when you run your program, use this tab. Click New to add an environment variable.

+ +

Debugger tab

+ +

The Debugger tab lets you choose which debugger to use when you debug your program:

+

Launch Configurations dialog; Debugger tab

+ +
+ + + +
Note:The settings in the Debugger tab affect the program only when you debug it, not when you run it.
+
+ + +
+ +
Debugger
+
The debugger dropdown list includes the available debuggers for the selected launch-configuration type. The list also varies depending on whether you're debugging self-hosted. + +
+
Run program in debugger/Attach to running process
+
Most of the time, you'll want to simply Run program in debugger. +If you enable Attach to running process, you're prompted to select a process from a list at run time. Note the following limitations: + +
+
Stop at main() on startup
+
If you deselect Stop at main() on startup, the program runs until you interrupt it manually, or until it hits a breakpoint. + +
+
Debugger Options
+
You'll see this section only for C/C++ Local launch configurations; the IDE already automatically fills in the options for QNX launch configurations. + +
+ +
MI Debugger +
+
You can choose the MI (Machine Interface) Debugger, such as the gdb executable. + +
+
Load shared library symbols automatically +
+
If you want to watch line-by-line stepping of library functions in the C Editor, enable this option. You may wish to disable this option if your target doesn't have much memory; the library symbols take up RAM on the target. It's enabled by default. +
+
+
+
+ + +

Common tab

+ +

The Common tab lets you define where the launch configuration is stored, how you access it, and what perspective you change to when you launch:

+

Launch Configurations dialog; Common tab + + +

+
+ +
Type of launch configuration
+
When you create a launch configuration, the IDE saves it as a .launch file. If you select Local, the IDE stores the configuration in one of its own plugin directories. If you select Shared, you can save it in a location you specify (such as in your project). Saving as Shared lets you commit the .launch file to CVS so your coworkers can run the program using the same configuration. + +
+
Perspective to switch to or open when launched in
+
You can configure which perspectives the IDE changes to when you run or debug. You can set the perspectives specifically, or simply set them to Default. To determine the default perspectives for both, select Window-->Preferences from the main menu and select Debug from the left pane. + +
+
Display in favorites
+
You can have your launch configuration displayed when you click the Run or Debug dropdown menus. To do so, enable Run or Debug under the Display in favorites menu: heading.
+
+ + + + + +