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
- 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.
- Install the DataBlade® module
shared object and SQL scripts in the $INFORMIXDIR/extend/project directory.
See Installing a DataBlade module for more information.
- Start your database server with the oninit command,
while logged on as the informix user.See the Informix® Administrator's Guide for more information.
- Register the DataBlade® module
by using BladeManager (if necessary).See Register a DataBlade module for more information.
- 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.
- Load the DataBlade® module
by calling one of its routines.See Load the DataBlade module for instructions.
- Log on as user root in a new window to run the debugger.
- Obtain the database server process ID for the root session.
See Identify the server process for instructions.
- Run the debugger and attach to the database server process.
See Run the Solaris debugger for instructions.
- Set any appropriate breakpoints.See Set breakpoints for more information.
- Issue SQL statements to call your DataBlade® module
routines from the informix session.See the Informix® DB-Access User's Guide for more information.
- Edit the source code (if necessary).
- Repeat the procedure, as necessary.