gdb/testsuite/fortran: Add mixed language stack test
authorAndrew Burgess <andrew.burgess@embecosm.com>
Sat, 8 Feb 2020 21:26:31 +0000 (21:26 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 19 Mar 2020 11:11:51 +0000 (11:11 +0000)
commit6b8c53f2f1c0cf5bee46120d892d4c72571375eb
tree8f9b1a3c92ae0d665c3220496178401c34038870
parent19a2740f7f2ea0f65745a3c00cf8a64647378aa3
gdb/testsuite/fortran: Add mixed language stack test

This commit adds a test that builds a mixed language stack, the stack
contains frames of Fortran, C, and C++.  The test prints the backtrace
and explores the stack printing arguments of different types in frames
of different languages.

The core of the test is repeated with GDB's language set to auto,
fortran, c, and c++ in turn to ensure that GDB is happy to print
frames and frame arguments when the language is set to a value that
doesn't match the frame language.

This test currently passes, and there are no known bugs in this area.
The aim of this commit is simply to increase test coverage, as I don't
believe this functionality is currently tested.

gdb/testsuite/ChangeLog:

* gdb.fortran/mixed-lang-stack.c: New file.
* gdb.fortran/mixed-lang-stack.cpp: New file.
* gdb.fortran/mixed-lang-stack.exp: New file.
* gdb.fortran/mixed-lang-stack.f90: New file.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/mixed-lang-stack.c [new file with mode: 0644]
gdb/testsuite/gdb.fortran/mixed-lang-stack.cpp [new file with mode: 0644]
gdb/testsuite/gdb.fortran/mixed-lang-stack.exp [new file with mode: 0644]
gdb/testsuite/gdb.fortran/mixed-lang-stack.f90 [new file with mode: 0644]
This page took 0.026458 seconds and 4 git commands to generate.