set testfile "macscp"
set binfile ${objdir}/${subdir}/${testfile}
-if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${binfile}" executable {debug}] != "" } {
+set options { debug }
+
+get_compiler_info ${binfile}
+if [test_compiler_info gcc*] {
+ lappend options additional_flags=-g3
+}
+
+if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${binfile}" executable $options] != "" } {
untested macscp.exp
return -1
}
pass "info macro WHERE after `list macscp_4_2_from_macscp2'"
}
{macscp4.h macscp3.h macscp1.c {before macscp4_2_..., from macscp3.h}} {
- # setup_kfail "gdb/555"
+ setup_kfail *-*-* "gdb/555"
fail "info macro WHERE after `list macscp_4_2_from_macscp2' (gdb/555)"
}
timeout {
pass "info macro WHERE after `list macscp_4_2_from_macscp3'"
}
{macscp4.h macscp2.h macscp1.c {before macscp4_2_..., from macscp2.h}} {
- # setup_kfail "gdb/555"
+ setup_kfail *-*-* "gdb/555"
fail "info macro WHERE after `list macscp_4_2_from_macscp3' (gdb/555)"
}
timeout {
}
}
+proc maybe_kfail { func test_name } {
+ # We can't get the right scope info when we're stopped in
+ # the macro4_ functions.
+ if {[string match macscp4_* $func]} {
+ kfail gdb/555 "$test_name"
+ } else {
+ fail "$test_name"
+ }
+}
# Start the program running.
if {! [runto_main]} {
if {[string compare $result $expected] == 0} {
pass "info macro WHERE stopped in $func"
} elseif {[string compare $result $kfail_expected] == 0} {
- # setup_kfail "gdb/555"
+ setup_kfail *-*-* "gdb/555"
fail "info macro WHERE stopped in $func (gdb/555)"
} elseif {[string compare $result timeout] == 0} {
fail "info macro WHERE stopped in $func (timeout)"
"$before_macro defined/undefined when stopped at $func"
set result [info_macro $before_macro]
- # We can't get the right scope info when we're stopped in
- # the macro4_ functions.
- if {[string match macscp4_* $func]} {
- # setup_kfail "gdb/555"
- set test_name "$test_name (gdb/555)"
- }
if {$j < $i} {
if {[llength $result] >= 2 && \
[string compare [lindex $result end] {}] == 0} {
} elseif {[string compare $result timeout] == 0} {
fail "$test_name (timeout)"
} else {
- fail "$test_name"
+ maybe_kfail $func "$test_name"
}
} elseif {$j > $i} {
switch -- [lindex $result end] {
undefined { pass $test_name }
timeout { fail "$test_name (timeout)" }
default {
- fail "$test_name"
+ maybe_kfail $func "$test_name"
}
}
}
"$until_macro defined/undefined when stopped at $func"
set result [info_macro $until_macro]
- # We can't get the right scope info when we're stopped in
- # the macro4_ functions.
- if {[string match macscp4_* $func]} {
- # setup_kfail "gdb/555"
- set test_name "$test_name (gdb/555)"
- }
if {$j <= $i} {
switch -- [lindex $result end] {
undefined { pass $test_name }
timeout { fail "$test_name (timeout)" }
default {
- fail "$test_name"
+ maybe_kfail $func "$test_name"
}
}
} elseif {$j > $i} {
} elseif {[string compare $result timeout] == 0} {
fail "$test_name (timeout)"
} else {
- fail "$test_name"
+ maybe_kfail $func "$test_name"
}
}
}