Mercurial > emacs
annotate src/.gdbinit @ 89371:0c4fd9081174
(ccl_driver): Prototype adjusted.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 30 Jan 2003 02:19:36 +0000 |
parents | e5d55ed9b335 |
children | 2f877ed80fa6 |
rev | line source |
---|---|
36219 | 1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001 |
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. |
6882fe187fa9
Use long, not EMACS_INT.
Richard M. Stallman <rms@gnu.org>
parents:
12248
diff
changeset
|
41 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
|
42 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
|
43 |
567 | 44 # Set up something to print out s-expressions. |
45 define pr | |
6534 | 46 set debug_print ($) |
567 | 47 end |
48 document pr | |
49 Print the emacs s-expression which is $. | |
50 Works only when an inferior emacs is executing. | |
51 end | |
52 | |
53 define xtype | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
54 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
|
55 echo \n |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
56 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 | 57 echo \n |
567 | 58 end |
638 | 59 document xtype |
7962 | 60 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
|
61 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
|
62 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
|
63 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
|
64 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
65 |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
66 define xvectype |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
67 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
|
68 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
|
69 echo \n |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
70 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
71 document xvectype |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
72 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
|
73 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
74 |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
75 define xmisctype |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
76 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
|
77 echo \n |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
78 end |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
79 document xmisctype |
0de933eb95a2
Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents:
8310
diff
changeset
|
80 Print the specific type of $, assuming it is some misc type. |
638 | 81 end |
567 | 82 |
83 define xint | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
84 print (($ & $valmask) << $nonvalbits) >> $nonvalbits |
567 | 85 end |
638 | 86 document xint |
7962 | 87 Print $, assuming it is an Emacs Lisp integer. This gets the sign right. |
638 | 88 end |
567 | 89 |
90 define xptr | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
91 print (void *) (($ & $valmask) | gdb_data_seg_bits) |
567 | 92 end |
638 | 93 document xptr |
7962 | 94 Print the pointer portion of $, assuming it is an Emacs Lisp value. |
638 | 95 end |
567 | 96 |
97 define xmarker | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
98 print (struct Lisp_Marker *) (($ & $valmask) | gdb_data_seg_bits) |
567 | 99 end |
638 | 100 document xmarker |
7962 | 101 Print $ as a marker pointer, assuming it is an Emacs Lisp marker value. |
638 | 102 end |
567 | 103 |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
104 define xoverlay |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
105 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
|
106 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
107 document xoverlay |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
108 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
|
109 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
110 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
111 define xmiscfree |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
112 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
|
113 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
114 document xmiscfree |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
115 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
|
116 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
117 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
118 define xintfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
119 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
|
120 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
121 document xintfwd |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
122 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
|
123 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
124 |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
125 define xboolfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
126 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
|
127 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
128 document xboolfwd |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
129 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
|
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 xobjfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
133 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
|
134 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
135 document xobjfwd |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
136 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
|
137 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
138 |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
139 define xbufobjfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
140 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
|
141 end |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
142 document xbufobjfwd |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
143 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
|
144 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
145 |
11006
2aa4135eee50
(xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents:
10582
diff
changeset
|
146 define xkbobjfwd |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
147 print (struct Lisp_Kboard_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) |
10582 | 148 end |
11006
2aa4135eee50
(xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents:
10582
diff
changeset
|
149 document xkbobjfwd |
2aa4135eee50
(xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents:
10582
diff
changeset
|
150 Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. |
10582 | 151 end |
152 | |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
153 define xbuflocal |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
154 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
|
155 end |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
156 document xbuflocal |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
157 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
|
158 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
159 |
567 | 160 define xsymbol |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
161 print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits) |
27290 | 162 output (char*)$->name->data |
999 | 163 echo \n |
567 | 164 end |
638 | 165 document xsymbol |
166 Print the name and address of the symbol $. | |
7962 | 167 This command assumes that $ is an Emacs Lisp symbol value. |
638 | 168 end |
567 | 169 |
170 define xstring | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
171 print (struct Lisp_String *) (($ & $valmask) | gdb_data_seg_bits) |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
172 output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte) |
999 | 173 echo \n |
567 | 174 end |
175 document xstring | |
638 | 176 Print the contents and address of the string $. |
7962 | 177 This command assumes that $ is an Emacs Lisp string value. |
567 | 178 end |
179 | |
180 define xvector | |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
181 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
|
182 output ($->size > 50) ? 0 : ($->contents[0])@($->size) |
999 | 183 echo \n |
567 | 184 end |
185 document xvector | |
638 | 186 Print the contents and address of the vector $. |
7962 | 187 This command assumes that $ is an Emacs Lisp vector value. |
567 | 188 end |
189 | |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
190 define xprocess |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
191 print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits) |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
192 output *$ |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
193 echo \n |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
194 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
195 document xprocess |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
196 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
|
197 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
198 |
1113 | 199 define xframe |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
200 print (struct frame *) (($ & $valmask) | gdb_data_seg_bits) |
567 | 201 end |
1113 | 202 document xframe |
7962 | 203 Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. |
638 | 204 end |
567 | 205 |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
206 define xcompiled |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
207 print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
208 output ($->contents[0])@($->size & 0xff) |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
209 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
210 document xcompiled |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
211 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
|
212 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
213 |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
214 define xwindow |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
215 print (struct window *) (($ & $valmask) | gdb_data_seg_bits) |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
216 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
217 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
218 document xwindow |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
219 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
|
220 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP". |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
221 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
222 |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
223 define xwinconfig |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
224 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
|
225 end |
10495
70bd087c47a9
(xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents:
10483
diff
changeset
|
226 document xwinconfig |
10483
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
227 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
|
228 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
229 |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
230 define xsubr |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
231 print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits) |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
232 output *$ |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
233 echo \n |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
234 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
235 document xsubr |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
236 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
|
237 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
238 |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
239 define xchartable |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
240 print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
241 printf "Purpose: " |
88349
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
242 output (char*)((struct Lisp_Symbol *) ((((int) $->purpose) & $valmask) | gdb_data_seg_bits))->name->data |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
243 printf " %d extra slots", ($->size & 0x1ff) - 68 |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
244 echo \n |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
245 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
246 document xchartable |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
247 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
|
248 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
|
249 end |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
250 |
88349
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
251 define xsubchartable |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
252 print (struct Lisp_Sub_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
253 end |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
254 document xsubchartable |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
255 Print the address of the sub-char-table $. |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
256 This command assumes that $ is an Emacs Lisp sub-char-table value. |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
257 end |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
258 |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
259 define xboolvector |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
260 print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits) |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
261 output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
262 echo \n |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
263 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
264 document xboolvector |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
265 Print the contents and address of the bool-vector $. |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
266 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
|
267 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
268 |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
269 define xbuffer |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
270 print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits) |
42682
d2dfa348e7d8
(xbuffer): Remove address operator since data is now a pointer.
Andreas Schwab <schwab@suse.de>
parents:
36219
diff
changeset
|
271 output ((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data |
22012
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
272 echo \n |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
273 end |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
274 document xbuffer |
4379a41b6f2e
(xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents:
20672
diff
changeset
|
275 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
|
276 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
|
277 end |
727cd2061e2a
(xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents:
10337
diff
changeset
|
278 |
30636 | 279 define xhashtable |
280 print (struct Lisp_Hash_Table *) (($ & $valmask) | gdb_data_seg_bits) | |
281 end | |
282 document xhashtable | |
283 Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value. | |
284 end | |
285 | |
567 | 286 define xcons |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
287 print (struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits) |
18522
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
288 output/x *$ |
999 | 289 echo \n |
567 | 290 end |
638 | 291 document xcons |
7962 | 292 Print the contents of $, assuming it is an Emacs Lisp cons. |
638 | 293 end |
567 | 294 |
18522
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
295 define nextcons |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
296 p $.cdr |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
297 xcons |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
298 end |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
299 document nextcons |
c572c073c982
(xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents:
15536
diff
changeset
|
300 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
|
301 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
|
302 (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
|
303 end |
567 | 304 define xcar |
18835
8b32c6fe8728
(xcar, xcdr): Print with /x.
Richard M. Stallman <rms@gnu.org>
parents:
18522
diff
changeset
|
305 print/x ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0) |
567 | 306 end |
638 | 307 document xcar |
7962 | 308 Print the car of $, assuming it is an Emacs Lisp pair. |
638 | 309 end |
567 | 310 |
311 define xcdr | |
18835
8b32c6fe8728
(xcar, xcdr): Print with /x.
Richard M. Stallman <rms@gnu.org>
parents:
18522
diff
changeset
|
312 print/x ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->cdr : 0) |
567 | 313 end |
638 | 314 document xcdr |
7962 | 315 Print the cdr of $, assuming it is an Emacs Lisp pair. |
638 | 316 end |
567 | 317 |
4267 | 318 define xfloat |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
319 print ((struct Lisp_Float *) (($ & $valmask) | gdb_data_seg_bits))->data |
4267 | 320 end |
321 document xfloat | |
322 Print $ assuming it is a lisp floating-point number. | |
323 end | |
324 | |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
325 define xscrollbar |
11872
a28bd38b2ff3
gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents:
11006
diff
changeset
|
326 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
|
327 output *$ |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
328 echo \n |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
329 end |
4268
0795ced6013f
(xscrollbar): Fix typo specifying doc string.
Richard M. Stallman <rms@gnu.org>
parents:
4267
diff
changeset
|
330 document xscrollbar |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
331 Print $ as a scrollbar pointer. |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
332 end |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
333 |
27290 | 334 define xprintsym |
335 set $sym = (struct Lisp_Symbol *) ((((int) $arg0) & $valmask) | gdb_data_seg_bits) | |
336 output (char*)$sym->name->data | |
337 echo \n | |
338 end | |
339 document xprintsym | |
340 Print argument as a symbol. | |
341 end | |
342 | |
88349
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
343 define xcoding |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
344 set $tmp = (struct Lisp_Hash_Table *) ((Vcoding_system_hash_table & $valmask) | gdb_data_seg_bits) |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
345 set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & $valmask) | gdb_data_seg_bits) |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
346 set $name = $tmp->contents[$arg0 * 2] |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
347 print $name |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
348 pr |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
349 print $tmp->contents[$arg0 * 2 + 1] |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
350 pr |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
351 end |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
352 document xcoding |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
353 Print a coding system whose id is the argument. |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
354 end |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
355 |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
356 define xcharset |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
357 set $tmp = (struct Lisp_Hash_Table *) ((Vcharset_hash_table & $valmask) | gdb_data_seg_bits) |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
358 set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & $valmask) | gdb_data_seg_bits) |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
359 p $tmp->contents[$arg0->hash_index * 2] |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
360 pr |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
361 end |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
362 document xcharset |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
363 Print a charset name whose id is the argument. |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
364 end |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
365 |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
366 define xcurbuf |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
367 echo GAPSIZE: |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
368 output current_buffer->text->gap_size |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
369 echo \nGPT: |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
370 output current_buffer->text->gpt |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
371 echo / |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
372 output current_buffer->text->gpt_byte |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
373 echo \nZ: |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
374 output current_buffer->text->z |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
375 echo / |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
376 output current_buffer->text->z_byte |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
377 echo \nTEXT: |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
378 if current_buffer->text->gpt > 1 |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
379 print current_buffer->text->beg[0]@80 |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
380 else |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
381 print current_buffer->text->beg[current_buffer->text->gpt_byte-1]@80 |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
382 end |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
383 end |
e5d55ed9b335
(xchartable): Adjusted for the change of char table
Kenichi Handa <handa@m17n.org>
parents:
42907
diff
changeset
|
384 |
27290 | 385 define xbacktrace |
386 set $bt = backtrace_list | |
387 while $bt | |
32812
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
388 set $type = (enum Lisp_Type) ((*$bt->function >> gdb_valbits) & 0x7) |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
389 if $type == Lisp_Symbol |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
390 xprintsym *$bt->function |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
391 else |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
392 printf "0x%x ", *$bt->function |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
393 if $type == Lisp_Vectorlike |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
394 set $size = ((struct Lisp_Vector *) ((*$bt->function & $valmask) | gdb_data_seg_bits))->size |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
395 output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0) |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
396 else |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
397 printf "Lisp type %d", $type |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
398 end |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
399 echo \n |
c49b460bb280
(xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents:
31960
diff
changeset
|
400 end |
27290 | 401 set $bt = $bt->next |
402 end | |
403 end | |
404 document xbacktrace | |
405 Print a backtrace of Lisp function calls from backtrace_list. | |
406 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
|
407 an error was signaled. |
27290 | 408 end |
409 | |
410 define xreload | |
411 set $valmask = ((long)1 << gdb_valbits) - 1 | |
412 set $nonvalbits = gdb_emacs_intbits - gdb_valbits | |
413 end | |
414 document xreload | |
415 When starting Emacs a second time in the same gdb session under | |
416 FreeBSD 2.2.5, gdb 4.13, $valmask and $nonvalbits have lost | |
35792
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
417 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
|
418 with gdb 5.0.) |
31960
eb2d3d3a8eb5
(xreload): Note its need on GNU/Linux.
Dave Love <fx@gnu.org>
parents:
30636
diff
changeset
|
419 This function reloads them. |
27290 | 420 end |
421 | |
35792
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
422 define hook-run |
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
423 xreload |
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
424 end |
9ec1e59890a2
(hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents:
34876
diff
changeset
|
425 |
42907
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
426 # Call xreload if a new Emacs executable is loaded. |
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
427 define hookpost-run |
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
428 xreload |
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
429 end |
1865230232b7
(hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
42682
diff
changeset
|
430 |
638 | 431 set print pretty on |
4267 | 432 set print sevenbit-strings |
567 | 433 |
732 | 434 show environment DISPLAY |
4487 | 435 show environment TERM |
436 set args -geometry 80x40+0+0 | |
732 | 437 |
567 | 438 # Don't let abort actually run, as it will make |
2162 | 439 # stdio stop working and therefore the `pr' command above as well. |
567 | 440 break abort |
441 | |
442 # If we are running in synchronous mode, we want a chance to look around | |
443 # before Emacs exits. Perhaps we should put the break somewhere else | |
444 # instead... | |
8310
def3ab3a6f01
Set the breakpoint in x_error_quitter instead of _XPrintDefaultError.
Richard M. Stallman <rms@gnu.org>
parents:
7962
diff
changeset
|
445 break x_error_quitter |