]> granicus.if.org Git - php/commitdiff
Clamb gdb string output at 256 chars
authorNikita Popov <nikic@php.net>
Tue, 27 May 2014 15:19:12 +0000 (17:19 +0200)
committerNikita Popov <nikic@php.net>
Wed, 28 May 2014 16:22:19 +0000 (18:22 +0200)
.gdbinit

index b526c672ed23e3d9ffeb8e103efa41711750e0ce..b9913fbc8932451bd0029658984b2f22851913b5 100644 (file)
--- 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