50998
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
2 # Free Software Foundation, Inc.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
3 #
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
4 # This file is part of GNU Emacs.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
5 #
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
6 # GNU Emacs is free software; you can redistribute it and/or modify
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
7 # it under the terms of the GNU General Public License as published by
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
8 # the Free Software Foundation; either version 2, or (at your option)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
9 # any later version.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
10 #
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
11 # GNU Emacs is distributed in the hope that it will be useful,
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
14 # GNU General Public License for more details.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
15 #
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
16 # You should have received a copy of the GNU General Public License
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
17 # along with GNU Emacs; see the file COPYING. If not, write to the
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
18 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
19 # Boston, MA 02111-1307, USA.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
20
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
21 # Force loading of symbols, enough to give us gdb_valbits etc.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
22 set main
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
23
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
24 # Find lwlib source files too.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
25 dir ../lwlib
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
26 #dir /gd/gnu/lesstif-0.89.9/lib/Xm
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
27
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
28 # Don't enter GDB when user types C-g to quit.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
29 # This has one unfortunate effect: you can't type C-c
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
30 # at the GDB to stop Emacs, when using X.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
31 # However, C-z works just as well in that case.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
32 handle 2 noprint pass
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
33
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
34 # Don't pass SIGALRM to Emacs. This makes problems when
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
35 # debugging.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
36 handle SIGALRM ignore
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
37
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
38 # Set up a mask to use.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
39 # This should be EMACS_INT, but in some cases that is a macro.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
40 # long ought to work in all cases right now.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
41 set $valmask = ((long)1 << gdb_valbits) - 1
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
42 set $nonvalbits = gdb_emacs_intbits - gdb_valbits
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
43
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
44 # Set up something to print out s-expressions.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
45 define pr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
46 set debug_print ($)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
47 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
48 document pr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
49 Print the emacs s-expression which is $.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
50 Works only when an inferior emacs is executing.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
51 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
52
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
53 define xtype
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
54 output (enum Lisp_Type) (($.i >> gdb_valbits) & 0x7)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
55 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
56 output ((($.i >> gdb_valbits) & 0x7) == Lisp_Misc ? (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($.i & $valmask) | gdb_data_seg_bits))->type) : (($.i >> gdb_valbits) & 0x7) == Lisp_Vectorlike ? ($size = ((struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits))->size, (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)) : 0)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
57 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
58 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
59 document xtype
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
60 Print the type of $, assuming it is an Emacs Lisp value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
61 If the first type printed is Lisp_Vector or Lisp_Misc,
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
62 the second line gives the more precise type.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
63 Otherwise the second line doesn't mean anything.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
64 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
65
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
66 define xvectype
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
67 set $size = ((struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits))->size
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
68 output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
69 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
70 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
71 document xvectype
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
72 Print the vector subtype of $, assuming it is a vector or pseudovector.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
73 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
74
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
75 define xmisctype
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
76 output (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($.i & $valmask) | gdb_data_seg_bits))->type)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
77 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
78 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
79 document xmisctype
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
80 Print the specific type of $, assuming it is some misc type.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
81 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
82
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
83 define xint
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
84 print (($.i & $valmask) << $nonvalbits) >> $nonvalbits
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
85 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
86 document xint
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
87 Print $, assuming it is an Emacs Lisp integer. This gets the sign right.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
88 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
89
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
90 define xptr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
91 print (void *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
92 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
93 document xptr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
94 Print the pointer portion of $, assuming it is an Emacs Lisp value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
95 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
96
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
97 define xmarker
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
98 print (struct Lisp_Marker *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
99 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
100 document xmarker
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
101 Print $ as a marker pointer, assuming it is an Emacs Lisp marker value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
102 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
103
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
104 define xoverlay
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
105 print (struct Lisp_Overlay *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
106 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
107 document xoverlay
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
108 Print $ as a overlay pointer, assuming it is an Emacs Lisp overlay value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
109 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
110
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
111 define xmiscfree
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
112 print (struct Lisp_Free *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
113 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
114 document xmiscfree
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
115 Print $ as a misc free-cell pointer, assuming it is an Emacs Lisp Misc value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
116 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
117
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
118 define xintfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
119 print (struct Lisp_Intfwd *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
120 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
121 document xintfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
122 Print $ as an integer forwarding pointer, assuming it is an Emacs Lisp Misc value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
123 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
124
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
125 define xboolfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
126 print (struct Lisp_Boolfwd *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
127 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
128 document xboolfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
129 Print $ as a boolean forwarding pointer, assuming it is an Emacs Lisp Misc value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
130 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
131
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
132 define xobjfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
133 print (struct Lisp_Objfwd *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
134 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
135 document xobjfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
136 Print $ as an object forwarding pointer, assuming it is an Emacs Lisp Misc value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
137 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
138
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
139 define xbufobjfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
140 print (struct Lisp_Buffer_Objfwd *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
141 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
142 document xbufobjfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
143 Print $ as a buffer-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
144 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
145
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
146 define xkbobjfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
147 print (struct Lisp_Kboard_Objfwd *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
148 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
149 document xkbobjfwd
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
150 Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
151 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
152
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
153 define xbuflocal
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
154 print (struct Lisp_Buffer_Local_Value *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
155 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
156 document xbuflocal
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
157 Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
158 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
159
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
160 define xsymbol
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
161 print (struct Lisp_Symbol *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
162 xprintsymptr $
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
163 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
164 document xsymbol
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
165 Print the name and address of the symbol $.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
166 This command assumes that $ is an Emacs Lisp symbol value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
167 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
168
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
169 define xstring
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
170 print (struct Lisp_String *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
171 output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
172 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
173 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
174 document xstring
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
175 Print the contents and address of the string $.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
176 This command assumes that $ is an Emacs Lisp string value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
177 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
178
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
179 define xvector
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
180 print (struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
181 output ($->size > 50) ? 0 : ($->contents[0])@($->size)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
182 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
183 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
184 document xvector
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
185 Print the contents and address of the vector $.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
186 This command assumes that $ is an Emacs Lisp vector value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
187 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
188
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
189 define xprocess
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
190 print (struct Lisp_Process *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
191 output *$
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
192 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
193 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
194 document xprocess
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
195 Print the address of the struct Lisp_process which the Lisp_Object $ points to.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
196 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
197
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
198 define xframe
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
199 print (struct frame *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
200 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
201 document xframe
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
202 Print $ as a frame pointer, assuming it is an Emacs Lisp frame value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
203 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
204
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
205 define xcompiled
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
206 print (struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
207 output ($->contents[0])@($->size & 0xff)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
208 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
209 document xcompiled
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
210 Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
211 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
212
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
213 define xwindow
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
214 print (struct window *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
215 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
216 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
217 document xwindow
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
218 Print $ as a window pointer, assuming it is an Emacs Lisp window value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
219 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
220 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
221
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
222 define xwinconfig
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
223 print (struct save_window_data *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
224 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
225 document xwinconfig
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
226 Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
227 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
228
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
229 define xsubr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
230 print (struct Lisp_Subr *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
231 output *$
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
232 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
233 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
234 document xsubr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
235 Print the address of the subr which the Lisp_Object $ points to.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
236 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
237
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
238 define xchartable
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
239 print (struct Lisp_Char_Table *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
240 printf "Purpose: "
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
241 output (char*)&((struct Lisp_Symbol *) (($->purpose.i & $valmask) | gdb_data_seg_bits))->name->data
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
242 printf " %d extra slots", ($->size & 0x1ff) - 388
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
243 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
244 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
245 document xchartable
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
246 Print the address of the char-table $, and its purpose.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
247 This command assumes that $ is an Emacs Lisp char-table value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
248 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
249
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
250 define xboolvector
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
251 print (struct Lisp_Bool_Vector *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
252 output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
253 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
254 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
255 document xboolvector
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
256 Print the contents and address of the bool-vector $.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
257 This command assumes that $ is an Emacs Lisp bool-vector value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
258 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
259
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
260 define xbuffer
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
261 print (struct buffer *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
262 output ((struct Lisp_String *) (($->name.i & $valmask) | gdb_data_seg_bits))->data
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
263 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
264 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
265 document xbuffer
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
266 Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
267 Print the name of the buffer.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
268 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
269
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
270 define xhashtable
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
271 print (struct Lisp_Hash_Table *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
272 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
273 document xhashtable
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
274 Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
275 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
276
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
277 define xcons
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
278 print (struct Lisp_Cons *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
279 output/x *$
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
280 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
281 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
282 document xcons
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
283 Print the contents of $, assuming it is an Emacs Lisp cons.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
284 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
285
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
286 define nextcons
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
287 p $.cdr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
288 xcons
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
289 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
290 document nextcons
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
291 Print the contents of the next cell in a list.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
292 This assumes that the last thing you printed was a cons cell contents
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
293 (type struct Lisp_Cons) or a pointer to one.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
294 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
295
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
296 define xcar
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
297 print/x ((($.i >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($.i & $valmask) | gdb_data_seg_bits))->car : 0)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
298 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
299 document xcar
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
300 Print the car of $, assuming it is an Emacs Lisp pair.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
301 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
302
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
303 define xcdr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
304 print/x ((($.i >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($.i & $valmask) | gdb_data_seg_bits))->cdr : 0)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
305 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
306 document xcdr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
307 Print the cdr of $, assuming it is an Emacs Lisp pair.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
308 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
309
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
310 define xfloat
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
311 print ((struct Lisp_Float *) (($.i & $valmask) | gdb_data_seg_bits))->data
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
312 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
313 document xfloat
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
314 Print $ assuming it is a lisp floating-point number.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
315 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
316
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
317 define xscrollbar
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
318 print (struct scrollbar *) (($.i & $valmask) | gdb_data_seg_bits)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
319 output *$
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
320 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
321 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
322 document xscrollbar
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
323 Print $ as a scrollbar pointer.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
324 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
325
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
326 define xprintsym
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
327 set $sym = ((struct Lisp_Symbol *) (($arg0.i & $valmask) | gdb_data_seg_bits))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
328 xprintsymptr $sym
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
329 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
330 document xprintsym
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
331 Print argument as a symbol.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
332 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
333 define xprintsymptr
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
334 set $sym = $arg0
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
335 set $sym_name = ((struct Lisp_String *)(($sym->xname.i & $valmask) | gdb_data_seg_bits))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
336 output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size : $sym_name->size_byte)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
337 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
338 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
339
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
340 define xbacktrace
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
341 set $bt = backtrace_list
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
342 while $bt
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
343 set $type = (enum Lisp_Type) (((*$bt->function).i >> gdb_valbits) & 0x7)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
344 if $type == Lisp_Symbol
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
345 xprintsym (*$bt->function)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
346 else
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
347 printf "0x%x ", (*$bt->function).i
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
348 if $type == Lisp_Vectorlike
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
349 set $size = ((struct Lisp_Vector *) (((*$bt->function).i & $valmask) | gdb_data_seg_bits))->size
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
350 output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
351 else
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
352 printf "Lisp type %d", $type
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
353 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
354 echo \n
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
355 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
356 set $bt = $bt->next
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
357 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
358 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
359 document xbacktrace
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
360 Print a backtrace of Lisp function calls from backtrace_list.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
361 Set a breakpoint at Fsignal and call this to see from where
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
362 an error was signaled.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
363 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
364
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
365 define xreload
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
366 set $valmask = ((long)1 << gdb_valbits) - 1
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
367 set $nonvalbits = gdb_emacs_intbits - gdb_valbits
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
368 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
369 document xreload
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
370 When starting Emacs a second time in the same gdb session under
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
371 FreeBSD 2.2.5, gdb 4.13, $valmask and $nonvalbits have lost
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
372 their values. (The same happens on current (2000) versions of GNU/Linux
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
373 with gdb 5.0.)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
374 This function reloads them.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
375 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
376
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
377 define hook-run
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
378 xreload
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
379 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
380
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
381 # Call xreload if a new Emacs executable is loaded.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
382 define hookpost-run
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
383 xreload
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
384 end
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
385
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
386 set print pretty on
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
387 set print sevenbit-strings
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
388
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
389 # show environment DISPLAY
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
390 # show environment TERM
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
391 # set args -geometry 80x40+0+0
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
392
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
393 # Don't let abort actually run, as it will make
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
394 # stdio stop working and therefore the `pr' command above as well.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
395 # break abort
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
396
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
397 # If we are running in synchronous mode, we want a chance to look around
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
398 # before Emacs exits. Perhaps we should put the break somewhere else
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
399 # instead...
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
400 # break x_error_quitter
|