[ohm] ohm: Branch 'master'
Rob Taylor
robtaylor at kemper.freedesktop.org
Fri Aug 3 08:31:50 PDT 2007
ohmd/efence.gdb | 3 +++
ohmd/run-ohm.sh | 8 ++++++++
ohmd/underfence.gdb | 3 +++
3 files changed, 14 insertions(+)
New commits:
diff-tree 78a699b7aacccb9cea9316f9b79315499af83ff0 (from 774e77bfcc06218ce423cb16bdd9b9e3fe11cc7b)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date: Fri Aug 3 16:34:21 2007 +0100
add --efence and --underfence options to run-ohm.sh
Adds options to run ohmd with electric-fence, checking both underruns and overruns.
diff --git a/ohmd/efence.gdb b/ohmd/efence.gdb
new file mode 100644
index 0000000..dd2d76c
--- /dev/null
+++ b/ohmd/efence.gdb
@@ -0,0 +1,3 @@
+set environment EF_PROTECT_BELOW 0
+set environment LD_PRELOAD /usr/lib/libefence.so.0.0
+echo Enabled Electric Fence\n
diff --git a/ohmd/run-ohm.sh b/ohmd/run-ohm.sh
index f36b33b..88d2e85 100755
--- a/ohmd/run-ohm.sh
+++ b/ohmd/run-ohm.sh
@@ -13,6 +13,8 @@ if [ "$1" = "--help" ]; then
echo " --debug: Run with gdb"
echo " --memcheck: Run with valgrind memcheck tool"
echo " --massif: Run with valgrind massif heap-profiling tool"
+ echo " --efence: Run with electric-fence chedking for overruns"
+ echo " --underfence: Run with electric-fence checking for underruns"
echo
./ohmd --help
exit 0
@@ -34,6 +36,12 @@ elif [ "$1" = "--memcheck" ] ; then
elif [ "$1" = "--massif" ] ; then
shift
prefix="valgrind --tool=massif"
+elif [ "$1" = "--efence" ] ; then
+ shift
+ prefix="gdb -x ./efence.gdb --args"
+elif [ "$1" = "--underfence" ] ; then
+ shift
+ prefix="gdb -x ./underfence.gdb --args"
fi
export OHM_CONF_DIR=$OHM_TMPDIR/etc/ohm
diff --git a/ohmd/underfence.gdb b/ohmd/underfence.gdb
new file mode 100644
index 0000000..b74c9a6
--- /dev/null
+++ b/ohmd/underfence.gdb
@@ -0,0 +1,3 @@
+set environment EF_PROTECT_BELOW 1
+set environment LD_PRELOAD /usr/lib/libefence.so.0.0
+echo Enabled Electric Fence for undeflow detection\n
More information about the Ohm-devel
mailing list