~ubuntu-branches/debian/sid/kexi/sid

« back to all changes in this revision

Viewing changes to devtools/scripts/calligra-devel-gdb

  • Committer: Package Import Robot
  • Author(s): Pino Toscano
  • Date: 2017-06-24 20:10:10 UTC
  • Revision ID: package-import@ubuntu.com-20170624201010-5lrzd5r2vwthwifp
Tags: upstream-3.0.1.1
ImportĀ upstreamĀ versionĀ 3.0.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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