HLASM Toolkit Feature Interactive Debug Facility User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Dynamically loaded programs

HLASM Toolkit Feature Interactive Debug Facility User's Guide
GC26-8709-07

The IDF DBREAK command provides a powerful deferred breakpoint facility to allow the simple debugging of programs that are dynamically loaded using standard system calls. See DBREAK for details.

Attention: If your program is dynamically loaded, and then deleted from storage, any existing breakpoints are invalidated. Use the IDF DROP MODULE command to notify IDF that the module definition is no longer valid.

DROP MODULE removes all breakpoints that are currently defined for locations within this module. Any deferred breakpoints (from previous DBREAK commands) are reactivated in case this module is loaded into storage again, possibly at a different location.

If your program is dynamically loaded in a manner that is not supported by DBREAK (such as having your own routine that loads and relocates an object module), you need to use an alternative solution.
  • IDF needs to gain control when your program starts executing.
    You should insert an invalid opcode (such as X'0000') at the entry point of your program using one of the following methods:
    • If your program is written in assembler, insert a DC X'0000' data directive in your program source.
    • If a phase editor is available, change the opcode at the entry point to X'0000'. Record the original opcode for later restoration.
    • Use a binary editor to edit the object Module to change the opcode at the entry point to X'0000'. Record the original opcode for later restoration.
  • Invoke IDF and press the RUN key, on the terminal that you have specified in the LUNAME parameter on the EXEC ASMIDF statement.
  • Your program is dynamically loaded into memory and executes the instruction (X'0000') that you inserted.
  • IDF issues a message saying that an operation exception has occurred.
  • At this point:
    • If an extra instruction (X'0000') was inserted, you need to open the Current Registers window, and use IDF's register typeover capability to update the PSW to advance the current execution address by 2.

      You may optionally replace the X'0000' by a NOPR R0 (X'0700') instruction. This stops IDF receiving control at this location if the instruction is executed again.

    • If an existing instruction was replaced (by X'0000'), you can restore the modified instruction to its original value by opening a Disassembly window or Dump window and using IDF's storage typeover capability.
  • You should now be able to continue debugging the program as usual.

For information about source level support for dynamically loaded programs, see Source level support.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014