core/com.nokia.carbide.cpp.doc.user/html/tasks/processes/attach_to_process.htm
author fturovic <frank.turovich@nokia.com>
Tue, 31 Aug 2010 16:18:02 -0500
changeset 1933 a77f12f0a631
child 2009 b622387629d6
permissions -rw-r--r--
BUG 10651 - added debugging dll with any process info, revised launch config pages and others
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1933
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
     2
<html>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
     3
<head>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
     4
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
     5
<meta http-equiv="Content-Style-Type" content="text/css" />
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
     6
<meta name="LASTUPDATED" content="06/17/05 11:09:43" />
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
     7
<title>Attaching to a Process</title>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
     8
<link rel="StyleSheet" href="../../../book.css" type="text/css"/>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
     9
</head>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    10
<body >
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    11
<h2>Attaching  to a Process</h2>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    12
<div>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    13
  <p>Use a <b>Symbian OS Attach to Process</b> launch configuration to attach the debugger to an already running Symbian OS process or thread on a target device. This is useful for debugging DLLs where the main process is unknown or for servers running in RAM in a client-server relationship where the client relies on the presence of the server process to operate.</p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    14
  <p>One common debugging DLL use case is when the developer doesn't know which process calls the DLL. This makes it difficult to debug the DLL because you doesn't know which process to attach to nor start. Carbide enables DLL debugging  by simply attaching the DLL to any running process as long as the DLL is included in the <a href="../../reference/view_executables.htm">Executables</a> view.</p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    15
  <p>You can also attach to a process in the <a href="../../reference/view_symbian_kernel.htm">Symbian OS Data</a> view when debugging.</p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    16
  <p class="note"><b>NOTE</b> You cannot attach to a process running on the emulator. It must be a target device running the Symbian OS and the TRK debug agent.</p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    17
  <p>When attempting to find a process the debugger  uses the UID3  to locate the process. </p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    18
  <div class="step">
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    19
    <h4>Attaching to any Running Process</h4>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    20
    <ol>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    21
      <li>In the <a href="../../reference/view_executables.htm">Executables</a> view, click the Import an executable file icon (<img src="../../images/icons/btn_import_executables.png" alt="Import an executable icon" width="18" height="15" align="absmiddle">) to add an executable to the Executables view for debugging.
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    22
          <p>The executable added appears in the <a href="../../reference/view_proj_explorer.htm">Project Explorer</a> view under an <b>Executables</b> project. This group includes all executables listed in the <b>Executables</b> view that are not linked to any project in the workspace.</p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    23
          <p align="center"><img src="../projects/images/attach_to_process_proj_explorer.png" alt="Project Explorer Executables project" width="267" height="267"></p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    24
          <p class="figure">Figure 1 -<b> Executables list in Project Explorer view</b></p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    25
          <p class="note"><b>NOTE</b> The executable must include symbolics in order for debugging to work.</p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    26
      </li>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    27
      <li>Click Debug (<img src="../../projects/images/icon_debug.png" alt="Debug icon" width="17" height="17" align="absmiddle">) to launch the <a href="../../projects/launch/wiz_new_launch_config.htm">New Configuration Launch Wizard</a>.</li>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    28
      <p>Select the Symbian OS Attach to Process launch configuration option and fill in the requested information.</p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    29
      <p align="center"><img src="../projects/images/attach_to_process_launch_config.png" alt="Attach to Process launch config" width="641" height="312"></p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    30
      <p class="figure">Figure 2 -<b> Attach to Process</b> launch configuration</p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    31
      <li>Click Debug.</li>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    32
      <p>The <b>Attach to Process </b>dialog appears. Click a column title to sort the processes in ascending or descending order to help you locate a specific process or use the filter text box to show specific processes. </p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    33
      <p align="center"><img src="images/sos_processes_choose_thread.png" width="300" height="375" /></p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    34
      <p class="figure">Figure 3 -<b> Attach to Process</b> window </p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    35
      <li>Select a process, click OK.</li>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    36
      <p>In this example we've linked the <span class="code">prefs.dll</span> program to the process <span class="code">BlackFlag.exe</span> on the device. The <b>Attach to Process </b>dialog closes. Open the <a href="../../reference/view_symbian_kernel.htm">Symbian OS Data</a> view to show the process and thread information.</p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    37
      <p class="note"><b>NOTE</b> Terminating an Attach to Process session actually kills the process on the device. This means you must restart the process on the device in order to attach to it again. </p>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    38
    </ol>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    39
</div>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    40
<h5>Related references</h5>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    41
<ul>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    42
  <li><a href="../../debugger/debug/viewing_debug.htm">Debug View</a></li>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    43
  <li><a href="../../reference/wnd_debug_configuration.htm">Debug Window </a></li>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    44
  <li><a href="../../reference/view_symbian_kernel.htm">Symbian OS View</a> </li>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    45
  <li><a href="../projects/prj_debug_dlls_any_process.htm">Debugging DLLs with any Process</a></li>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    46
</ul>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    47
<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    48
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    49
</body>
a77f12f0a631 BUG 10651 - added debugging dll with any process info, revised launch config pages and others
fturovic <frank.turovich@nokia.com>
parents:
diff changeset
    50
</html>