summaryrefslogtreecommitdiffstats
path: root/kjs/kjs-devel-gdb
diff options
context:
space:
mode:
Diffstat (limited to 'kjs/kjs-devel-gdb')
-rw-r--r--kjs/kjs-devel-gdb22
1 files changed, 22 insertions, 0 deletions
diff --git a/kjs/kjs-devel-gdb b/kjs/kjs-devel-gdb
new file mode 100644
index 000000000..41725379f
--- /dev/null
+++ b/kjs/kjs-devel-gdb
@@ -0,0 +1,22 @@
+# This file defines handy gdb macros
+# To use it, add this line to your ~/.gdbinit :
+# source /path/to/kde/sources/kdelibs/kjs/kjs-devel-gdb
+
+define printucharstar
+ set $i=0
+ while ($i<($arg1))
+ p (char)(($arg0)[$i++])
+ end
+end
+document printucharstar
+ Prints the contents of an UChar [] - for KJS.
+ Usage: 'printucharstar <UChar* dat> <int len>'
+end
+
+define printustring
+ printucharstar ($arg0).rep->dat ($arg0).rep->len
+end
+document printustring
+ Prints the contents of an UString - for KJS
+ Usage: 'printustring <UString str>'
+end