gdb/testsuite: Move helper function into lib/dwarf.exp
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 3 Apr 2020 19:41:00 +0000 (20:41 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 14 Apr 2020 11:13:06 +0000 (12:13 +0100)
commit21b0982c778bf20de6fc42e7ae7735055cdd35c5
tree134371c1283853cf730baf6a34f347c9f3a4beec
parentb1f1b4decbb40d441ad7a31f2831aee792767fa6
gdb/testsuite: Move helper function into lib/dwarf.exp

Every time I write a test making use of the DWARF assembler I end up
copying in the function get_func_info.  Duplicating code is bad, so
lets put this function into lib/dwarf.exp and remove all of the
duplicates.

There should be no changes in the testsuite behaviour after this
commit.

gdb/testsuite/ChangeLog:

* gdb.dwarf2/dw2-inline-many-frames.exp (get_func_info): Delete.
* gdb.dwarf2/dw2-inline-small-func.exp: Pass options to
get_func_info.
(get_func_info): Delete.
* gdb.dwarf2/dw2-is-stmt-2.exp (get_func_info): Delete.
* gdb.dwarf2/dw2-is-stmt.exp (get_func_info): Delete.
* lib/dwarf.exp (get_func_info): New function.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
gdb/testsuite/lib/dwarf.exp