[v7,2/3] disass: Add test for /x mode

Message ID 20200926085049.982830-3-fam@euphon.net
State New
Headers show
Series
  • disass: Add /x modifier
Related show

Commit Message

Fam Zheng Sept. 26, 2020, 8:50 a.m.
From: Fam Zheng <famzheng@amazon.com>


gdb/testsuite/ChangeLog:

2020-09-25  Fam Zheng  <famzheng@amazon.com>

	* gdb.base/disasm-optim.exp: Add test for /x.
---
 gdb/testsuite/gdb.base/disasm-optim.exp | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.25.1

Comments

Tom Tromey Nov. 12, 2020, 8:17 p.m. | #1
>>>>> ">" == fam  <fam@euphon.net> writes:


>> 2020-09-25  Fam Zheng  <famzheng@amazon.com>


>> 	* gdb.base/disasm-optim.exp: Add test for /x.


Looks good.  Normally we'd have the test suite patch in with the main
patch, but I don't think it's a huge deal.

Tom

Patch

diff --git a/gdb/testsuite/gdb.base/disasm-optim.exp b/gdb/testsuite/gdb.base/disasm-optim.exp
index 179e76ad0e..8c28fe10de 100644
--- a/gdb/testsuite/gdb.base/disasm-optim.exp
+++ b/gdb/testsuite/gdb.base/disasm-optim.exp
@@ -38,3 +38,10 @@  gdb_test_sequence "disassemble /s main" \
 	"disasm-optim\\.h:\r\n22"
 	"End of assembler dump\\."
     }
+
+gdb_test_sequence "disassemble /x main" \
+    "Disassemble main with source" {
+	"Dump of assembler code for function main:"
+	"=> 0x[0-9a-f]* \\<\\+0x0>:"
+	"End of assembler dump\\."
+    }