PLITEST Subroutine

Purpose

Attaches a debugger to a set point in a program to execute a series of commands.

Syntax

CALL PLITEST(Debug_Commands, Display Address, PLITEST_FLAGS);

Parameters

Debug_Commands is a string of CodeWatch commands you want executed immediately after PLITEST has attached to your process.

Display_Address is the IP address or host name, and XWindows Display Number on which the debugger is invoked. It is only used for Linux/UNIX installations and is ignored for Window platforms.

PLITEST_Flags is a series of flags that can be used to control specialized behaviors, such as whether the java user interface is used or cwcmd under control of an XTERM environment.

Description

PLITEST is an API called from User programs that causes a debugger to dynamically attach itself and execute a series of commands. A PLITEST call is typically inserted in a user application where debugging is to start at a given point in the execution flow.

If using the -bigendian option

Examples

This example shows usage of PLITEST, assuming use of the -bigendian option when compiling.

DCL PLITEST ENTRY(CHAR(1024) varying native,  char(100) varying native, fixed bin(31) native );

DCL Debug_Commands  char(1024) varying native
    init(‘SHLIB MYPROG.so;ENV MYPROG;BR MYLABEL;C’);

DCL Display_Address char(100) varying native init(’10.24.11.80:0’);

DCL PLITEST_Flags   fixed bin(31) init(1);
/*1 = Use cw_java debugger interface*/ 

CALL PLITEST(Debug_Commands, Display_Address, PLITEST_FLAGS);

Restrictions

An XWindows Server such as Micro Focus ViewNow must be running on the client machine if debugging an application on a Linux/UNIX client machine in order to host the debugger user interface.

Java runtime environment (JRE) 1.6.0_11 or later must be installed on the machine executing the app calling PLITEST.