diff options
| author | Grégoire Jadi | 2013-06-29 17:49:35 +0200 |
|---|---|---|
| committer | Grégoire Jadi | 2013-06-29 17:49:35 +0200 |
| commit | e791b833abdf63dee8195b371dbf0f084b76e512 (patch) | |
| tree | 7b8d7386aea6043cb6058a6d69c9606f765e1566 | |
| parent | da95bc007d161d6d901b7600120a97fd2f54ce4b (diff) | |
| download | emacs-e791b833abdf63dee8195b371dbf0f084b76e512.tar.gz emacs-e791b833abdf63dee8195b371dbf0f084b76e512.zip | |
* 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.
| -rw-r--r-- | src/.gdbinit | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 1bfc293c466..2668772c2ed 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -992,6 +992,23 @@ document xscrollbar | |||
| 992 | Print $ as a scrollbar pointer. | 992 | Print $ as a scrollbar pointer. |
| 993 | end | 993 | end |
| 994 | 994 | ||
| 995 | define xxwidget | ||
| 996 | xgetptr $ | ||
| 997 | set $xw = (struct xwidget *) $ptr | ||
| 998 | print $xw | ||
| 999 | printf " Type: " | ||
| 1000 | xprintsym $xw->type | ||
| 1001 | echo \n | ||
| 1002 | printf " Title: " | ||
| 1003 | xgetptr $xw->title | ||
| 1004 | set $title = (struct Lisp_String *) $ptr | ||
| 1005 | xprintstr $title | ||
| 1006 | echo \n | ||
| 1007 | end | ||
| 1008 | document xxwidget | ||
| 1009 | Print $ assuming it is a xwidget. | ||
| 1010 | end | ||
| 1011 | |||
| 995 | define xpr | 1012 | define xpr |
| 996 | xtype | 1013 | xtype |
| 997 | if $type == Lisp_Int0 || $type == Lisp_Int1 | 1014 | if $type == Lisp_Int0 || $type == Lisp_Int1 |
| @@ -1061,6 +1078,9 @@ define xpr | |||
| 1061 | if $vec == PVEC_HASH_TABLE | 1078 | if $vec == PVEC_HASH_TABLE |
| 1062 | xhashtable | 1079 | xhashtable |
| 1063 | end | 1080 | end |
| 1081 | if $vec == PVEC_XWIDGET | ||
| 1082 | xxwidget | ||
| 1083 | end | ||
| 1064 | else | 1084 | else |
| 1065 | xvector | 1085 | xvector |
| 1066 | end | 1086 | end |