Sun Studio 12 Update 1: Debugging a Program With dbx

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. debugging a core file, where assign $fp=... is unavailable. 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, 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.