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