Top
NetCOBOL V11.0 Debugging Guide
FUJITSU Software

2.8.5 Starting the Remote Debugger

This section explains how to start the remote debugger and provide the information required for debugging.

2.8.5.1 Specification for Remote Debugging using the Start Debugging dialog box

To start remote debugging a program, select File, "Start Debugging". This brings up the Start Debugging dialog box.

Figure 2.17 The Start Debugging Dialog Box

The Start Debugging dialog box lets you input all the information the remote debugger requires to execute your program. You only need to enter the information that applies to your program.

For most items, this is the same as for the normal debugger. However, you must store the resources that are required for debugging in the server or in the client properly.

For details about the storage location for resources that are required for remote debugging, refer to "2.8.1.2 Storage location for resources when doing remote debugging".

The information requested on each tab is as follows:

Table 2.9 Start Debugging Dialog Box Parameters

Parameter

Description

Application

Application:

Name of the EXE file to be loaded.

This is the only mandatory parameter.

When you use the Win32 remote debugger and omit the extension, it is assumed that the extension is EXE. When you use the Solaris remote debugger and omit the extension, it is assumed that the file has no extension.

Execution-time-options:

Any options expected on the command line of the program.

Start program:

Name of the first program to be debugged (must be a program prepared for debugging).

Default: the first program for debugging executed in the EXE or a DLL called by it.

Source

Source file storage folders:

Folders containing the source of the programs to be debugged..

Copy library storage folders:

Folders containing copy libraries used by the debug target programs.

Default: If this parameter is omitted or cannot be found in the specified folders, a search for the parameter will be made from the folders specified by environment variable COB_COBCOPY. For copy library files with IN/OF specified, a search for the parameter will be made from the folders specified by the environment variable COB_library-name.

Subschema descriptor file storage folders:

For the Win32 remote debugger only.

Folders containing subschema used by the debug target programs.

Default: If this parameter is omitted or cannot be found in the specified folders, a search for the parameter will be made from the folders specified by environment variable COB_AIMLIB.

Descriptor

Screen and form descriptor:

Folders and extension of form descriptors used by the debug target programs.

Default: If this parameter is omitted or cannot be found in the specified folders, a search for the parameter will be made from the folders specified by environment variable FORMLIB. Extension PMD.

File descriptor:

For Win32 and Solaris remote debuggers only.

Folders and extension of file descriptors used by the debug target programs.

Default: If this parameter is omitted or cannot be found in the specified folders, a search for the parameter will be made from the folders specified by environment variable FILELIB. Extension FFD.

Debugging Information

Debugging information file storage folders

Folders containing debugging information file. (.SVD files)

Default: If this parameter is omitted or cannot be found in the specified folders, when using the Win32 remote debugger, a search for the parameter will be made from the folders containing executable file or dynamic link library. When using the Solaris remote debugger, a search for the parameter will be made from the folders specified in Server Folder in Server Cooperation page.

Batch Debugging

Use Batch Debugging

Batch Debugging is performed.

Command file

File to drive the debugging session.

Default extension: LOG

History file

File to save actions and results from the debugging session.

Default extension: LOG

Server Cooperation

Host

Specify the port number and host of the server remote debugger connector in the connect destination

If you start as described in "2.8.2.2 How to start remote debugging for programs that run in server environments such as Interstage" or "2.8.2.3 How to start remote debugging using the just-in-time debugging function", the server IP address is displayed automatically and this cannot be modified.

Server Folder

Specify the current folder when the application is running.

If you start as described in "2.8.2.2 How to start remote debugging for programs that run in server environments such as Interstage" or "2.8.2.3 How to start remote debugging using the just-in-time debugging function", the current when the application started is displayed automatically and this cannot be modified.

Delete

The currently displayed connect destination is deleted from Host drop-down combo box.

Details of the Start Debugging Dialog Box Options

Specifying Folder Name and File Name

When you specify a folder name or a file name, the syntax of the name depends on the conventions of the server or the client upon which it resides.

For Application, folders or files included in Execution-time-options, Debugging information file, storage folders and Server Folder, specify them according to the conventions of the server.

If you specify the relative path in the Application page, Application, Execution-time options, or Debugging Information page, Debugging information file storage folders, this is handled as the relative path from the server folder specified here.

For Source file storage folders, Copy library storage folders, Subschema descriptor file storage folders, Screen and form descriptor, File descriptor, Command file and History file, specify them according to the conventions of the client.

Multiple folder names

For fields that accept multiple folders, separate the folder names by semicolons ";". The debugger searches for files in order of the specified folders.

How to specify Host

Specify host in the following format:

The IP address is IPv4 format or IPv6 format.

The port number must be from 1024 to 65535. If you omit the port number, it will default to 59998.

The IPv6 format can specify the scope address. The scope address specifies the scope identifier after the address.

When you set the IPv6 address to the port number, you must enclose the address with [ ].

For details of IPv6, refer to "For IPv6 of debugging" in the "NetCOBOL User's Guide".

Example

[IPv4 address(192.168.0.1) and port number(2000)]
  192.168.0.1:2000
[IPv6 address(fe80::1:23:456:789a) and port number(2000)]
  [fe80::1:23:456:789a]:2000
[IPv6 address (fe80::1:23:456:789a) and scope identifier (%eth0)]
  fe80::1:23:456:789a%eth0
[IPv6 address (fe80::1:23:456:789a), scope identifier (%5) and port number (2000)]
   [fe80::1:23:456:789a%5]:2000
[Host name(server-1) and port number(2000)]
  server-1:2000
[Port number omitted(IPv4)]
  192.168.0.1
[Port number omitted(IPv6)]
  fe80::1:23:456:789a

2.8.5.2 Specifying Options on the Command Line for the Remote Debugger

This section explains the way to start the remote debugger using command format.

Since you must start the remote debugger using the winsvd command, in the Project Manager window, Tools menu, select Debugger type, and then Win32 remote or Solaris remote.

For most items, this is the same as for the normal debugger. However, you must store the resources that are required for debugging in the server or in the client as appropriate.

For details about the storage location for resources that are required for remote debugging, refer to "2.8.1.2 Storage location for resources when doing remote debugging".

You can also specify a start parameter for the host.

To start the remote debugger from the command line, use the WINSVD command with the following format:

winsvd [start-parameter] [application-name] [execution-time-option]

You must specify the parameters in the order shown above.

If you only enter "winsvd", you need to provide the application information in the Start Debugging dialog box.

You must specify application-name if you want to enter any other information after "winsvd".

When you start the remote debugger with information on the command line, it comes up with the Start Debugging dialog box opened and the command line information entered in the appropriate fields.

To start remote debugging, enter any further information in the Start Debugging dialog box, and click the OK button.

See the list below for the supported start parameters.

Table 2.10 Start-Parameters

Specification Format

Field in Start Debugging dialog box

-U host

Specify the host for remote debugging.

The format of the specification is same as that described in "How to specify Host" in "2.8.5.1 Specification for Remote Debugging using the Start Debugging dialog box", except for the case of omission. When this is omitted, it is assumed that the port number that was available at the last connection is specified. For the first connection, it will be 59998.

You cannot specify this parameter in the @CBR_ATTACH_TOOL or @CBR_JUSTINTIME_DEBUG environment variable.

-G start- program-name

Start program

-S source-file-storage-folder-name

Source file storage folders

-C copy-library-storage- folder -name

Copy library storage folders

-A subschema- descriptor-file-storage- folder -name (Note)

Subschema descriptor file storage folders.

For the Win32 remote debugger only.

-M screen-and form-descriptors-storage- folder -name

Screen and form descriptor folders

-E screen-and form-descriptors-extension

Screen and form descriptor extension

-H file-descriptors-storage- folder -name

File descriptor folders.

-O file-descriptors-extension

File descriptor extension.

-D debugging-information- file-storage- folder -name

Debugging information file storage folders

-B command-file-name

Command file

-L history- file-name

History file

-N

Starts debugging without opening the Start Debugging dialog box.

In the case of the Win32 remote debugger, the start character of the start parameter is handled the same whether it is a slash (/) or a hyphen (-). In the case of the Solaris remote debugger, you can only use a hyphen (-) as the start character. Additionally, the parameter name that continues after the start character can be handled if it contains upper-case letters and lower-case letters. If you have specified several start parameters, leave at least one space between each.

Example

  • To enter a command with the following parameters and options for Win32 remote debugger:

    • Server: server-1

    • Application name: E:\EXE\SAMPLE1.EXE

    • Execution-time option: PARAM1

    • Source file storage folder name: D:\SOURCE

    • Debugging information file storage folder name: E:\SVD

    The command line would be:

    winsvd /U server-1 /S d:\source /D e:\svd e:\exe\sample1.exe param1
  • To enter a command with the following parameters and options for Solaris remote debugger:

    • Server: server-1

    • Application name: /home/usr1/sample1

    • Execution-time option: PARAM1

    • Source file storage folder name: D:\SOURCE

    • Debugging information file storage folder name: /home/usr1/svd

    The command line would be:

    winsvd -U server-1 -S d:\source -D /home/usr1/svd /home/usr1/sample1 param1

Note

  • Specify the folder name or file name in the execution-time option according to the server folder conventions.

  • Note the following points in the case of a Solaris remote debugger:

    • You cannot use a slash (/) in the start character of the start parameter.

    • Since the server file name and folder name are case sensitive, take care when you specify upper-case letters and lower-case letters.

    • The start parameters that you can specify are different from those of the svd command.