Warning, /office/calligra/devtools/scripts/calligra-devel-gdb is written in an unsupported language. File is not indexed.

0001 # TODO write a print_kotextdocument that calls a print_kotextstring
0002 # that uses something like printqstring does (to show the string on a single line)
0003 
0004 # Print the contents of a KoTextString (use when debugging a core file)
0005 # To reassemble the output of this function into a string, use gdb_output_to_text.pl
0006 define print_kotextstring_noprocess
0007     set $s = sizeof(KoTextStringChar)
0008     set $str = $arg0
0009     set $length = $str->data->shd->len / $s
0010     set $arr = ((KoTextStringChar*)($str->data->shd->data))
0011     set $i = 0
0012     while $i < $length-1
0013       print (char)($arr[$i++].c.ucs & 0xff)
0014     end
0015 end
0016 
0017 # Print the contents of a KoTextDocument (use when debugging a core file)
0018 define print_kotextdocument_noprocess
0019     set $textdoc = $arg0
0020     set $p = $textdoc->fParag
0021     while $p != $textdoc->lParag
0022       print_kotextstring_noprocess $p->str
0023       print -1
0024       set $p = $p->n
0025     end
0026 end
0027