Sun Studio 12: Debugging a Program With dbx

call Command

In native mode, the call command calls a procedure. In Java mode, the call command calls a method.

Native Mode Syntax

call procedure ([parameters]) [-lang language] [-resumeone]

where:

language is the language of the called procedure.

procedure is the name of the procedure.

parameters are the procedure’s parameters.

You can also use the call command to call a function; to see the return value use the print command (see print Command).

Occasionally the called function hits a breakpoint. You can choose to continue using the cont command (see cont Command), or abort the call by using pop -c (see pop Command). The latter is useful also if the called function causes a segmentation fault.

The -lang option specifies the language of the called procedure and tells dbx to use the calling conventions of the specified language. This option is useful when the procedure being called was compiled without debugging information and dbx does not know how to pass parameters.

The -resumeone option resumes only one thread when the procedure is called. For more information, see Resuming Execution.

Java Mode Syntax

call [class_name.|object_name.] method_name ([parameters]}

where:

class_name is the name of a Java class, using either the package path (using period (.) as a qualifier for example, test1.extra.T1.Inner) or the full path name (preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers; for example, #test1/extra/T1$Inner). Enclose class_name in quotation marks if you use the $ qualifier.

object_name is the name of a Java object.

method_name is the name of a Java method.

parameters are the method’s parameters.

Occasionally the called method hits a breakpoint. You can choose to continue using the cont command (see cont Command, or abort the call by using pop -c (see pop Command). The latter is useful also if the called method causes a segmentation fault.