File: calligra-devel-gdb

package info (click to toggle)
calligra 1%3A2.9.11%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 189,332 kB
  • sloc: cpp: 919,806; xml: 27,759; ansic: 10,472; python: 8,190; perl: 2,724; yacc: 2,557; sh: 1,675; lex: 1,431; java: 1,304; sql: 903; ruby: 734; makefile: 48
file content (27 lines) | stat: -rw-r--r-- 897 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# TODO write a print_kotextdocument that calls a print_kotextstring
# that uses something like printqstring does (to show the string on a single line)

# Print the contents of a KoTextString (use when debugging a core file)
# To reassemble the output of this function into a string, use gdb_output_to_text.pl
define print_kotextstring_noprocess
    set $s = sizeof(KoTextStringChar)
    set $str = $arg0
    set $length = $str->data->shd->len / $s
    set $arr = ((KoTextStringChar*)($str->data->shd->data))
    set $i = 0
    while $i < $length-1
      print (char)($arr[$i++].c.ucs & 0xff)
    end
end

# Print the contents of a KoTextDocument (use when debugging a core file)
define print_kotextdocument_noprocess
    set $textdoc = $arg0
    set $p = $textdoc->fParag
    while $p != $textdoc->lParag
      print_kotextstring_noprocess $p->str
      print -1
      set $p = $p->n
    end
end