2.3.45. DISCONNECT

Disconnects the debugger from a target.

Syntax

DISCONNECT [,all | ,gui] [{,debug|,nodebug}] [=][@target]

where:

all

Disconnects all connections.

gui

Enables you to choose the disconnect mode from a dialog or prompt:

  • If you use this option when running in GUI mode, it displays a dialog.

  • If you use this option when running in command line mode, it displays a prompt.

The disconnect specifies what state you want the debugger to leave the target in after the disconnection. See Disconnect modes for more details.

debug

Disconnects using the As-is with Debug mode (see Disconnect modes).

nodebug

Disconnects using the As-is without Debug mode (see Disconnect modes). This is the default.

target

Specifies the required target name as it appears in the GUI.

Description

The DISCONNECT command disconnects the debugger from a target, undoing the action of a previous CONNECT. You can specify the target as outlined for the CONNECT command.

Note

If you set the disconnect mode in the board (.BRD) file of the target, the target disconnects using that mode. If you specify prompt for the disconnect mode, then the DISCONNECT command acts as though you specified the ,gui qualifier.

The DISCONNECT command runs asynchronously.

You cannot use the DISCONNECT command inside a macro.

Disconnect modes

When you disconnect from a target, the disconnect mode determines what happens to the target:

As-is with Debug

Leave the target in the current run state and the current debug state. That is:

  • If the target is running, leave it running. If the target is stopped in debug state, leave it stopped.

  • Current debug state intact, for example, breakpoints remain set.

As-is without Debug

Leave the target in the current run state but without the current debug state. That is:

  • If the target is running, leave it running. If the target is stopped in debug state, leave it stopped.

  • Current debug state lost, for example, breakpoints are removed.

Note

The disconnect modes available depend on the Debug Interface you are using.

Implications for OS-aware connections

If you disconnect from an OS-aware connection, RealView Debugger sends a command to the Debug Agent, which might resume all stopped threads depending on how the Debug Agent is implemented.

Restrictions on the use of DISCONNECT

The DISCONNECT command is not allowed in a macro.

Examples

The following examples show how to use DISCONNECT:

disconnect,all

Disconnect all currently connected connections.

disconnect

Disconnect the current target:

In the GUI, this is the target shown in the title bar of the Code window where you enter the command. Therefore, if you enter the command in a Code window that is attached to a connection, then the connection to which the Code window is attached is disconnected.

Note

You can determine the current connection using the BOARD command.

disconnect,gui @ARM940T_0@RVI

Open the Disconnect Mode selection dialog box to disconnect the target @ARM940T_0@RVI.

disconnect @ARM7TDMI@RVISS

Disconnect the named RVISS target. The Debug Configuration, @RVISS, is optional where there is no ambiguity.

Note

Target names must be entered as they appear in the Connect to Target window.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N
Non-ConfidentialID052111