Mercurial > emacs
annotate src/.gdbinit @ 12820:4d6c32d4f782
Add index and xref to variable-interactive.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 10 Aug 1995 20:25:30 +0000 |
parents | 6882fe187fa9 |
children | 4c60f92bdaa6 |
rev | line source |
---|---|
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
1 # Set up a mask to use. |
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
2 |
12278
6882fe187fa9
Use long, not EMACS_INT.
Richard M. Stallman <rms@gnu.org>
parents:
12248
diff
changeset
|
3 # 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
|
4 # long ought to work in all cases right now. |
6882fe187fa9
Use long, not EMACS_INT.
Richard M. Stallman <rms@gnu.org>
parents:
12248
diff
changeset
|
5 set $valmask = ((long)1 << gdb_valbits) - 1 |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
6 set $nonvalbits = gdb_emacs_intbits - gdb_valbits |
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
7 |
567 | 8 # Set up something to print out s-expressions. |
9 define pr | |
6534 | 10 set debug_print ($) |
567 | 11 echo \n |
12 end | |
13 document pr | |
14 Print the emacs s-expression which is $. | |
15 Works only when an inferior emacs is executing. | |
16 end | |
17 | |
18 define xtype | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
19 output (enum Lisp_Type) (($ >> gdb_valbits) & 0x7) |
10299
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
20 echo \n |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
21 output ((($ >> gdb_valbits) & 0x7) == Lisp_Misc ? (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($ & $valmask) | gdb_data_seg_bits))->type) : (($ >> gdb_valbits) & 0x7) == Lisp_Vectorlike ? ($size = ((struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits))->size, (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)) : 0) |
999 | 22 echo \n |
567 | 23 end |
638 | 24 document xtype |
7962 | 25 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
|
26 If the first type printed is Lisp_Vector or Lisp_Misc, |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
27 the second line gives the more precise type. |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
28 Otherwise the second line doesn't mean anything. |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
29 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
30 |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
31 define xvectype |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
32 set $size = ((struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits))->size |
10299
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
33 output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0) |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
34 echo \n |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
35 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
36 document xvectype |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
37 Print the vector subtype of $, assuming it is a vector or pseudovector. |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
38 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
39 |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
40 define xmisctype |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
41 output (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($ & $valmask) | gdb_data_seg_bits))->type) |
10299
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
42 echo \n |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
43 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
44 document xmisctype |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
45 Print the specific type of $, assuming it is some misc type. |
638 | 46 end |
567 | 47 |
48 define xint | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
49 print (($ & $valmask) << $nonvalbits) >> $nonvalbits |
567 | 50 end |
638 | 51 document xint |
7962 | 52 Print $, assuming it is an Emacs Lisp integer. This gets the sign right. |
638 | 53 end |
567 | 54 |
55 define xptr | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
56 print (void *) (($ & $valmask) | gdb_data_seg_bits) |
567 | 57 end |
638 | 58 document xptr |
7962 | 59 Print the pointer portion of $, assuming it is an Emacs Lisp value. |
638 | 60 end |
567 | 61 |
62 define xwindow | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
63 print (struct window *) (($ & $valmask) | gdb_data_seg_bits) |
999 | 64 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top |
567 | 65 end |
638 | 66 document xwindow |
7962 | 67 Print $ as a window pointer, assuming it is an Emacs Lisp window value. |
999 | 68 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP". |
638 | 69 end |
567 | 70 |
71 define xmarker | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
72 print (struct Lisp_Marker *) (($ & $valmask) | gdb_data_seg_bits) |
567 | 73 end |
638 | 74 document xmarker |
7962 | 75 Print $ as a marker pointer, assuming it is an Emacs Lisp marker value. |
638 | 76 end |
567 | 77 |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
78 define xoverlay |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
79 print (struct Lisp_Overlay *) (($ & $valmask) | gdb_data_seg_bits) |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
80 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
81 document xoverlay |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
82 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
|
83 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
84 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
85 define xmiscfree |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
86 print (struct Lisp_Free *) (($ & $valmask) | gdb_data_seg_bits) |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
87 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
88 document xmiscfree |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
89 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
|
90 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
91 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
92 define xintfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
93 print (struct Lisp_Intfwd *) (($ & $valmask) | gdb_data_seg_bits) |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
94 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
95 document xintfwd |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
96 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
|
97 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
98 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
99 define xboolfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
100 print (struct Lisp_Boolfwd *) (($ & $valmask) | gdb_data_seg_bits) |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
101 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
102 document xboolfwd |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
103 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
|
104 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
105 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
106 define xobjfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
107 print (struct Lisp_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
108 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
109 document xobjfwd |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
110 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
|
111 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
112 |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
113 define xbufobjfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
114 print (struct Lisp_Buffer_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
115 end |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
116 document xbufobjfwd |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
117 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
|
118 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
119 |
11006
2aa4135eee50
(xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents:
10582
diff
changeset
|
120 define xkbobjfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
121 print (struct Lisp_Kboard_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) |
10582 | 122 end |
11006
2aa4135eee50
(xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents:
10582
diff
changeset
|
123 document xkbobjfwd |
2aa4135eee50
(xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents:
10582
diff
changeset
|
124 Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. |
10582 | 125 end |
126 | |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
127 define xbuflocal |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
128 print (struct Lisp_Buffer_Local_Value *) (($ & $valmask) | gdb_data_seg_bits) |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
129 end |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
130 document xbuflocal |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
131 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
|
132 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
133 |
567 | 134 define xbuffer |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
135 print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits) |
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
136 output &((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data |
999 | 137 echo \n |
567 | 138 end |
638 | 139 document xbuffer |
7962 | 140 Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. |
727 | 141 Print the name of the buffer. |
638 | 142 end |
567 | 143 |
144 define xsymbol | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
145 print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits) |
999 | 146 output &$->name->data |
147 echo \n | |
567 | 148 end |
638 | 149 document xsymbol |
150 Print the name and address of the symbol $. | |
7962 | 151 This command assumes that $ is an Emacs Lisp symbol value. |
638 | 152 end |
567 | 153 |
154 define xstring | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
155 print (struct Lisp_String *) (($ & $valmask) | gdb_data_seg_bits) |
7961
f3e1a5c7bba1
(xsymbol): Cast $ to int.
Richard M. Stallman <rms@gnu.org>
parents:
6534
diff
changeset
|
156 output ($->size > 1000) ? 0 : ($->data[0])@($->size) |
999 | 157 echo \n |
567 | 158 end |
159 document xstring | |
638 | 160 Print the contents and address of the string $. |
7962 | 161 This command assumes that $ is an Emacs Lisp string value. |
567 | 162 end |
163 | |
164 define xvector | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
165 print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) |
7961
f3e1a5c7bba1
(xsymbol): Cast $ to int.
Richard M. Stallman <rms@gnu.org>
parents:
6534
diff
changeset
|
166 output ($->size > 50) ? 0 : ($->contents[0])@($->size) |
999 | 167 echo \n |
567 | 168 end |
169 document xvector | |
638 | 170 Print the contents and address of the vector $. |
7962 | 171 This command assumes that $ is an Emacs Lisp vector value. |
567 | 172 end |
173 | |
1113 | 174 define xframe |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
175 print (struct frame *) (($ & $valmask) | gdb_data_seg_bits) |
567 | 176 end |
1113 | 177 document xframe |
7962 | 178 Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. |
638 | 179 end |
567 | 180 |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
181 define xwinconfig |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
182 print (struct save_window_data *) (($ & $valmask) | gdb_data_seg_bits) |
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 xwinconfig |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
185 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
|
186 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
187 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
188 define xcompiled |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
189 print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
190 output ($->contents[0])@($->size & 0xff) |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
191 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
192 document xcompiled |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
193 Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
194 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
195 |
567 | 196 define xcons |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
197 print (struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits) |
1069 | 198 output *$ |
999 | 199 echo \n |
567 | 200 end |
638 | 201 document xcons |
7962 | 202 Print the contents of $, assuming it is an Emacs Lisp cons. |
638 | 203 end |
567 | 204 |
205 define xcar | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
206 print ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0) |
567 | 207 end |
638 | 208 document xcar |
7962 | 209 Print the car of $, assuming it is an Emacs Lisp pair. |
638 | 210 end |
567 | 211 |
212 define xcdr | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
213 print ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->cdr : 0) |
567 | 214 end |
638 | 215 document xcdr |
7962 | 216 Print the cdr of $, assuming it is an Emacs Lisp pair. |
638 | 217 end |
567 | 218 |
1113 | 219 define xsubr |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
220 print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits) |
1113 | 221 output *$ |
222 echo \n | |
223 end | |
224 document xsubr | |
225 Print the address of the subr which the Lisp_Object $ points to. | |
226 end | |
227 | |
1943
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
228 define xprocess |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
229 print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits) |
1943
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
230 output *$ |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
231 echo \n |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
232 end |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
233 document xprocess |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
234 Print the address of the struct Lisp_process which the Lisp_Object $ points to. |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
235 end |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
236 |
4267 | 237 define xfloat |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
238 print ((struct Lisp_Float *) (($ & $valmask) | gdb_data_seg_bits))->data |
4267 | 239 end |
240 document xfloat | |
241 Print $ assuming it is a lisp floating-point number. | |
242 end | |
243 | |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
244 define xscrollbar |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
245 print (struct scrollbar *) (($ & $valmask) | gdb_data_seg_bits) |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
246 output *$ |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
247 echo \n |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
248 end |
4268
0795ced6013f
(xscrollbar): Fix typo specifying doc string.
Richard M. Stallman <rms@gnu.org>
parents:
4267
diff
changeset
|
249 document xscrollbar |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
250 Print $ as a scrollbar pointer. |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
251 end |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
252 |
638 | 253 set print pretty on |
4267 | 254 set print sevenbit-strings |
567 | 255 |
732 | 256 show environment DISPLAY |
4487 | 257 show environment TERM |
258 set args -geometry 80x40+0+0 | |
732 | 259 |
567 | 260 # Don't let abort actually run, as it will make |
2162 | 261 # stdio stop working and therefore the `pr' command above as well. |
567 | 262 break abort |
263 | |
264 # If we are running in synchronous mode, we want a chance to look around | |
265 # before Emacs exits. Perhaps we should put the break somewhere else | |
266 # instead... | |
8310
def3ab3a6f01
Set the breakpoint in x_error_quitter instead of _XPrintDefaultError.
Richard M. Stallman <rms@gnu.org>
parents:
7962
diff
changeset
|
267 break x_error_quitter |