+2021-02-05 Tom de Vries <tdevries@suse.de>
+
+ * gdb.dwarf2/main-subprogram.exp: Add KFAIL for PR symtab/24549.
+ * gdb.fortran/mixed-lang-stack.exp: Same.
+
2021-02-05 Tom de Vries <tdevries@suse.de>
PR exp/27265
return -1
}
+set have_index [exec_has_index_section $binfile]
+
# Test that the "start" command stops in the "mymain" function.
# This should happen because we used DW_AT_main_subprogram to tell gdb
# that this was the real "main".
return -1
}
-gdb_test "" "Temporary breakpoint .* mymain.*" "stopped at mymain"
+gdb_test_multiple "" "stopped at mymain" {
+ -re -wrap "Temporary breakpoint .* mymain.*" {
+ pass $gdb_test_name
+ }
+ -re -wrap "Temporary breakpoint .* main.*" {
+ if { $have_index } {
+ setup_kfail "gdb/24549" *-*-*
+ }
+ fail $gdb_test_name
+ }
+}
return -1
}
+set have_index [exec_has_index_section $binfile]
+
# Runs the test program and examins the stack. LANG is a string, the
# value to pass to GDB's 'set language ...' command.
proc run_tests { lang } {
with_test_prefix "lang=${lang}" {
- global binfile hex
+ global binfile hex have_index
clean_restart ${binfile}
"#7\\s+$hex in mixed_func_1b \\($1b_args\\) at \[^\r\n\]+" \
"#8\\s+$hex in mixed_func_1a \\(\\) at \[^\r\n\]+" \
"#9\\s+$hex in mixed_stack_main \\(\\) at \[^\r\n\]+" ]
- gdb_test "bt -frame-arguments all" $bt_stack
+ set main_args "argc=1, argv=${hex}( \[^\r\n\]+)?"
+ set bt_stack_kfail \
+ [multi_line \
+ $bt_stack \
+ "#10\\s+$hex in main \\($main_args\\) at \[^\r\n\]+"]
+ gdb_test_multiple "bt -frame-arguments all" "" {
+ -re -wrap $bt_stack {
+ pass $gdb_test_name
+ }
+ -re -wrap $bt_stack_kfail {
+ if { $have_index } {
+ setup_kfail "gdb/24549" *-*-*
+ }
+ fail $gdb_test_name
+ }
+ }
# Check the language for frame #0.
gdb_test "info frame" "source language fortran\..*" \