]> code.delx.au - gnu-emacs/blobdiff - src/.gdbinit
(get_next_display_element): Display codes 8a0 and 8ad
[gnu-emacs] / src / .gdbinit
index 3660155f62de000a7c169b333ff38d05b00a9ae3..6adb9f3fa02d1be09600dc52327f07dfa45651bb 100644 (file)
@@ -60,6 +60,44 @@ Print the emacs s-expression which is $.
 Works only when an inferior emacs is executing.
 end
 
+# Print out s-expressions
+define pp
+  set $tmp = $arg0
+  set debug_print ($tmp)
+end
+document pp
+Print the argument as an emacs s-expression
+Works only when an inferior emacs is executing.
+end
+
+# Print out current buffer point and boundaries
+define ppt
+  set $b = current_buffer
+  set $t = $b->text
+  printf "BUF PT: %d", $b->pt
+  if ($b->pt != $b->pt_byte)
+    printf "[%d]", $b->pt_byte
+  end
+  printf " of 1..%d", $t->z
+  if ($t->z != $t->z_byte)
+    printf "[%d]", $t->z_byte
+  end
+  if ($b->begv != 1 || $b->zv != $t->z)
+    printf " NARROW=%d..%d", $b->begv, $b->zv
+    if ($b->begv != $b->begv_byte || $b->zv != $b->zv_byte)
+      printf " [%d..%d]", $b->begv_byte, $b->zv_byte
+    end
+  end
+  printf " GAP: %d", $t->gpt
+  if ($t->gpt != $t->gpt_byte)
+    printf "[%d]", $t->gpt_byte
+  end
+  printf " SZ=%d\n", $t->gap_size
+end
+document ppt
+Print point, beg, end, narrow, and gap for current buffer.
+end
+
 define xtype
   xgettype $
   output $type
@@ -186,9 +224,10 @@ Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value
 end
 
 define xsymbol
-  xgetptr $
+  set $sym = $
+  xgetptr $sym
   print (struct Lisp_Symbol *) $ptr
-  xprintsym $
+  xprintsym $sym
   echo \n
 end
 document xsymbol
@@ -428,6 +467,16 @@ document xreload
 end
 xreload
 
+# Flush display (X only)
+define ff
+  set x_flush (0)
+end
+document ff
+Flush pending X window display updates to screen.
+Works only when an inferior emacs is executing.
+end
+
+
 define hook-run
   xreload
 end