DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using the graphical interface of debug

Control menu

The Control menu in the debugger's default configuration provides control over the processes and threads being debugged. Clicking MENU on the Control button brings up a menu with different options, depending on which panes are present in the window. The following options appear in the Control menu of one or more windows in the default configuration (remember that you can configure the Control menu to have different options, or can move these options to different menus):

Animate Disassembly

The Animate Disassembly option starts the current process or thread stepping, and it will continue stepping until an event triggers or until you stop it. A message will appear at the bottom of the window indicating that the process or thread is being animated. To stop the animation, select the ``Halt'' button in the ``Control menu''. Except for ``Destroy'' and ``Input'', no actions that affect the state of the process or thread are allowed while it is being animated.

While the process or thread is animated, the debugger will highlight each instruction in the ``Disassembly pane'' as it is executed. It will step into any function calls that are encountered. Information in other windows is not updated until the animation stops. Animation stops if the process or thread terminates, or if the thread enters the Off lwp or Suspended state, or if an event triggers.

If the stepping happens too quickly or too slowly, you may slow it down or speed it up using the ``Animation'' option under the ``Properties menu''.

By selecting the Animate Disassembly option, you specify stepping at the instruction level. The ``Animate Source'' option lets you animate the process or thread at the statement level.

The Animate Disassembly option may only be configured in windows that contain a ``Disassembly pane''. In the debugger's default configuration, the Animate Disassembly option is available in the ``Control menu'' of the Disassembly window.

Animate Source

The Animate Source option starts the current process or thread stepping, and it will continue stepping until an event triggers or until you stop it. A message will appear at the bottom of the window indicating that the process or thread is being animated. To stop the animation, select the ``Halt'' button in the ``Control menu''. Except for ``Destroy'' and ``Input'', no actions that affect the state of the process or thread are allowed while it is being animated.

While the process or thread is animated, the debugger will highlight each statement in the ``Source pane'' as it is executed. It will step into any function calls that are encountered. Information in other windows is not updated until the animation stops. Animation stops if the process or thread terminates, or if the thread enters the Off lwp or Suspended state, or if an event triggers.

If the stepping happens too quickly or too slowly, you may slow it down or speed it up using the ``Animation'' option under the ``Properties menu''.

By selecting the Animate Source option, you specify stepping at the statement level. The ``Animate Disassembly'' option lets you animate the process or thread at the instruction level.

The Animate Source option may only be configured in windows that contain a ``Source pane''. In the debugger's default configuration, the Animate Source option is available in the ``Control menu'' of the Source window.

Jump

The Jump popup window lets you specify a ``Location'' from which to resume the execution of the affected processes and threads. Enter the location on the Location line.

This option does not resume execution of the selected processes or threads. The next time you select one of the options that start a process or thread, execution will start from this location.

The location may be any address within the text of the selected processes, but extreme care should be taken. Jump does not attempt to adjust the process or thread stack if the address is outside of the current function. Care must also be taken in jumping around code that might have important side effects.

If the window contains a ``Process pane'', and there are threads or processes selected in that pane, the Jump option affects the selected threads and processes. If no processes or threads are selected, or Jump is invoked from a window that does not contain a Process pane, the current process or thread is affected.

If text is selected in the ``Source pane'' or ``Disassembly pane'', the ``Location'' field will be initialized with the line number or location of the selection.

This option is not available unless all the selected processes and threads are stopped.

In the debugger's default configuration, the Jump option is available in the ``Control menu'' of every window.

Halt

Clicking SELECT on the Halt option directs the affected processes and threads to immediately suspend execution. This option is not available unless all the selected processes and threads are in the Running or Stepping states.

If the window contains a ``Process pane'', and there are threads or processes selected in that pane, the Halt option affects the selected threads and processes. If no processes or threads are selected, or Halt is invoked from a window that does not contain a Process pane, the current process or thread is affected.

Note that the Halt request may not take effect instantaneously, due to system latency and scheduling variations.

In the debugger's default configuration, the Halt option is available in the ``Control menu'' of every window.

Next Instruction

Clicking SELECT on the Next Instruction option steps the affected processes and threads through one machine instruction. Function calls are stepped over (treated as a single statement). Note that the process or thread may still stop if an event triggers while the process or thread is in the called subroutine.

If the window contains a ``Process pane'', and there are threads or processes selected in that pane, the Next Instruction option affects the selected threads and processes. If no processes or threads are selected, or Next Instruction is invoked from a window that does not contain a Process pane, the current process or thread is affected.

This option is not available unless all the selected processes and threads are stopped.

In the debugger's default configuration, the Next Instruction option is available in the ``Control menu'' of every window.

Next Statement

Clicking SELECT on the Next Statement option steps the affected processes and threads through one source statement. Function calls are stepped over (treated as a single statement). Note that the process or thread may still stop if an event triggers while the process or thread is in the called subroutine.

If the window contains a ``Process pane'', and there are threads or processes selected in that pane, the Next Statement option affects the selected threads and processes. If no processes or threads are selected, or Next Statement is invoked from a window that does not contain a Process pane, the current process or thread is affected.

This option is not available unless all the selected processes and threads are stopped.

In the debugger's default configuration, the Next Statement option is available in the ``Control menu'' of every window.

Return

Clicking SELECT on the Return option starts the affected processes and threads running. If the window contains a ``Process pane'', and there are threads or processes selected in that pane, invoking the Return option starts the selected threads and processes running. If no processes or threads are selected, or Return is invoked from a window that does not contain a Process pane, the current process or thread is set running. Each process or thread that is set running will run until the current function returns.

Note that the process or thread may stop before returning to the calling function if an event triggers while it is running.

This option is not available unless all the selected processes and threads are stopped.

In the debugger's default configuration, the Return option is available in the ``Control menu'' of every window.

Run

Clicking SELECT on the Run option starts the affected processes and threads running. If the window contains a ``Process pane'', and there are threads or processes selected in that pane, invoking the Run option starts the selected threads and processes running. If no processes or threads are selected, or Run is invoked from a window that does not contain a Process pane, the current process or thread is set running. This option is not available unless all the selected processes and threads are stopped.

In the debugger's default configuration, the Run option is available in the ``Control menu'' of every window.

Run Until

The Run Until popup window lets you specify a ``Location'' to run to. Enter the location in the ``Location'' field. If text is selected in the ``Source pane'' or ``Disassembly pane'', the ``Location'' field will be initialized with the line number or location of the selection.

If you popped up the Run Until window from a window containing a ``Process pane'', the selected processes and threads (if any) in the Process pane are affected. Otherwise, the current process or thread is affected.

Note that Run Until does not guarantee that the process or thread will ever get to the specified location. If your program takes an unexpected execution path, it may exit or simply bypass the location. Also, if an event triggers, the process or thread will stop before reaching the specified location.

In the debugger's default configuration, the Run Until option is available in the ``Control menu'' of every window.

Step

The Step popup window gives you more control over stepping than the other options in the ``Control menu'' provide.

The first set of options lets you control how many times the process or thread is stepped. Selecting Single Step steps the process or thread once. If you select Step Count Times, you must enter, in the ``Count'' field, the number of times to step the process or thread.

The Statement and Instruction options specify the level at which stepping is to take place.

The Over Call option lets you specify whether to step over or into function calls.

If you popped up the Step window from a window containing a ``Process pane'', the selected processes and threads (if any) are affected. Otherwise, the current process or thread is affected.

The ``Step Statement'', and ``Step Instruction'', ``Next Statement'', and ``Next Instruction'' options in the ``Control menu'' provide simpler ways to step a process or thread. For example, ``Next Instruction'' is equivalent to selecting Single Step, Instruction, and Over Call in the Step window. In addition, the ``Animate Source'' and ``Animate Disassembly'' buttons will step the process or thread continually until stopped.

In the debugger's default configuration, the Step option is available in the ``Control menu'' of every window.

Step Instruction

Clicking SELECT on the Step Instruction option steps the affected processes and threads through one machine instruction, stepping into function calls.

If the window contains a ``Process pane'', and there are threads or processes selected in that pane, the Step Instruction option affects the selected threads and processes. If no processes or threads are selected, or Step Instruction is invoked from a window that does not contain a Process pane, the current process or thread is affected.

This option is not available unless all the selected processes and threads are stopped.

In the debugger's default configuration, the Step Instruction option is available in the ``Control menu'' of every window.

Step Statement

Clicking SELECT on the Step Statement option steps the affected processes and threads through one source statement, stepping into function calls.

If the window contains a ``Process pane'', and there are threads or processes selected in that pane, the Step Statement option affects the selected threads and processes. If no processes or threads are selected, or Step Statement is invoked from a window that does not contain a Process pane, the current process or thread is affected.

This option is not available unless all the selected processes and threads are stopped.

In the debugger's default configuration, the Step Statement option is available in the ``Control menu'' of every window.


Next topic: Event menu
Previous topic: Show Value

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004