Debian Codegraph @

devtools/scripts/calligra-devel-gdb

raw
1 # TODO write a print_kotextdocument that calls a print_kotextstring
2 # that uses something like printqstring does (to show the string on a single line)
3
4 # Print the contents of a KoTextString (use when debugging a core file)
5 # To reassemble the output of this function into a string, use gdb_output_to_text.pl
6 define print_kotextstring_noprocess
7 set $s = sizeof(KoTextStringChar)
8 set $str = $arg0
9 set $length = $str->data->shd->len / $s
10 set $arr = ((KoTextStringChar*)($str->data->shd->data))
11 set $i = 0
12 while $i < $length-1
13 print (char)($arr[$i++].c.ucs & 0xff)
14 end
15 end
16
17 # Print the contents of a KoTextDocument (use when debugging a core file)
18 define print_kotextdocument_noprocess
19 set $textdoc = $arg0
20 set $p = $textdoc->fParag
21 while $p != $textdoc->lParag
22 print_kotextstring_noprocess $p->str
23 print -1
24 set $p = $p->n
25 end
26 end
27