summaryrefslogtreecommitdiff
path: root/gdb/testsuite/configure
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2015-02-17 16:41:16 +0100
committerJose E. Marchesi <jose.marchesi@oracle.com>2015-02-17 16:41:16 +0100
commit497c491beac9bc95f62ccecbd9fbab98638fc1f2 (patch)
tree18ebf2c3b1d7cc5059ad33b70cb5397c573cd577 /gdb/testsuite/configure
parentc3e3045e5ce820055e2823e8c5b03b0e99a4b514 (diff)
downloadbinutils-gdb-497c491beac9bc95f62ccecbd9fbab98638fc1f2.tar.gz
Simple testsuite for DTrace USDT probes.
This patch adds some simple tests testing the support for DTrace USDT probes. The testsuite will be skipped as unsupported in case the user does not have DTrace installed on her system. The tests included in the test suite test breakpointing on DTrace probes, enabling and disabling probes, printing of probe arguments of several types and also breakpointing on several probes with the same name. gdb/ChangeLog: 2015-02-17 Jose E. Marchesi <jose.marchesi@oracle.com> * lib/dtrace.exp: New file. * gdb.base/dtrace-probe.exp: Likewise. * gdb.base/dtrace-probe.d: Likewise. * gdb.base/dtrace-probe.c: Likewise. * lib/pdtrace.in: Likewise. * configure.ac: Output variables with the transformed names of the strip, readelf, as and nm tools. AC_SUBST lib/pdtrace.in. * configure: Regenerated.
Diffstat (limited to 'gdb/testsuite/configure')
-rwxr-xr-xgdb/testsuite/configure51
1 files changed, 51 insertions, 0 deletions
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index ca033c31876..b593cd386a1 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -591,6 +591,10 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
+NM_TRANSFORM_NAME
+GAS_TRANSFORM_NAME
+READELF_TRANSFORM_NAME
+STRIP_TRANSFORM_NAME
EXTRA_RULES
EGREP
GREP
@@ -1272,6 +1276,11 @@ _ACEOF
cat <<\_ACEOF
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
@@ -3458,6 +3467,42 @@ if test "${build}" = "${host}" -a "${host}" = "${target}"; then
fi
+# Transform the name of some programs and generate the lib/pdtrace
+# test tool.
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
+STRIP_TRANSFORM_NAME=`echo strip | sed -e "$transform"`
+if test "x$STRIP_TRANSFORM_NAME" = x; then
+ STRIP_TRANSFORM_NAME=strip
+fi
+
+READELF_TRANSFORM_NAME=`echo readelf | sed -e "$transform"`
+if test "x$READELF_TRANSFORM_NAME" = x; then
+ READELF_TRANSFORM_NAME=readelf
+fi
+
+GAS_TRANSFORM_NAME=`echo as | sed -e "$transform"`
+if test "x$GAS_TRANSFORM_NAME" = x; then
+ GAS_TRANSFORM_NAME=as
+fi
+
+NM_TRANSFORM_NAME=`echo nm | sed -e "$transform"`
+if test "x$NM_TRANSFORM_NAME" = x; then
+ NM_TRANSFORM_NAME=nm
+fi
+
+ac_config_files="$ac_config_files lib/pdtrace"
+
+
ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
cat >confcache <<\_ACEOF
@@ -4158,6 +4203,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
+ "lib/pdtrace") CONFIG_FILES="$CONFIG_FILES lib/pdtrace" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"gdb.ada/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.ada/Makefile" ;;
"gdb.arch/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.arch/Makefile" ;;
@@ -4599,6 +4645,11 @@ which seems to be undefined. Please make sure it is defined." >&2;}
esac
+
+ case $ac_file$ac_mode in
+ "lib/pdtrace":F) chmod +x lib/pdtrace ;;
+
+ esac
done # for ac_tag