From d1369de649a9d19abae1012ef805aaa674314c0c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 31 Aug 2023 13:58:49 -0600 Subject: Fix bug in -var-evaluate-expression This bug points out that if one uses -var-set-visualizer with "None" -- to disable a pretty-printer for a varobj -- then -var-evaluate-expression will still use pretty-printing. This is a combination of bugs. First, setting the visualizer does not update the display text; and second, computing the display text should use "raw" when Python is available but no visualizer is desired. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=11738 Reviewed-by: Keith Seitz --- gdb/testsuite/gdb.python/py-varobj.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/testsuite/gdb.python/py-varobj.c') diff --git a/gdb/testsuite/gdb.python/py-varobj.c b/gdb/testsuite/gdb.python/py-varobj.c index 894ce8f..88d0e74 100644 --- a/gdb/testsuite/gdb.python/py-varobj.c +++ b/gdb/testsuite/gdb.python/py-varobj.c @@ -21,6 +21,8 @@ struct test { struct test tval = {23}; +struct test *test_ptr = &tval; + int main () { return 0; } -- cgit v1.1