public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: Make use of exec_has_index_section function
@ 2019-09-13 0:50 Andrew Burgess
0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2019-09-13 0:50 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5fabdcd6801a4567db9c88ceb112ca222544b13f
commit 5fabdcd6801a4567db9c88ceb112ca222544b13f
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date: Sun Sep 1 00:21:40 2019 +0100
gdb/testsuite: Make use of exec_has_index_section function
Make use of exec_has_index_section library function rather than
manually checking in the 'maintenance info sections' output. Should
make no difference to the test results, just makes the code easier to
read.
gdb/testsuite/ChangeLog:
* gdb.base/maint.exp: Use exec_has_index_section.
Diff:
---
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.base/maint.exp | 13 +------------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2798054..395a257 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2019-09-12 Andrew Burgess <andrew.burgess@embecosm.com>
+ * gdb.base/maint.exp: Use exec_has_index_section.
+
+2019-09-12 Andrew Burgess <andrew.burgess@embecosm.com>
+
* gdb.base/maint.exp: Add test for 'maint info sections'.
2019-09-12 Tom de Vries <tdevries@suse.de>
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index a5d5dac..15988c7 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -127,18 +127,7 @@ gdb_test_multiple "maint info sections" $test {
}
# If we're using .gdb_index or .debug_names there will be no psymtabs.
-set have_gdb_index 0
-gdb_test_multiple "maint info sections .gdb_index .debug_names" "check for .gdb_index" {
- -re ": \\.gdb_index .*\r\n$gdb_prompt $" {
- set have_gdb_index 1
- }
- -re ": \\.debug_names .*\r\n$gdb_prompt $" {
- set have_gdb_index 1
- }
- -re ".*$gdb_prompt $" {
- ;# Nothing to do, present to avoid a FAIL.
- }
-}
+set have_gdb_index [ exec_has_index_section ${binfile} ]
# There also won't be any psymtabs if we read the index from the index cache.
# We can detect this by looking if the index-cache is enabled and if the number
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-13 0:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13 0:50 [binutils-gdb] gdb/testsuite: Make use of exec_has_index_section function 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).