Debugging a DataBlade module

Debugging a DataBlade® module is usually an iterative process, repeated many times until the code is debugged.

About this task

The debugging process has the following general steps:

Procedure

  1. Build the shared object file with debugging support while logged on as user informix (if necessary).

    To debug a DataBlade module, compile the shared object file with the -g compiler option so that debugging symbols are available to the debugger. See Compile DataBlade module code for information about compiling with debugging support.

  2. Install the DataBlade module shared object and SQL scripts in the $ONEDB_HOME/extend/project directory.
    See Installing a DataBlade module for more information.
  3. Start your database server with the oninit command, while logged on as the informix user.
    See the HCL OneDB™ Administrator's Guide for more information.
  4. Register the DataBlade module by using BladeManager (if necessary).
    See Register a DataBlade module for more information.
  5. If you are replacing an existing shared object, shut down and restart the database server with the onmode -yuk and oninit commands.
    See Replace a shared object file for more information.
  6. Load the DataBlade module by calling one of its routines.
    See Load the DataBlade module for instructions.
  7. Log on as user root in a new window to run the debugger.
  8. Obtain the database server process ID for the root session.
    See Identify the server process for instructions.
  9. Run the debugger and attach to the database server process.
    See Run the Solaris debugger for instructions.
  10. Set any appropriate breakpoints.
    See Set breakpoints for more information.
  11. Issue SQL statements to call your DataBlade module routines from the informix session.
    See the HCL OneDB DB-Access User's Guide for more information.
  12. Edit the source code (if necessary).
  13. Repeat the procedure, as necessary.

Results