versions of the executable under test.
* gdb.python/py-prettyprint.exp: Likewise.
* gdb.python/py-symbol.exp: Likewise.
* gdb.python/py-template.exp: Likewise.
* gdb.python/py-type.exp: Likewise.
* gdb.python/py-value.exp: Likewise.
+2011-07-22 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * gdb.python/py-mi.exp: Use different file names for different
+ versions of the executable under test.
+ * gdb.python/py-prettyprint.exp: Likewise.
+ * gdb.python/py-symbol.exp: Likewise.
+ * gdb.python/py-template.exp: Likewise.
+ * gdb.python/py-type.exp: Likewise.
+ * gdb.python/py-value.exp: Likewise.
+
2011-07-22 Ulrich Weigand <ulrich.weigand@linaro.org>
* gdb.python/py-breakpoint.exp: Re-set can-use-hw-watchpoints
# C++ MI tests
gdb_exit
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-c++" \
executable {debug c++ additional_flags=-DMI}] != "" } {
untested "Couldn't compile ${srcfile} in c++ mode"
return -1
}
mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+mi_gdb_load ${binfile}-c++
if {[lsearch -exact [mi_get_features] python] < 0} {
unsupported "python support is disabled"
proc run_lang_tests {lang} {
global srcdir subdir srcfile binfile testfile hex
- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug $lang"] != "" } {
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-${lang}" executable "debug $lang"] != "" } {
untested "Couldn't compile ${srcfile} in $lang mode"
return -1
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load ${binfile}
+ gdb_load ${binfile}-${lang}
if ![runto_main ] then {
perror "couldn't run to breakpoint"
# C++ tests
# Recompile binary.
- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug c++"] != "" } {
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-c++" executable "debug c++"] != "" } {
untested "Couldn't compile ${srcfile} in c++ mode"
return -1
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+gdb_load ${binfile}-c++
if ![runto_main] then {
fail "Can't run to main"
# Skip all tests if Python scripting is not enabled.
if { [skip_python_tests] } { continue }
-proc test_template_arg {type} {
+proc test_template_arg {name type} {
global testfile srcdir subdir srcfile binfile
- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-${name}" \
executable \
[list debug c++ additional_flags="-DTYPE=$type"]] != "" } {
untested $type
return -1
}
- gdb_load ${binfile}
+ gdb_load ${binfile}-${name}
if ![runto_main ] then {
perror "couldn't run to breakpoint"
return
gdb_test "python print foo.type.template_argument(0)" $t $type
}
-test_template_arg "const int"
-test_template_arg "volatile int"
-test_template_arg "const int &"
-test_template_arg "volatile int &"
-test_template_arg "volatile int * const"
-test_template_arg "volatile int * const *"
-test_template_arg "const int * volatile"
-test_template_arg "const int * volatile * const * volatile *"
+test_template_arg "ci" "const int"
+test_template_arg "vi" "volatile int"
+test_template_arg "cir" "const int &"
+test_template_arg "vir" "volatile int &"
+test_template_arg "vipc" "volatile int * const"
+test_template_arg "vipcp" "volatile int * const *"
+test_template_arg "cipv" "const int * volatile"
+test_template_arg "cipvpcpvp" "const int * volatile * const * volatile *"
proc build_inferior {lang} {
global srcdir subdir srcfile binfile testfile hex
- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug $lang"] != "" } {
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-${lang}" executable "debug $lang"] != "" } {
untested "Couldn't compile ${srcfile} in $lang mode"
return -1
}
}
# Restart GDB.
-proc restart_gdb {} {
+proc restart_gdb {lang} {
global srcdir subdir srcfile binfile testfile hex
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load ${binfile}
+ gdb_load ${binfile}-${lang}
if ![runto_main ] then {
perror "couldn't run to breakpoint"
# Perform C Tests.
build_inferior "c"
-restart_gdb
+restart_gdb "c"
# Skip all tests if Python scripting is not enabled.
if { [skip_python_tests] } { continue }
# Perform C++ Tests.
build_inferior "c++"
-restart_gdb
+restart_gdb "c++"
runto_bp "break to inspect struct and array."
test_fields "c++"
test_base_class
proc test_subscript_regression {lang} {
global srcdir subdir srcfile binfile testfile hex
- if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug $lang"] != "" } {
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-${lang}" executable "debug $lang"] != "" } {
untested "Couldn't compile ${srcfile} in $lang mode"
return -1
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load ${binfile}
+ gdb_load ${binfile}-${lang}
if ![runto_main ] then {
perror "couldn't run to breakpoint"