Go to main content
Oracle® Developer Studio 12.5: Debugging a Program with dbx

Exit Print View

Updated: June 2016
 
 

loadobject Command

The loadobject command lists and manages symbolic information from load objects. It is valid only in native mode.

This section lists the loadobject options and provides details about them.

Syntax

loadobject -list [regexp] [-a]

Show currently loaded load objects.

loadobject -load loadobject

Load symbols for specified load object.

loadobject -unload [regexp]

Unload specified load objects.

loadobject -hide [regexp]

Remove load object from dbx's search algorithm.

loadobject -use [regexp]

Add load object to dbx's search algorithm.

loadobject -dumpelf [regexp]

Show various ELF details of the load object.

loadobject -exclude ex-regexp

Don't automatically load loadobjects matching ex-regexp.

loadobject exclude -clear

Clear the exclude list of patterns.

where:

regexp is a regular expression. If it is not specified, the command applies to all load objects.

ex-regexp is not optional, it must be specified.

This command has a default alias lo.

loadobject -dumpelf Command

The loadobject -dumpelf command shows various ELF details of the load object. It is valid only in native mode.

Syntax

loadobject -dumpelf [regexp]

where:

regexp is a regular expression. If it is not specified, the command applies to all load objects.

This command dumps out information related to the ELF structure of the load object file on disk. The details of this output are highly subject to change. If you want to parse this output, use the Oracle Solaris OS commands dump or elfdump.

loadobject -exclude Command

The loadobject -exclude command tells dbx not to automatically load loadobjects matching the specified regular expression.

Syntax

loadobject -exclude ex-regexp [-clear]

where:

ex-regexp is a regular expression.

This command prevents dbx from automatically loading symbols for load objects that match the specified regular expression. Unlike regexp in other loadobject subcommands, if ex-regexp is not specified, it does not default to all. If you do not specify ex-regexp, the command lists the excluded patterns that have been specified by previous loadobject -exclude commands.

If you specify -clear, the list of excluded patterns is deleted.

Currently this functionality cannot be used to prevent loading of the main program or the runtime linker. Also, using it to prevent loading of C++ runtime libraries could cause the failure of some C++ functionality.

This option should not be used with runtime checking (RTC).

loadobject -hide Command

The loadobject -hide command removes load objects from dbx’s search algorithm.

Syntax

loadobject -hide [regexp]

where:

regexp is a regular expression. If it is not specified, the command applies to all load objects.

This command removes a load object from the program scope, and hides its functions and symbols from dbx. This command also resets the “preload” bit. For more information, refer to the dbx help file by typing the following into the dbx prompt.

(dbx) help loadobject preloading

loadobject -list Command

The loadobject -list command shows currently loaded loadobjects. It is valid only in native mode.

Syntax

loadobject -list [regexp] [-a]

where:

regexp is a regular expression. If it is not specified, the command applies to all load objects.

The full path name for each load object is shown along with letters in the margin to show status. Load objects that are hidden are listed only if you specify the -a option.

h

This letter means “hidden” (the symbols are not found by symbolic queries like whatis or stop in).

u

If there is an active process, u means “unmapped.”

p

This letter indicates a load object that is preloaded, that is, the result of a loadobject -load command or a dlopen event in the program.

For example:

(dbx) lo -list libm
/usr/lib/64/libm.so.1
/usr/lib/64/libmp.so.2
(dbx) lo -list ld.so
h  /usr/lib/sparcv9/ld.so.1 (rtld)

This last example shows that the symbols for the runtime linker are hidden by default. To use those symbols in dbxcommands, see loadobject -use Command.

loadobject -load Command

The loadobject -load command loads symbols for specified load objects. It is valid only in native mode.

Syntax

loadobject -load load-object

where:

load-object can be a full path name or a library in /usr/lib, /usr/lib/sparcv9 or /usr/lib/amd64. If a program is being debugged, then only the proper ABI library directory will be searched.

loadobject -unload Command

The loadobject -unload command unloads specified load objects. It is valid only in native mode.

Syntax

loadobject -unload [regexp]

where:

regexp is a regular expression. If it is not specified, the command applies to all load objects.

This command unloads the symbols for any load objects matching the regexp supplied on the command line. The main program loaded with the debug command cannot be unloaded. dbx might also refuse to unload other load objects that might be currently in use or critical to the proper functioning of dbx.

loadobject -use Command

The loadobject -use command adds load objects from dbx’s search algorithm. It is valid only in native mode.

Syntax

loadobject -use [regexp]

where:

regexp is a regular expression. If it is not specified, the command applies to all load objects.