SourcePoint Intel Help

Table of Contents

taskattach

Cause the debugger to attach to and control a task already running on the target operating system.

Syntax

[result =] taskattach(filename, pid)

Where:

result

specifies the debug object of type ord4 to which the function return value is assigned. If result is not specified, the return value is displayed on the next line of the screen. The return value is 1 if successful and 0 if not successful.

filename

specifies a filename. ย See Filenames for details.

pid

specifies the program identifier (PID) of the program to attach to and debug. The program is already running on the target operating system.

Discussion

The TaskAttach command attaches the debugger to the program associated with the specified program identifier (PID) that is already running on the target operating system. If successful, the task will be stopped and ready for debugging. ย The PID for a program can be obtained by using the taskgetpid command.

Example

The following example demonstrates attaching the debugger to the target operating system program with a PID equal to 5.

Command input:

taskattach("c:\\prog\\hello", 5)

Result:

0001H

Related Topics: