I'm debuging with gdb and need to define some helper commands. Basically I want my customized command to operate differently depending on the number of args given.
So I have to test whether $arg*
is given, see the code below:
define pgdir
set $pgdir = $arg0
if ($arg1) {
// show the corresponding PDE
} else {
// show the whole page directory
}
end
Is it possible to test whether a variable is void?