aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2009-09-21 09:39:53 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2009-09-21 09:39:53 +0000
commit7a9fe1016c6b3caf22ca50926331e6baca47ef9d (patch)
treef25d218b3253d782d80f7281244b9f18332baa61 /gdb/c-lang.c
parent2e4d963fb27e10835c44564788b9c3d25bc21119 (diff)
downloadgdb-7a9fe1016c6b3caf22ca50926331e6baca47ef9d.zip
gdb-7a9fe1016c6b3caf22ca50926331e6baca47ef9d.tar.gz
gdb-7a9fe1016c6b3caf22ca50926331e6baca47ef9d.tar.bz2
2009-09-21 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. 2009-09-21 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.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r--gdb/c-lang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 4ba81ba..d01490c 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -459,7 +459,7 @@ c_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
single character in isolation. This makes the code simpler
and probably does the sensible thing in the majority of
cases. */
- while (num_chars == 1)
+ while (num_chars == 1 && things_printed < options->print_max)
{
/* Count the number of repetitions. */
unsigned int reps = 0;