Skip to main content
summaryrefslogtreecommitdiffstats
blob: 689adee976eab4795ffc8b810c273db9efc71a28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="LASTUPDATED" content="06/17/05 11:09:43" />
<title>Debugging Existing Executables</title>
<link rel="stylesheet" type="text/css" href="../help.css"/>
<style>
ul, li	{ padding: 3px 0px}
</style>
</head>

<body>

<h1>Debugging an Existing Executable </h1>
<p>Use the import feature to import and debug an executable you have already built. This feature will automatically create a project and debug configuration for you. This is helpful if you have an executable built with debug symbols but may not have the project used to build the executable. </p>

  <h4>Importing Executables for Debugging </h4>
  <ol>
    <li>Select the <b>File &gt; Import...</b> menu item.</li>
    <li>In the <b>Import</b> wizard dialog, click <b>C/C++</b> and select <b>C/C++ Executable</b>.<br />
      <p><img src="../images/cdt_debug_exes01.png" vspace="12"  alt="Import dialog"/></p></li>
    <li>Click <b>Next</b>.</li>
   <li>In the <b>Import C/C++ Executable Files</b> page of the <b>Import Executable</b> dialog:<br />
   <ul>
   	<li>Choose a parser from the <b>Select binary parser</b> list.</li>
   	<li>Type the executable path in the <b>Select executable</b> box or click <b>Browse</b> to locate the executable.</li>
    <li>Type or click <b>Browse</b> to enter a directory path in the <b>Search directory</b> box, then select one or more executables from the <b>C/C++ Executable Files</b> list.</li>
   </ul>
   <p><img src="../images/cdt_debug_exes02.png" vspace="12"   alt="Import Executable dialog"/></p>
   <p><b>NOTE</b> You can import any executable, but only those built with debug symbols will be let you step through source code and see variable values. </p>
   </li>
   <li>Click <b>Next</b>.</li>
   <li>In the <b>Choose Project</b> page of the <b>Import Executable</b> dialog:<br />
   <ul>
   	<li>To import as a new project, activate <b>New project name</b> and type the project name.</li>
   	<li>To import into an existing project, activate <b>Existing project</b> and click <b>Search</b>.</li>
   	<li>To add a launch configuration, activate <b>Create a Launch Configuration</b> and select the configuration from the list, then type a name into the <b>Name</b> box.</li>
   </ul>
   <p><img src="../images/cdt_debug_exes03.png" vspace="12"   alt="Import Executable dialog"/></p>
   </li>
  <li>Click <b>Finish</b>.<br />
    <p>The executable is added to the <b>C/C++ Projects</b> view.</p></li>
  <li>If <b>Create a Launch Configuration</b> was activated, the <b>Debug</b> dialog appears.<br />
      <p><img src="../images/cdt_debug_exes04.png" vspace="12"  alt="Debug launch configuration dialog"/></p>
  </li>
  <li>Click <b>Debug</b>.<br />
  <p>The debugger launches and you can begin debugging the executable.</p></li>
  </ol>
  
  <h3>Setting breakpoints </h3>
  <p>Expand the executable in the <b>C++ Projects</b> view to see the list of source files. Only executables built with debug symbols will show a list of source files. The source files can be opened in the editor so you can set breakpoints. Use these files only for debugging, you can not change them and rebuild the executable with this project. </p>
     <p><img src="../images/cdt_debug_exes05.png" alt="C++ Projects View" vspace="12" /></p>
 
<p><img border="0" src="../images/ngconcepts.gif" alt="Related concepts" width="143" height="21" /> <br />
    <a href="../concepts/cdt_c_over_dbg.htm">Debug overview</a><br />
  <a href="../concepts/cdt_c_dbg_info.htm">Debug information</a></p>
<p><img border="0" src="../images/ngtasks.gif" alt="Related tasks" width="143" height="21" /> <br />
  <a href="cdt_o_debug.htm">Debugging</a></p>
<p><img border="0" src="../images/ngref.gif" alt="Related reference" width="143" height="21" /> <br />
  <a href="../reference/cdt_o_run_dbg_pages.htm">Run and Debug dialog box</a></p>
<hr />
<img src="../images/nokia2007Copyright.png" alt="Nokia Copyright Statement" />
</body>
</html>

Back to the top