From f2d17929c032109f86933e6d677732084893f9bd Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Tue, 24 Oct 2017 22:47:14 +0100 Subject: [PATCH] Document test_zeroize.gdb script --- tests/scripts/test_zeroize.gdb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/scripts/test_zeroize.gdb b/tests/scripts/test_zeroize.gdb index 52b7cda7f8..15b8b09b33 100644 --- a/tests/scripts/test_zeroize.gdb +++ b/tests/scripts/test_zeroize.gdb @@ -1,3 +1,20 @@ +# test_zeroize.gdb +# +# This file is part of mbed TLS (https://tls.mbed.org) +# +# Copyright (c) 2017, ARM Limited, All Rights Reserved +# +# Purpose +# +# Run a test using the debugger to check that the mbedtls_zeroize() function in +# utils.h is not being optimized out by the compiler. To do so, the script +# loads the test program at programs/test/zeroize.c and sets a breakpoint at +# the last return statement in the main(). When the breakpoint is hit, the +# debugger manually checks the contents to be zeroized and checks that it is +# actually cleared. +# +# Note: This test requires that the test program is compiled with -g3. + set confirm off file ./programs/test/zeroize break zeroize.c:90