Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [5/5] fix test suite for MI output
@ 2012-05-14 20:01 Tom Tromey
  2012-05-15 17:14 ` Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2012-05-14 20:01 UTC (permalink / raw)
  To: gdb-patches

This is the final patch in the series.

Regression testing pointed out that the new setting changed MI varobj
output.

I'm not sure whether this is reasonable to do or not, so I pulled this
patch out separately.

It is not too hard to fix varobj to disable this new setting, if that is
preferable for some reason.

 gdb/testsuite/gdb.mi/mi-var-cmd.exp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index f3ee77a..cadff9f 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -377,11 +377,11 @@ mi_gdb_test "-var-update *" \
 	"assign same value to func (update)"
 
 mi_gdb_test "-var-create array_ptr * array_ptr" \
-	"\\^done,name=\"array_ptr\",numchild=\"1\",value=\"$hex\",type=\"int \\*\",has_more=\"0\"" \
+	"\\^done,name=\"array_ptr\",numchild=\"1\",value=\"$hex <array>\",type=\"int \\*\",has_more=\"0\"" \
 	"create global variable array_ptr"
 
 mi_gdb_test "-var-assign array_ptr array2" \
-	"\\^done,value=\"$hex\"" \
+	"\\^done,value=\"$hex <array2>\"" \
 	"assign array to pointer"
 
 mi_gdb_test "-var-update *" \
@@ -389,7 +389,7 @@ mi_gdb_test "-var-update *" \
 	"assign array to pointer (update)"
 
 mi_gdb_test "-var-assign array_ptr array2" \
-	"\\^done,value=\"$hex\"" \
+	"\\^done,value=\"$hex <array2>\"" \
 	"assign same array to pointer"
 
 mi_gdb_test "-var-update *" \
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [5/5] fix test suite for MI output
  2012-05-14 20:01 [5/5] fix test suite for MI output Tom Tromey
@ 2012-05-15 17:14 ` Keith Seitz
  2012-05-15 17:27   ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2012-05-15 17:14 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On 05/14/2012 01:01 PM, Tom Tromey wrote:
> I'm not sure whether this is reasonable to do or not, so I pulled this
> patch out separately.

Preface: I'm not an MI user, but I do use varobj. This isn't a protest 
or other demand for action, but I felt compelled to add my $2E-10, in 
hopes of coaxing other users to offer an opinion.

> It is not too hard to fix varobj to disable this new setting, if that is
> preferable for some reason.

I really don't like this. UIs will now display arrays (what about other 
aggregate types like struct pointers?) this way, and in the context of 
varobj, it provides no additional information that the UI isn't already 
providing users:

   + my_array  (int [10])  0x12345678 <my_array>

Keith


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [5/5] fix test suite for MI output
  2012-05-15 17:14 ` Keith Seitz
@ 2012-05-15 17:27   ` Tom Tromey
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2012-05-15 17:27 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Tom> It is not too hard to fix varobj to disable this new setting, if that is
Tom> preferable for some reason.

Keith> I really don't like this. UIs will now display arrays (what about
Keith> other aggregate types like struct pointers?) this way, and in the
Keith> context of varobj, it provides no additional information that the UI
Keith> isn't already providing users:

Keith>   + my_array  (int [10])  0x12345678 <my_array>

Yeah, that happens for the CLI too.
Phony output:

(gdb) print my_array
$1 = <my_array> {1, 2, 3}

The place where it is an improvement is printing things that aren't
obviously globals.  E.g., in gdb, printing an object that has a virtual
table, like objfile's struct sym_fns, will now nicely show the
definition.

My concern is more along the lines of whether this is going to mess up
the clients.

Tom


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-15 17:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-14 20:01 [5/5] fix test suite for MI output Tom Tromey
2012-05-15 17:14 ` Keith Seitz
2012-05-15 17:27   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox