Sun Studio 12 Update 1: Debugging a Program With dbx

Evaluating Unnamed Arguments in C++ Programs

C++ lets you define functions with unnamed arguments. For example:

void tester(int)
main(int, char **)

Though you cannot use unnamed arguments elsewhere in a program, the compiler encodes unnamed arguments in a form that lets you evaluate them. The form is as follows, where the compiler assigns an integer to %n:


To obtain the name assigned by the compiler, type the whatis command with the function name as its target.

(dbx) whatis tester
void tester(int _ARG1);
(dbx) whatis main
int main(int _ARG1, char **_ARG2);

For more information, see whatis Command.

To evaluate (or display) an unnamed function argument, type:

(dbx) print _ARG1
_ARG1 = 4