annotate src/gdbinit @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children c5d627a313b1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 # Some useful commands for debugging emacs with gdb 4.14.* or better.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 # Install this as your .gdbinit file in your home directory.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 # If you have an older version of gdb 4.x, consider using the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 # file "gdbinit.pre-4.14" in the XEmacs src directory.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 # If you're one of the few who has an XEmacs compiled with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 # --use-union-type, you'll need to use the file "gdbinit.union".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 # Currently that file is of the pre-4.14 variety, but it should
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 # be easy to update it to 4.14+, along the same lines as this file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 #
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 # See also question 2.1.15 of the XEmacs FAQ, titled
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 # "How to Debug an XEmacs problem with a debugger".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 set print union off
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 set print pretty off
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 define temacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 run -batch -l loadup.el run-temacs -q
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 echo \n>>> Use the `temacs' command to run temacs\n\n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 # if you use Purify, do this:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 # set env PURIFYOPTIONS -pointer-mask=0x0fffffff
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ################ Print using the Lisp printer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 define p1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 call debug_print ($arg0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 printf "\n"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 define lbt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 # "&" to compensate for GDB struct-passing bug
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 # but I've removed the &'s because it doesn't work with my GDB,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 # and not having them works fine.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 call Fbacktrace (Qexternal_debugging_output, Qt)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 ################ Print using GDB built-ins
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 define xint
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 print ((int)($arg0 << 4))>>4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 define xbitvec
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 print (struct Lisp_Bit_Vector *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 define xbuffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 print (struct buffer *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 define xbytecode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 print (struct Lisp_Bytecode *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 define xcharset
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 print (struct Lisp_Charset *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 define xchartab
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 print (struct Lisp_Char_Table *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 define xchartabentry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 print (struct Lisp_Char_Table_Entry *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 define xcodesys
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 print (struct Lisp_Coding_System *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 define xcolorinst
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 print (struct Lisp_Color_Instance *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 define xcons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 print (struct Lisp_Cons *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 define xdevice
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 print (struct device *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 define xevent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 print (struct Lisp_Event *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 define xextent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 print (struct extent *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 define xextentaux
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 print (struct extent_auxiliary *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 define xextentinfo
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 print (struct extent_info *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 define xfloat
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 print (struct Lisp_Float *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 output (double) $arg0->data.d
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 echo \n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 define xfontinst
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 print (struct Lisp_Font_Instance *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 define xframe
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 print (struct frame *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 define xglyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 print (struct Lisp_Glyph *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 define xhashtable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 print (struct hashtable_struct *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 define ximageinst
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 print (struct Lisp_Image_Instance *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 define xkeymap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 print (struct keymap *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 define xlstream
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 print (struct lstream *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 define xmarker
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 print (struct Lisp_Marker *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 define xmenubardata
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 print (struct menubar_data *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 define xopaque
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 print (struct Lisp_Opaque *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 define xprocess
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 print (struct Lisp_Process *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 define xrangetab
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 print (struct Lisp_Range_Table *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 define xspec
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 print (struct Lisp_Specifier *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 define xstring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 print (struct Lisp_String *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 output (char *) $arg0->_data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 echo \n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 define xsubr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 print (struct Lisp_Subr *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 define xsubwindow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 print (struct Lisp_Subwindow *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 define xsymbol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 set $tem = (struct Lisp_Symbol *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 output $tem->name->_data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 printf "\n"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 print $tem
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 define xtoolbarbutton
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 print (struct toolbar_button *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 define xtoolbardata
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 print (struct toolbar_data *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 define xtooltalkmess
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 print (struct Lisp_Tooltalk_Message *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 define xtooltalkpatt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 print (struct Lisp_Tooltalk_Pattern *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 define xvector
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 print (struct Lisp_Vector *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 define xwindow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 print (struct window *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 define xwindowconfig
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 print (struct window_config *) ($arg0 & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 define xrecord
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 print ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 output (((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation->name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 echo \n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_symbol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 xsymbol $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_extent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 xextent $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_marker
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 xmarker $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_event
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 xevent $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 xbuffer $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 xwindow $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_frame
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 xframe $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_device
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 xdevice $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_console
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 xconsole $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_process
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 xprocess $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_subr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 xsubr $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_compiled_function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 xbytecode $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_window_configuration
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 xwindowconfig $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_float
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 xfloat $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_opaque
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 xopaque $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 xglyph $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_keymap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 xkeymap $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_lstream
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 xlstream $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 if ((struct lrecord_header *) ($arg0 & 0xFFFFFFF))->implementation == lrecord_bit_vector
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 xbitvec $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 define frob
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 if (enum Lisp_Type) (($arg0 >> 28) & 7) == Lisp_Int
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 xint $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 if (enum Lisp_Type) (($arg0 >> 28) & 7) == Lisp_String
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 xstring $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 if (enum Lisp_Type) (($arg0 >> 28) & 7) == Lisp_Cons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297 xcons $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 if (enum Lisp_Type) (($arg0 >> 28) & 7) == Lisp_Vector
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 xvector $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 if (enum Lisp_Type) (($arg0 >> 28) & 7) == Lisp_Record
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 xrecord $arg0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 printf "Unknown type?\n"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 ################ Miscellaneous
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 define xtype
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 # this is really xgctype, as we mask off the mark bit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 output (enum Lisp_Type) (($arg0 >> 28) & 7)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 echo \n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 define xmarkbit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 print ($arg0 >> 31)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 define nilp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 print $arg0 == Qnil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 define xcar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 frob ((struct Lisp_Cons *) ($arg0 & 0xFFFFFFF))->car
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 define xcdr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 frob ((struct Lisp_Cons *) ($arg0 & 0xFFFFFFF))->cdr
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 set $vector_length_mask = ~(1<<31)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 define string-length
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 print ((struct Lisp_String *) ($arg0 & 0xFFFFFFF))->_size & $vector_length_mask
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 define string-contents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 print (char *) ((struct Lisp_String *) ($ & 0xFFFFFFF))->_data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 define vector-length
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 print ((struct Lisp_Vector *) ($ & 0xFFFFFFF))->size & $vector_length_mask
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 define vector-contents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 set $tem = (struct Lisp_Vector *) ($ & 0xFFFFFFF)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 print *($tem->contents) @ ($tem->size & $vector_length_mask)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 set $ = $tem->contents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357 define symbol-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 set $tem = ((struct Lisp_Symbol *) ($ & 0xFFFFFFF))->name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 # output *($tem->_data) @ ($tem->_size & $vector_length_mask)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 output ($tem->_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 echo \n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 set $type = Lisp_String
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 echo \n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 define symbol-value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 set $tem = ((struct Lisp_Symbol *) ($ & 0xFFFFFFF))->value
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 define symbol-function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 set $tem = ((struct Lisp_Symbol *) ($ & 0xFFFFFFF))->function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 define symbol-plist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 set $tem = ((struct Lisp_Symbol *) ($ & 0xFFFFFFF))->plist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 define wtype
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 p $->core.widget_class->core_class.class_name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 define xtname
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 print XrmQuarkToString(((Object)($))->object.xrm_name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 #
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387 # GDB, with the losing command-line parser that it has,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 # cannot handle nested blocks.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 #
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 define breaks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 br Fsignal
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 # command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 # bt 3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 # p sig
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 # xsymbol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 # end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 br Fkill_emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 # command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 # bt 3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 # end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 br assertion_failed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 # command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 # bt 3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 # end
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 end