modules
Use the dbx modules service to obtain information about loaded modules for the process.
You can do either of the following:
- Call iteratively to get information separately on each module.
- Call once to get the total number of modules and call once again to get information on all modules simultaneously.
If the plug-in passes a non-NULL infop buffer, dbx populates the buffer with the number of entries requested in *countp, starting with the module referenced by *indexp.
If the plug-in passes a *countp that is greater than the number of remaining entries, dbx retrieves all remaining entries. dbx updates countp to reflect the next module index. If the last module was retrieved, indexp is set to -1. If the plug-in passes a NULL infop buffer, indexp and countp are still updated — just as if infop were non-NULL.
If the first thread is requested and countp is updated
to zero, the process is not threaded.
Note: This routine allocates memory to hold the file name and
member character strings. The caller must free this memory when it
is no longer needed.
typedef int (*dbx_plugin_modules_service_t)(dbx_plugin_session_t session,
dbx_plugin_modinfo_t *infop,
size_t modinfo_size,
unsigned int *indexp,
unsigned int *countp)
The
following table displays the dbx module service parameters:
| Parameter | Description |
|---|---|
| session | Session identifier |
| infop | Allocated array of dbx_plugin_modinfo_t structures or NULL |
| modinfo_size | Size of a single dbx_plugin_modinfo_t structure |
| indexp | Starting/next module (where zero corresponds to the first module) |
| countp | Number of modules |
- DBX_PLUGIN_SUCCESS
- DBX_PLUGIN_BAD_SESSION — session is not valid
- DBX_PLUGIN_BAD_POINTER — indexp is NULL or countp is NULL
- DBX_PLUGIN_BAD_ARG — modinfo_size is not valid or *countp == 0