From: Luis Machado <lgustavo@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH 2/3] Add varobj zhexadecimal format tests.
Date: Fri, 01 May 2015 14:33:00 -0000 [thread overview]
Message-ID: <1430490758-23247-3-git-send-email-lgustavo@codesourcery.com> (raw)
In-Reply-To: <1430490758-23247-1-git-send-email-lgustavo@codesourcery.com>
This patch adds a few tests to exercise the new zhexadecimal format for
varobj's. I see 5 FAIL's without the zhexadecimal format support and full
passes with a zhexadecimal format support.
I renamed some of the tests to make them unique.
gdb/testsuite/ChangeLog:
2015-05-01 Luis Machado <lgustavo@codesourcery.com>
* gdb.mi/mi-var-display.exp: Add new checks for the zhexadecimal format
and change test names to make them unique.
---
gdb/testsuite/gdb.mi/mi-var-display.exp | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp
index 31bdce4..6aedb53 100644
--- a/gdb/testsuite/gdb.mi/mi-var-display.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-display.exp
@@ -81,6 +81,11 @@ mi_gdb_test "-var-evaluate-expression bar" \
"eval variable bar"
# Test: c_variable-6.5
+# Desc: change format of bar to zero-padded hexadecimal
+mi_gdb_test "-var-set-format bar zhexadecimal" \
+ "\\^done,format=\"zhexadecimal\",value=\"0x0.*849\"" \
+ "set format variable bar in zero-padded hexadecimal"
+
# Desc: change format of bar to hex
mi_gdb_test "-var-set-format bar hexadecimal" \
"\\^done,format=\"hexadecimal\",value=\"0x849\"" \
@@ -241,7 +246,7 @@ mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
mi_gdb_test "-var-show-format weird.func_ptr" \
"\\^done,format=\"hexadecimal\"" \
- "show format variable weird.func_ptr"
+ "show format variable weird.func_ptr (hex)"
mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \
"\\^done,format=\"hexadecimal\",value=\"$hex\"" \
@@ -249,7 +254,23 @@ mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \
mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
"\\^done,format=\"hexadecimal\"" \
- "show format variable weird.func_ptr_ptr"
+ "show format variable weird.func_ptr_ptr (hex)"
+
+mi_gdb_test "-var-set-format weird.func_ptr zhexadecimal" \
+ "\\^done,format=\"zhexadecimal\",value=\"$hex\"" \
+ "set format variable weird.func_ptr in zero-padded hex"
+
+mi_gdb_test "-var-show-format weird.func_ptr" \
+ "\\^done,format=\"zhexadecimal\"" \
+ "show format variable weird.func_ptr (zhex)"
+
+mi_gdb_test "-var-set-format weird.func_ptr_ptr zhexadecimal" \
+ "\\^done,format=\"zhexadecimal\",value=\"$hex\"" \
+ "set format variable weird.func_ptr_ptr in zero-padded hex"
+
+mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
+ "\\^done,format=\"zhexadecimal\"" \
+ "show format variable weird.func_ptr_ptr (zhex)"
# Test: c_variable-6.24
# Desc: format of weird and children
--
1.9.1
next prev parent reply other threads:[~2015-05-01 14:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 14:32 [PATCH 0/3] varobj zero-padded hexadecimal format Luis Machado
2015-05-01 14:32 ` [PATCH 1/3] Add zero-padded hexadecimal format support for varobj's Luis Machado
2015-05-01 14:33 ` Luis Machado [this message]
2015-05-01 14:33 ` [PATCH 3/3] Documentation changes for the new zhexadecimal format Luis Machado
2015-05-01 15:07 ` Eli Zaretskii
2015-05-01 18:58 ` Luis Machado
2015-05-06 13:56 ` Luis Machado
2015-05-06 14:01 ` Luis Machado
2015-05-06 15:36 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430490758-23247-3-git-send-email-lgustavo@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox