This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix gdb.dwarf2/staticvirtual.exp regexp.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=06e635ef635f61c5f5c3b9ff16d4c813e3db2452

commit 06e635ef635f61c5f5c3b9ff16d4c813e3db2452
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Fri Oct 2 13:12:56 2015 -0700

    Fix gdb.dwarf2/staticvirtual.exp regexp.
    
    2015-10-02  Sandra Loosemore  <sandra@codesourcery.com>
    
    	gdb/testsuite/
    	* gdb.dwarf2/staticvirtual.exp: Generalize regexp so it can match
    	whether or not address 0x1000 is mapped on the target.

Diff:
---
 gdb/testsuite/ChangeLog                    | 5 +++++
 gdb/testsuite/gdb.dwarf2/staticvirtual.exp | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7e7e8f6..2f07793 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-02  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.dwarf2/staticvirtual.exp: Generalize regexp so it can match
+	whether or not address 0x1000 is mapped on the target.
+
 2015-09-30  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* gdb.python/py-type.exp: Do not run tests if binaries fail to
diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
index 06d46e1..dd85b7e 100644
--- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
+++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
@@ -51,4 +51,9 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \
 }
 
 # gdb/18021: The test below would cause GDB to crash.
-gdb_test "p S::~S" "0x1000"
+# Depending on whether the target maps memory at address 0x1000,
+# on success this may either print something like
+#   $1 = {void (void)} 0x1000 <.*>
+# or
+#   Cannot access memory at address 0x1000
+gdb_test "p S::~S" "0x1000.*"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]