diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2023-05-08 01:03:42 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2023-05-13 18:10:05 +0000 |
commit | d2b585f3cfc253678bf33b552a219e25eb29e686 (patch) | |
tree | d2dee89582caa642cbc98422ed25483e3acf64dd /gdb/testsuite/gdb.python | |
parent | 249d1bad51b568c74ea37e8b3e76c179eb53a733 (diff) | |
download | binutils-d2b585f3cfc253678bf33b552a219e25eb29e686.zip binutils-d2b585f3cfc253678bf33b552a219e25eb29e686.tar.gz binutils-d2b585f3cfc253678bf33b552a219e25eb29e686.tar.bz2 |
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 <keiths@redhat.com>
Diffstat (limited to 'gdb/testsuite/gdb.python')
-rw-r--r-- | gdb/testsuite/gdb.python/py-format-string.exp | 2 |
1 files changed, 1 insertions, 1 deletions
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 # <https://sourceware.org/bugzilla/show_bug.cgi?id=24331>. 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"} { |