From e791b833abdf63dee8195b371dbf0f084b76e512 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Jadi?= Date: Sat, 29 Jun 2013 17:49:35 +0200 Subject: [PATCH] * src/.gdbinit (xxwidget): Add convenient command to print some information about an xwidget from GDB (similar to xbuffer, xwindow, ...). (xpr): Use `xxwidget' on PVEC_XWIDGET. --- src/.gdbinit | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/.gdbinit b/src/.gdbinit index 1bfc293c466..2668772c2ed 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -992,6 +992,23 @@ document xscrollbar Print $ as a scrollbar pointer. end +define xxwidget + xgetptr $ + set $xw = (struct xwidget *) $ptr + print $xw + printf " Type: " + xprintsym $xw->type + echo \n + printf " Title: " + xgetptr $xw->title + set $title = (struct Lisp_String *) $ptr + xprintstr $title + echo \n +end +document xxwidget +Print $ assuming it is a xwidget. +end + define xpr xtype if $type == Lisp_Int0 || $type == Lisp_Int1 @@ -1061,6 +1078,9 @@ define xpr if $vec == PVEC_HASH_TABLE xhashtable end + if $vec == PVEC_XWIDGET + xxwidget + end else xvector end -- 2.39.2