Mercurial > emacs
annotate src/.gdbinit @ 54781:bdfa0aa8c425
(help-make-xrefs): Add a final newline to the *Help* buffer.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Sun, 11 Apr 2004 09:52:09 +0000 |
parents | f9c48c0105bd |
children | 253acecd37f9 7f60e040ccfc |
rev | line source |
---|---|
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
1 # Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 2000, 01, 2004 |
36219 | 2 # Free Software Foundation, Inc. |
3 # | |
4 # This file is part of GNU Emacs. | |
5 # | |
6 # GNU Emacs is free software; you can redistribute it and/or modify | |
7 # it under the terms of the GNU General Public License as published by | |
8 # the Free Software Foundation; either version 2, or (at your option) | |
9 # any later version. | |
10 # | |
11 # GNU Emacs is distributed in the hope that it will be useful, | |
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 # GNU General Public License for more details. | |
15 # | |
16 # You should have received a copy of the GNU General Public License | |
17 # along with GNU Emacs; see the file COPYING. If not, write to the | |
18 # Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 # Boston, MA 02111-1307, USA. | |
20 | |
13359
4c60f92bdaa6
Do `set main' to make gdb_valbits etc. available.
Richard M. Stallman <rms@gnu.org>
parents:
12278
diff
changeset
|
21 # Force loading of symbols, enough to give us gdb_valbits etc. |
4c60f92bdaa6
Do `set main' to make gdb_valbits etc. available.
Richard M. Stallman <rms@gnu.org>
parents:
12278
diff
changeset
|
22 set main |
4c60f92bdaa6
Do `set main' to make gdb_valbits etc. available.
Richard M. Stallman <rms@gnu.org>
parents:
12278
diff
changeset
|
23 |
15536 | 24 # Find lwlib source files too. |
25 dir ../lwlib | |
34876
8dbc92d11de2
Comment out the line pointing to the Lesstif source
Gerd Moellmann <gerd@gnu.org>
parents:
32812
diff
changeset
|
26 #dir /gd/gnu/lesstif-0.89.9/lib/Xm |
15536 | 27 |
20672 | 28 # Don't enter GDB when user types C-g to quit. |
29 # This has one unfortunate effect: you can't type C-c | |
30 # at the GDB to stop Emacs, when using X. | |
31 # However, C-z works just as well in that case. | |
32 handle 2 noprint pass | |
33 | |
30636 | 34 # Don't pass SIGALRM to Emacs. This makes problems when |
35 # debugging. | |
36 handle SIGALRM ignore | |
37 | |
20672 | 38 # Set up a mask to use. |
12278
6882fe187fa9
Use long, not EMACS_INT.
Richard M. Stallman <rms@gnu.org>
parents:
12248
diff
changeset
|
39 # This should be EMACS_INT, but in some cases that is a macro. |
6882fe187fa9
Use long, not EMACS_INT.
Richard M. Stallman <rms@gnu.org>
parents:
12248
diff
changeset
|
40 # long ought to work in all cases right now. |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
41 |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
42 define xgetptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
43 set $ptr = (gdb_use_union ? $arg0.u.val : $arg0 & $valmask) | gdb_data_seg_bits |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
44 end |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
45 |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
46 define xgetint |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
47 set $int = gdb_use_union ? $arg0.s.val : (gdb_use_lsb ? $arg0 : $arg0 << gdb_gctypebits) >> gdb_gctypebits |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
48 end |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
49 |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
50 define xgettype |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
51 set $type = gdb_use_union ? $arg0.s.type : (enum Lisp_Type) (gdb_use_lsb ? $arg0 & $tagmask : $arg0 >> gdb_valbits) |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
52 end |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
53 |
567 | 54 # Set up something to print out s-expressions. |
55 define pr | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
56 set debug_print ($) |
567 | 57 end |
58 document pr | |
59 Print the emacs s-expression which is $. | |
60 Works only when an inferior emacs is executing. | |
61 end | |
62 | |
63 define xtype | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
64 xgettype $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
65 output $type |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
66 echo \n |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
67 if $type == Lisp_Misc |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
68 xmisctype |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
69 else |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
70 if $type == Lisp_Vectorlike |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
71 xvectype |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
72 end |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
73 end |
567 | 74 end |
638 | 75 document xtype |
7962 | 76 Print the type of $, assuming it is an Emacs Lisp value. |
10299
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
77 If the first type printed is Lisp_Vector or Lisp_Misc, |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
78 a second line gives the more precise type. |
10299
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
79 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
80 |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
81 define xvectype |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
82 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
83 set $size = ((struct Lisp_Vector *) $ptr)->size |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
84 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
85 echo \n |
10299
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
86 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
87 document xvectype |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
88 Print the size or vector subtype of $, assuming it is a vector or pseudovector. |
10299
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
89 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
90 |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
91 define xmisctype |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
92 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
93 output (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type) |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
94 echo \n |
10299
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
95 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
96 document xmisctype |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
97 Print the specific type of $, assuming it is some misc type. |
638 | 98 end |
567 | 99 |
100 define xint | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
101 xgetint $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
102 print $int |
567 | 103 end |
638 | 104 document xint |
7962 | 105 Print $, assuming it is an Emacs Lisp integer. This gets the sign right. |
638 | 106 end |
567 | 107 |
108 define xptr | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
109 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
110 print (void *) $ptr |
567 | 111 end |
638 | 112 document xptr |
7962 | 113 Print the pointer portion of $, assuming it is an Emacs Lisp value. |
638 | 114 end |
567 | 115 |
116 define xmarker | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
117 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
118 print (struct Lisp_Marker *) $ptr |
567 | 119 end |
638 | 120 document xmarker |
7962 | 121 Print $ as a marker pointer, assuming it is an Emacs Lisp marker value. |
638 | 122 end |
567 | 123 |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
124 define xoverlay |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
125 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
126 print (struct Lisp_Overlay *) $ptr |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
127 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
128 document xoverlay |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
129 Print $ as a overlay pointer, assuming it is an Emacs Lisp overlay value. |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
130 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
131 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
132 define xmiscfree |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
133 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
134 print (struct Lisp_Free *) $ptr |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
135 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
136 document xmiscfree |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
137 Print $ as a misc free-cell pointer, assuming it is an Emacs Lisp Misc value. |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
138 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
139 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
140 define xintfwd |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
141 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
142 print (struct Lisp_Intfwd *) $ptr |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
143 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
144 document xintfwd |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
145 Print $ as an integer forwarding pointer, assuming it is an Emacs Lisp Misc value. |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
146 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
147 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
148 define xboolfwd |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
149 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
150 print (struct Lisp_Boolfwd *) $ptr |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
151 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
152 document xboolfwd |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
153 Print $ as a boolean forwarding pointer, assuming it is an Emacs Lisp Misc value. |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
154 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
155 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
156 define xobjfwd |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
157 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
158 print (struct Lisp_Objfwd *) $ptr |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
159 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
160 document xobjfwd |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
161 Print $ as an object forwarding pointer, assuming it is an Emacs Lisp Misc value. |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
162 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
163 |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
164 define xbufobjfwd |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
165 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
166 print (struct Lisp_Buffer_Objfwd *) $ptr |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
167 end |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
168 document xbufobjfwd |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
169 Print $ as a buffer-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
170 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
171 |
11006
2aa4135eee50
(xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents:
10582
diff
changeset
|
172 define xkbobjfwd |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
173 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
174 print (struct Lisp_Kboard_Objfwd *) $ptr |
10582 | 175 end |
11006
2aa4135eee50
(xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents:
10582
diff
changeset
|
176 document xkbobjfwd |
2aa4135eee50
(xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents:
10582
diff
changeset
|
177 Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. |
10582 | 178 end |
179 | |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
180 define xbuflocal |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
181 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
182 print (struct Lisp_Buffer_Local_Value *) $ptr |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
183 end |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
184 document xbuflocal |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
185 Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value. |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
186 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
187 |
567 | 188 define xsymbol |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
189 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
190 print (struct Lisp_Symbol *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
191 xprintsym $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
192 echo \n |
567 | 193 end |
638 | 194 document xsymbol |
195 Print the name and address of the symbol $. | |
7962 | 196 This command assumes that $ is an Emacs Lisp symbol value. |
638 | 197 end |
567 | 198 |
199 define xstring | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
200 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
201 print (struct Lisp_String *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
202 output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte) |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
203 echo \n |
567 | 204 end |
205 document xstring | |
638 | 206 Print the contents and address of the string $. |
7962 | 207 This command assumes that $ is an Emacs Lisp string value. |
567 | 208 end |
209 | |
210 define xvector | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
211 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
212 print (struct Lisp_Vector *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
213 output ($->size > 50) ? 0 : ($->contents[0])@($->size) |
999 | 214 echo \n |
567 | 215 end |
216 document xvector | |
638 | 217 Print the contents and address of the vector $. |
7962 | 218 This command assumes that $ is an Emacs Lisp vector value. |
567 | 219 end |
220 | |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
221 define xprocess |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
222 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
223 print (struct Lisp_Process *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
224 output *$ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
225 echo \n |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
226 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
227 document xprocess |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
228 Print the address of the struct Lisp_process which the Lisp_Object $ points to. |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
229 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
230 |
1113 | 231 define xframe |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
232 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
233 print (struct frame *) $ptr |
567 | 234 end |
1113 | 235 document xframe |
7962 | 236 Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. |
638 | 237 end |
567 | 238 |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
239 define xcompiled |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
240 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
241 print (struct Lisp_Vector *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
242 output ($->contents[0])@($->size & 0xff) |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
243 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
244 document xcompiled |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
245 Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
246 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
247 |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
248 define xwindow |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
249 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
250 print (struct window *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
251 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
252 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
253 document xwindow |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
254 Print $ as a window pointer, assuming it is an Emacs Lisp window value. |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
255 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP". |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
256 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
257 |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
258 define xwinconfig |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
259 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
260 print (struct save_window_data *) $ptr |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
261 end |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
262 document xwinconfig |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
263 Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value. |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
264 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
265 |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
266 define xsubr |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
267 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
268 print (struct Lisp_Subr *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
269 output *$ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
270 echo \n |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
271 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
272 document xsubr |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
273 Print the address of the subr which the Lisp_Object $ points to. |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
274 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
275 |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
276 define xchartable |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
277 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
278 print (struct Lisp_Char_Table *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
279 printf "Purpose: " |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
280 xprintsym $->purpose |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
281 printf " %d extra slots", ($->size & 0x1ff) - 388 |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
282 echo \n |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
283 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
284 document xchartable |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
285 Print the address of the char-table $, and its purpose. |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
286 This command assumes that $ is an Emacs Lisp char-table value. |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
287 end |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
288 |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
289 define xboolvector |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
290 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
291 print (struct Lisp_Bool_Vector *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
292 output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
293 echo \n |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
294 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
295 document xboolvector |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
296 Print the contents and address of the bool-vector $. |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
297 This command assumes that $ is an Emacs Lisp bool-vector value. |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
298 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
299 |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
300 define xbuffer |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
301 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
302 print (struct buffer *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
303 xgetptr $->name |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
304 output ((struct Lisp_String *) $ptr)->data |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
305 echo \n |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
306 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
307 document xbuffer |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
308 Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
309 Print the name of the buffer. |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
310 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
311 |
30636 | 312 define xhashtable |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
313 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
314 print (struct Lisp_Hash_Table *) $ptr |
30636 | 315 end |
316 document xhashtable | |
317 Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value. | |
318 end | |
319 | |
567 | 320 define xcons |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
321 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
322 print (struct Lisp_Cons *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
323 output/x *$ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
324 echo \n |
567 | 325 end |
638 | 326 document xcons |
7962 | 327 Print the contents of $, assuming it is an Emacs Lisp cons. |
638 | 328 end |
567 | 329 |
18522
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
330 define nextcons |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
331 p $.cdr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
332 xcons |
18522
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
333 end |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
334 document nextcons |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
335 Print the contents of the next cell in a list. |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
336 This assumes that the last thing you printed was a cons cell contents |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
337 (type struct Lisp_Cons) or a pointer to one. |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
338 end |
567 | 339 define xcar |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
340 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
341 xgettype $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
342 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->car : 0) |
567 | 343 end |
638 | 344 document xcar |
7962 | 345 Print the car of $, assuming it is an Emacs Lisp pair. |
638 | 346 end |
567 | 347 |
348 define xcdr | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
349 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
350 xgettype $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
351 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->cdr : 0) |
567 | 352 end |
638 | 353 document xcdr |
7962 | 354 Print the cdr of $, assuming it is an Emacs Lisp pair. |
638 | 355 end |
567 | 356 |
4267 | 357 define xfloat |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
358 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
359 print ((struct Lisp_Float *) $ptr)->data |
4267 | 360 end |
361 document xfloat | |
362 Print $ assuming it is a lisp floating-point number. | |
363 end | |
364 | |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
365 define xscrollbar |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
366 xgetptr $ |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
367 print (struct scrollbar *) $ptr |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
368 output *$ |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
369 echo \n |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
370 end |
4268
0795ced6013f
(xscrollbar): Fix typo specifying doc string.
Richard M. Stallman <rms@gnu.org>
parents:
4267
diff
changeset
|
371 document xscrollbar |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
372 Print $ as a scrollbar pointer. |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
373 end |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
374 |
27290 | 375 define xprintsym |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
376 xgetptr $arg0 |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
377 set $sym = (struct Lisp_Symbol *) $ptr |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
378 xgetptr $sym->xname |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
379 set $sym_name = (struct Lisp_String *) $ptr |
45966
09d2b243ebcb
(xprintsym): Use the new `xname' field.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
45873
diff
changeset
|
380 output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size : $sym_name->size_byte) |
27290 | 381 end |
382 document xprintsym | |
383 Print argument as a symbol. | |
384 end | |
385 | |
386 define xbacktrace | |
387 set $bt = backtrace_list | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45966
diff
changeset
|
388 while $bt |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
389 xgettype (*$bt->function) |
32812
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
390 if $type == Lisp_Symbol |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
391 xprintsym (*$bt->function) |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
392 echo \n |
32812
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
393 else |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
394 printf "0x%x ", *$bt->function |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
395 if $type == Lisp_Vectorlike |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
396 xgetptr (*$bt->function) |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
397 set $size = ((struct Lisp_Vector *) $ptr)->size |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
398 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size |
32812
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
399 else |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
400 printf "Lisp type %d", $type |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
401 end |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
402 echo \n |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
403 end |
27290 | 404 set $bt = $bt->next |
405 end | |
406 end | |
407 document xbacktrace | |
408 Print a backtrace of Lisp function calls from backtrace_list. | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
45966
diff
changeset
|
409 Set a breakpoint at Fsignal and call this to see from where |
32812
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
410 an error was signaled. |
27290 | 411 end |
412 | |
413 define xreload | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
414 set $tagmask = (((long)1 << gdb_gctypebits) - 1) |
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
415 set $valmask = gdb_use_lsb ? ~($tagmask) : ((long)1 << gdb_valbits) - 1 |
27290 | 416 end |
417 document xreload | |
418 When starting Emacs a second time in the same gdb session under | |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
419 FreeBSD 2.2.5, gdb 4.13, $valmask have lost |
35792
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
420 their values. (The same happens on current (2000) versions of GNU/Linux |
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
421 with gdb 5.0.) |
31960
eb2d3d3a8eb5
(xreload): Note its need on GNU/Linux.
Dave Love <fx@gnu.org>
parents:
30636
diff
changeset
|
422 This function reloads them. |
27290 | 423 end |
54690
f9c48c0105bd
Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
424 xreload |
27290 | 425 |
35792
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
426 define hook-run |
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
427 xreload |
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
428 end |
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
429 |
42907
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
430 # Call xreload if a new Emacs executable is loaded. |
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
431 define hookpost-run |
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
432 xreload |
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
433 end |
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
434 |
638 | 435 set print pretty on |
4267 | 436 set print sevenbit-strings |
567 | 437 |
732 | 438 show environment DISPLAY |
4487 | 439 show environment TERM |
440 set args -geometry 80x40+0+0 | |
732 | 441 |
567 | 442 # Don't let abort actually run, as it will make |
2162 | 443 # stdio stop working and therefore the `pr' command above as well. |
567 | 444 break abort |
445 | |
446 # If we are running in synchronous mode, we want a chance to look around | |
447 # before Emacs exits. Perhaps we should put the break somewhere else | |
448 # instead... | |
8310
def3ab3a6f01
Set the breakpoint in x_error_quitter instead of _XPrintDefaultError.
Richard M. Stallman <rms@gnu.org>
parents:
7962
diff
changeset
|
449 break x_error_quitter |
52401 | 450 |
451 # arch-tag: 12f34321-7bfa-4240-b77a-3cd3a1696dfe |