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

Exit Print View

Updated: June 2016
 
 

lwp Command

The lwp command lists or changes the current LWP (lightweight process). It is valid only in native mode.


Note -  The lwp command is available only on Oracle Solaris platforms.

Syntax

lwp

Display current LWP.

lwp lwp-ID

Switch to LWP lwp-ID.

lwp –info

Displays the name, home, and masked signals of the current LWP.

lwp [lwp-ID] –setfp address-expression

Tells dbx that the fp register has the value address-expression. The state of the program being debugged is not changed. A frame pointer set with the –setfp option is reset to its original value upon resuming execution.

lwp [lwp-ID] –resetfp

Sets the frame pointer logical value from the register value in the current process or core file, undoing the effect of a previous lwp –setfp command.

where:

lwp-ID is the identifier of a lightweight process.

If the command is used with both an LWP ID and an option, the corresponding action is applied to LWP specified by the lwp-ID, but the current LWP is not changed.

The –setfp and –resetfp options are useful when the frame pointer (fp) of the LWP is corrupted. In this event, dbx cannot reconstruct the call stack properly and evaluate local variables. These options work when debugging a core file, where assign $fp=... is unavailable.

To make changes to the fp register visible to the application being debugged, use the assign $fp=address-expression command.