When using the Dejagnu DWARF compiler tests will often use the
function_range helper function to extract the extents of a function.
If the plan is to compiler the file with non-default compiler flags
then we must pass those same compiler flags through to the
function_range helper function.
This will be used in a later commit, there should be no change in the
testsuite behaviour after this commit.
gdb/testsuite/ChangeLog:
* lib/dwarf.exp (function_range): Allow compiler options to be
specified.
+2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * lib/dwarf.exp (function_range): Allow compiler options to be
+ specified.
+
2020-04-02 Tom de Vries <tdevries@suse.de>
* gdb.dwarf2/break-inline-psymtab-2.c (bar): Add
# static void func (void) {}
#
-proc function_range { func src } {
+proc function_range { func src {options {debug}} } {
global decimal gdb_prompt
set exe [standard_temp_file func_addr[pid].x]
- gdb_compile $src $exe executable {debug}
+ gdb_compile $src $exe executable $options
gdb_exit
gdb_start