aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.fortran
diff options
context:
space:
mode:
authorRichard Bunt <richard.bunt@linaro.org>2023-05-19 08:17:20 +0100
committerRichard Bunt <richard.bunt@linaro.org>2023-05-19 11:29:43 +0100
commit712872748deffff984c79b875550e46359ba053b (patch)
tree930e192e593447304b2616311306c67fcbe64256 /gdb/testsuite/gdb.fortran
parente84060b489746d031ed1ec9e7b6b39fdf4b6cfe3 (diff)
downloadfsf-binutils-gdb-712872748deffff984c79b875550e46359ba053b.zip
fsf-binutils-gdb-712872748deffff984c79b875550e46359ba053b.tar.gz
fsf-binutils-gdb-712872748deffff984c79b875550e46359ba053b.tar.bz2
gdb: Remove redundant frame switching
547ce8f00b fixed an issue where dynamic types were not being resolved correctly prior to printing a value. The same issue was discovered when printing the value using mi-mode, which was not covered by the fix. Porting the fix to the mi-mode code path resolved the issue. However, it was discovered that a later patch series, ending 2fc3b8a4cb8, independently fixed the issue in both the cli- and mi-mode code paths, making the original fix unneeded. This commit removes this extra frame switch and adds test coverage for the mi-mode scenario to protect against any future divergence in this area. GDB built with GCC 11. No test suite regressions detected. Compilers: GCC 12.1.0, ACfL 22.1, Intel 22.1; Platforms: x86_64, aarch64. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.fortran')
-rw-r--r--gdb/testsuite/gdb.fortran/mixed-lang-stack.exp12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
index 6ab3f8a..5fc36f7 100644
--- a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
+++ b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
@@ -92,6 +92,18 @@ proc run_tests { lang } {
}
}
+ # Check backtrace arguments in MI mode.
+ set mi_a "\{name=\"a\",value=\"1\"\}"
+ set mi_b "\{name=\"b\",value=\"2\"\}"
+ set mi_c "\{name=\"c\",value=\"3\"\}"
+ set mi_d "\{name=\"d\",value=\"\\(4,5\\)\"\}"
+ set mi_e "\{name=\"e\",value=\"$e_arg\"\}"
+ set mi_g "\{name=\"g\",value=\"\\( a = 1.5, b = 2.5 \\)\"\}"
+ # Hidden argument name changes depending on compiler.
+ set mi_hidden "\{name=\"\[^\r\n\]+\",value=\"6\"\}"
+ gdb_test "interpreter-exec mi '-stack-list-arguments --no-frame-filters --all-values 7 7'" \
+ "\\^done,stack-args=\\\[frame=\{level=\"7\",args=\\\[$mi_a,$mi_b,$mi_c,$mi_d,$mi_e,$mi_g,$mi_hidden\\\]\}\\\]"
+
# Check the language for frame #0.
gdb_test "info frame" "source language fortran\..*" \
"info frame in frame #0"