summaryrefslogtreecommitdiff
path: root/src/.gdbinit
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-05-10 15:04:01 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-05-10 15:04:01 +0000
commit5fc2ccaa85fce4949d1ddf2b46604e90cb703b53 (patch)
tree137a1fec4b571b565f4294b5109df3d1b0650a2b /src/.gdbinit
parentccaa691f6c297164c6206bb40691848f5c24099b (diff)
parentbd014eec0fdd7d1b2b37fe06f3451dfbf635ff6e (diff)
downloademacs-5fc2ccaa85fce4949d1ddf2b46604e90cb703b53.tar.gz
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-266 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-267 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-268 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-269 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-270 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-271 Rename "field-at-point" to "field-at-pos" * emacs@sv.gnu.org/emacs--devo--0--patch-272 (comint-insert-input): Remove redundant calls to setq and goto-char git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-556
Diffstat (limited to 'src/.gdbinit')
-rw-r--r--src/.gdbinit155
1 files changed, 154 insertions, 1 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index ea9bf3f6092..54d68dc123d 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -211,6 +211,7 @@ define pitx
printf "vpos=%d hpos=%d", $it->vpos, $it->hpos,
printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y
printf " x=%d vx=%d-%d", $it->current_x, $it->first_visible_x, $it->last_visible_x
+ printf " w=%d", $it->pixel_width
printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent
printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent
printf "\n"
@@ -544,6 +545,10 @@ end
define xframe
xgetptr $
print (struct frame *) $ptr
+ xgetptr $->name
+ set $ptr = (struct Lisp_String *) $ptr
+ xprintstr $ptr
+ echo \n
end
document xframe
Print $ as a frame pointer, assuming it is an Emacs Lisp frame value.
@@ -676,6 +681,31 @@ document xcdr
Print the cdr of $, assuming it is an Emacs Lisp pair.
end
+define xlist
+ xgetptr $
+ set $cons = (struct Lisp_Cons *) $ptr
+ xgetptr Qnil
+ set $nil = $ptr
+ set $i = 0
+ while $cons != $nil && $i < 10
+ p/x $cons->car
+ xpr
+ xgetptr $cons->u.cdr
+ set $cons = (struct Lisp_Cons *) $ptr
+ set $i = $i + 1
+ printf "---\n"
+ end
+ if $cons == $nil
+ printf "nil\n"
+ else
+ printf "...\n"
+ p $ptr
+ end
+end
+document xlist
+Print $ assuming it is a list.
+end
+
define xfloat
xgetptr $
print ((struct Lisp_Float *) $ptr)->u.data
@@ -694,6 +724,108 @@ document xscrollbar
Print $ as a scrollbar pointer.
end
+define xpr
+ xtype
+ if $type == Lisp_Int
+ xint
+ end
+ if $type == Lisp_Symbol
+ xsymbol
+ end
+ if $type == Lisp_String
+ xstring
+ end
+ if $type == Lisp_Cons
+ xcons
+ end
+ if $type == Lisp_Float
+ xfloat
+ end
+ if $type == Lisp_Misc
+ set $misc = (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type)
+ if $misc == Lisp_Misc_Free
+ xmiscfree
+ end
+ if $misc == Lisp_Misc_Boolfwd
+ xboolfwd
+ end
+ if $misc == Lisp_Misc_Marker
+ xmarker
+ end
+ if $misc == Lisp_Misc_Intfwd
+ xintfwd
+ end
+ if $misc == Lisp_Misc_Boolfwd
+ xboolfwd
+ end
+ if $misc == Lisp_Misc_Objfwd
+ xobjfwd
+ end
+ if $misc == Lisp_Misc_Buffer_Objfwd
+ xbufobjfwd
+ end
+ if $misc == Lisp_Misc_Buffer_Local_Value
+ xbuflocal
+ end
+# if $misc == Lisp_Misc_Some_Buffer_Local_Value
+# xvalue
+# end
+ if $misc == Lisp_Misc_Overlay
+ xoverlay
+ end
+ if $misc == Lisp_Misc_Kboard_Objfwd
+ xkbobjfwd
+ end
+# if $misc == Lisp_Misc_Save_Value
+# xsavevalue
+# end
+ end
+ if $type == Lisp_Vectorlike
+ set $size = ((struct Lisp_Vector *) $ptr)->size
+ if ($size & PVEC_FLAG)
+ set $vec = (enum pvec_type) ($size & PVEC_TYPE_MASK)
+ if $vec == PVEC_NORMAL_VECTOR
+ xvector
+ end
+ if $vec == PVEC_PROCESS
+ xprocess
+ end
+ if $vec == PVEC_FRAME
+ xframe
+ end
+ if $vec == PVEC_COMPILED
+ xcompiled
+ end
+ if $vec == PVEC_WINDOW
+ xwindow
+ end
+ if $vec == PVEC_WINDOW_CONFIGURATION
+ xwinconfig
+ end
+ if $vec == PVEC_SUBR
+ xsubr
+ end
+ if $vec == PVEC_CHAR_TABLE
+ xchartable
+ end
+ if $vec == PVEC_BOOL_VECTOR
+ xboolvector
+ end
+ if $vec == PVEC_BUFFER
+ xbuffer
+ end
+ if $vec == PVEC_HASH_TABLE
+ xhashtable
+ end
+ else
+ xvector
+ end
+ end
+end
+document xpr
+Print $ as a lisp object of any type.
+end
+
define xprintstr
set $data = $arg0->data
output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte)
@@ -716,7 +848,7 @@ define xbacktrace
xgettype (*$bt->function)
if $type == Lisp_Symbol
xprintsym (*$bt->function)
- echo \n
+ printf " (0x%x)\n", *$bt->args
else
printf "0x%x ", *$bt->function
if $type == Lisp_Vectorlike
@@ -737,6 +869,27 @@ document xbacktrace
an error was signaled.
end
+define which
+ set debug_print (which_symbols ($arg0))
+end
+document which
+ Print symbols which references a given lisp object,
+ either as its symbol value or symbol function.
+end
+
+define xbytecode
+ set $bt = byte_stack_list
+ while $bt
+ xgettype ($bt->byte_string)
+ printf "0x%x => ", $bt->byte_string
+ which $bt->byte_string
+ set $bt = $bt->next
+ end
+end
+document xbytecode
+ Print a backtrace of the byte code stack.
+end
+
# Show Lisp backtrace after normal backtrace.
define hookpost-backtrace
set $bt = backtrace_list