Debug information

Debug information is a collection of information that is generated by the C/C++ compiler or assembler program that describes the application for a debugger to use.

BAL shared objects (BSOs) and C/C++ shared objects (CSOs) are in executable and linkable format (ELF) object files. A shared object is copied to the z/TPF file system for the debugger to use for debug information. These files are stored in the /tpfdbgelf directory on the z/TPF file system based on the name of the file and the timestamp. For example, debug information might exist for program ABCD at the following location: /tpfdbgelf/ab/abcd/20080321023401.

Debug information describes variables (type, scope, location), executable lines, and so on. To use #define macro support with the GNU Compiler Collection (GCC), specify the -g3 compile option. #define macro support is not available with the Systems/C and Systems/C++ compilers.

Load debug information for assembler or C/C++ programs by using:
  • The remote debug information feature to transfer the debug information file. If the debug information file is not loaded to the z/TPF system, automatic load support for remote debug information, if applied, is used to locate and retrieve the debug information file on Linux® on IBM Z and automatically load it to the z/TPF system.
    Note: Automatic load support for remote debug information applies only to debugging C/C++ programs but not to debugging assembler programs. To debug assembler programs, you must manually load the programs with debug information. For more information about debugging assembler programs, see Building application programs for debugging.
  • The z/TPF loader, which includes:
    • Offline loads, which can be done directly from the IBM TPF Toolkit
    • Offline loader files (OLDR.load or TLDR.load) with DEBUGFILES=YES specified in the @DEFINE control file
    • The ZOLDR LOAD or ZTPLD command
      Note: By default, the ZOLDR LOAD and ZTPLD commands load programs with debug information. If you do not want to load debug information, specify the NODEBUG parameter on those commands.
  • A binary FTP of debug information files to the z/TPF file system. For example, program ABCD might have debug information found at the following location: /tpfdbgelf/ab/abcd/ABCD

Subsystem considerations:

The z/TPF debugger searches for a debug information file for a program in a basic subsystem (BSS) based on the following criteria in the order listed:

  1. The program timestamp
  2. The timestamp followed by the .dbgftp file extension
  3. The timestamp followed by the .ovrftp file extension
  4. The 4-character program name