variable-definition

Testing if a gdb convenience variable is defined

Is there a way to test if a convenience variable has been set in gdb? For example: (gdb) if $_exitcode == 0 >quit >end Invalid type combination in equality test. (gdb) p $_exitcode $1 = void $_exitcode is void because it is not set until the program terminates. The closest available construct is init-if-undefined, but this would r...