public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: Add compiler options parameter to function_range helper
@ 2020-04-02 16:44 Andrew Burgess
0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2020-04-02 16:44 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6a35491162b64ad5402f0558c275a603abc620a4
commit 6a35491162b64ad5402f0558c275a603abc620a4
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date: Mon Mar 23 15:11:25 2020 +0000
gdb/testsuite: Add compiler options parameter to function_range helper
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.
Diff:
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/lib/dwarf.exp | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d662727ac5c..7193942ac17 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 417b22d2345..4371b56d4de 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -114,12 +114,12 @@ proc build_executable_from_fission_assembler { testname executable sources optio
# 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-02 16:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 16:44 [binutils-gdb] gdb/testsuite: Add compiler options parameter to function_range helper Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).