+# NOTE: carlton/2003-01-16: hairyfunc5-6 fail on GCC 3.x (for at least
+# x=1 and x=2.1). So I'm modifying print_addr_2 to accept a failure
+# condition. FIXME: It would be nice if the failure condition were
+# conditional on the compiler version, but I'm not sufficiently
+# motivated. I did hardwire in the versions of char * and int *,
+# which will give some compiler-specificity to the failure.
+
+proc print_addr_2_kfail { name good bad bugid } {
+ global gdb_prompt
+ global hex
+
+ set good_pattern [string_to_regexp $good]
+ set bad_pattern [string_to_regexp $bad]
+
+ send_gdb "print &'$name'\n"
+ gdb_expect {
+ -re ".* = .* $hex <$good_pattern>\r\n$gdb_prompt $" {
+ pass "print &'$name'"
+ }
+ -re ".* = .* $hex <$bad_pattern>\r\n$gdb_prompt $" {
+ kfail $bugid "print &'$name'"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "print &'$name'"
+ }
+ timeout {
+ fail "print &'$name' (timeout)"
+ }
+ }
+}
+