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]

[python] PR python/10633 (some emitted strings not respecting options->print_max)


http://sourceware.org/bugzilla/show_bug.cgi?id=10633

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.

This patch was tested on x86_64 and shows not regressions.

OK?

Regards

Phil

ChangeLog

2009-09-16 Phil Muldoon<pmuldoon@redhat.com>

PR python/10633

    * c-lang.c (c_printstr): Do not loop past  options->print_max when
    iterating with wchar_iterate.

Testsuite ChangeLog

2009-09-16 Phil Muldoon<pmuldoon@redhat.com>

PR python/10633

    * 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]