Improve detection of program exit code in gdb script

This commit is contained in:
Andres Amaya Garcia 2017-11-01 10:03:36 +00:00 committed by Andres Amaya Garcia
parent 6e34e63eb3
commit 806f403a02

View File

@ -26,11 +26,6 @@ set $i = 0
set $len = sizeof(buf)
set $buf = buf
if exit_code != 0
echo The program did not terminate correctly\n
quit 1
end
while $i < $len
if $buf[$i++] != 0
echo The buffer at was not zeroized\n
@ -39,4 +34,12 @@ while $i < $len
end
echo The buffer was correctly zeroized\n
continue
if $_exitcode != 0
echo The program did not terminate correctly\n
quit 1
end
quit 0