This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
As shown in the bug, strings sourced from pretty printers are not respecting the current length of print_max. This is not a bug with the pretty printer code itself, but rather a missing check in c-lang.c:c_printstr.
This patch adds a check to the inner loop while iterating over wchars to ensure that print_max is observed.
* c-lang.c (c_printstr): Do not loop past options->print_max when iterating with wchar_iterate.
* gdb.python/py-prettyprint.exp (gdb_py_test_silent_cmd): New Function. (run_lang_tests): Add print elements test.
Attachment:
py_wchar_printmax-cvs.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |