From d2b585f3cfc253678bf33b552a219e25eb29e686 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Mon, 8 May 2023 01:03:42 +0000 Subject: Fix bad interaction between element limit and repeated values (BZ#24331). Currently print -elements=3 -- "AAAAAA" prints complete string, which is not what the user asked for. Fix two buggy tests exposed by the fix, and add a new test. Reviewed-by: Keith Seitz --- gdb/testsuite/gdb.python/py-format-string.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/testsuite/gdb.python') diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp index 1d50f59..2a011eb 100644 --- a/gdb/testsuite/gdb.python/py-format-string.exp +++ b/gdb/testsuite/gdb.python/py-format-string.exp @@ -748,7 +748,7 @@ proc test_max_string_one { setting unlimited } { # This will print four characters instead of three, see # . check_format_string "a_binary_string_array" $opts \ - "\"hell\"..." + "\"hel\"..." check_format_string "a_big_string" $opts \ [get_cut_big_string 3] if { $setting == "elements"} { -- cgit v1.1