Previous Topic Next topic Print topic


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, plitest_debugger, plitest_string, plitest_host);

Parameters

plitest_string is a string representing the IP address and port where you want to route the debugging session. This is useful for remote debugging.

plitest_debugger is a numeric value representing the type of CodeWatch debugger.
  • 0 = Use Command-line CodeWatch.
  • 1 = Use the GUI CodeWatch

pltest_host is a name designator for the IP and port.

Description

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

You can use PLITEST to debug PL/I programs running under CICS, or use the plitest parameter of the -optexec option to do the same. See Compiler Options and Debugging PL/I Programs Under CICS for more information.

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 plitest_strings  char(1024) varying native
    init('shlib myprog.so;env myprog;br mylabel;c');

dcl plitest_host char(100) varying native init('10.24.11.80:0');

dcl plitest_debugger   fixed bin(31) init(1);
/*1 = Use codewatch GUI debugger interface*/ 

call PLITEST(plitest_strings, plitest_host, plitest_debugger);

This example uses plitest_string, plitest_debugger, and plitest_host to start the debugger.

dcl plitest_string            char(1024) varying native static init(
       'shlib mqplidrv.dll;env mqplidrv;br plitest_label;br %exit[det;q];c');  
dcl plitest_debugger          fixed bin(31) native static init(0);  
dcl plitest_host              char(100) varying native static init('');  
call PLITEST(plitest_string, plitest_host, plitest_debugger);

Restrictions

An XWindows Server such as Micro Focus ViewNow is needed if trying to display GUI CodeWatch on a Windows machine while running the user program on a UNIX/Linux server.

Previous Topic Next topic Print topic