Debugging a Program With dbx

For Event exit

$exitcode

Value of the argument passed to _exit(2) or exit(3) or the return value of main