From a6d33eb654e7b20853c202467f60de124e381245 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 27 May 2014 17:19:12 +0200 Subject: [PATCH] Clamb gdb string output at 256 chars --- .gdbinit | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gdbinit b/.gdbinit index b526c672ed..b9913fbc89 100644 --- a/.gdbinit +++ b/.gdbinit @@ -531,7 +531,7 @@ define ____print_str set $tmp = 0 set $str = $arg0 printf "\"" - while $tmp < $arg1 + while $tmp < $arg1 && $tmp < 256 if $str[$tmp] > 32 && $str[$tmp] < 127 printf "%c", $str[$tmp] else @@ -539,6 +539,9 @@ define ____print_str end set $tmp = $tmp + 1 end + if $tmp != $arg1 + printf "..." + end printf "\"" end -- 2.50.1