diff options
author | Tom Tromey <tromey@adacore.com> | 2022-05-26 08:33:05 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-03-28 12:17:58 -0600 |
commit | 3e8154778baf4df222d95e43a2c8fefdb17305f7 (patch) | |
tree | 71ece63375006caf9d3b5bc9aa81666125c1be06 /gdb/testsuite/lib | |
parent | 7cd38c3c566502906ba3a6c214cc30cc5aadbda4 (diff) | |
download | binutils-3e8154778baf4df222d95e43a2c8fefdb17305f7.zip binutils-3e8154778baf4df222d95e43a2c8fefdb17305f7.tar.gz binutils-3e8154778baf4df222d95e43a2c8fefdb17305f7.tar.bz2 |
Put pretty-printers to_string output in varobj result
PR mi/11335 points out that an MI varobj will not display the result
of a pretty-printer's "to_string" method. Instead, it always shows
"{...}".
This does not seem very useful, and there have been multiple
complaints about it over the years. This patch changes varobj to emit
this string when possible, and updates the test suite.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=11335
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index c738b7b..c914ed4 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1426,11 +1426,11 @@ proc mi_create_varobj_checked { name expression type testname } { } # Same as mi_create_floating_varobj, but assumes the test is creating -# a dynamic varobj that has children, so the value must be "{...}". -# The "has_more" attribute is checked. -proc mi_create_dynamic_varobj {name expression has_more testname} { +# a dynamic varobj that has children. The "value" and "has_more" +# attributes are checked. +proc mi_create_dynamic_varobj {name expression value has_more testname} { mi_gdb_test "-var-create $name @ $expression" \ - "\\^done,name=\"$name\",numchild=\"0\",value=\"{\\.\\.\\.}\",type=.*,has_more=\"${has_more}\"" \ + "\\^done,name=\"$name\",numchild=\"0\",value=\"$value\",type=.*,has_more=\"${has_more}\"" \ $testname } |