Mercurial > hg > xemacs-beta
annotate src/.gdbinit.in.in @ 5720:1d6995b6986e
Add and use `font-lock-extend-region-functions'.
2013-02-20 Michael Sperber <mike@xemacs.org>
* font-lock.el (font-lock-beg)
(font-lock-extend-region-functions)
(font-lock-extend-region-multiline)
(font-lock-extend-region-wholelines)
(font-lock-default-fontify-region): Add and use
`font-lock-extend-region-functions' from GNU Emacs.
author | Mike Sperber <sperber@deinprogramm.de> |
---|---|
date | Wed, 20 Feb 2013 11:09:08 +0100 |
parents | f4d74be74462 |
children | 5423bb35a956 |
rev | line source |
---|---|
3418 | 1 ## gdb init file for XEmacs -*- ksh -*- |
2 ## This is the source for src/.gdbinit. Edit it, and rerun configure. | |
3 ## (Running config.status is not enough.) | |
4 ## The generated file depends on src/config.h (currently only in one place). | |
5 | |
6 ## To insert comments that will remain in the generated file, we use the | |
7 ## imake XCOMM convention. Lines beginning with "XCOMM " exactly (no | |
8 ## leading whitespace, one trailing ASCII space, case sensitive) will be | |
9 ## transformed to gdb command file comments in the generated file. | |
10 | |
11 XCOMM gdb init file for XEmacs | |
12 XCOMM AUTOMATICALLY GENERATED FROM etc/gdbinit.in BY configure -- DO NOT EDIT. | |
13 XCOMM See etc/gdbinit.in for licensing information and usage hints. | |
14 XCOMM Copyright (C) 1998 Free Software Foundation, Inc. | |
4939
349f01075eb7
build fixes for gdbinit and config-dependent elc files
Ben Wing <ben@xemacs.org>
parents:
4935
diff
changeset
|
15 XCOMM Copyright (C) 2010 Ben Wing. |
3418 | 16 |
17 ## This file is part of XEmacs. | |
18 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5069
diff
changeset
|
19 ## XEmacs is free software: you can redistribute it and/or modify it |
3418 | 20 ## under the terms of the GNU General Public License as published by the |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5069
diff
changeset
|
21 ## Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5069
diff
changeset
|
22 ## option) any later version. |
3418 | 23 |
24 ## XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
25 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
26 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
27 ## for more details. | |
28 | |
29 ## You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5069
diff
changeset
|
30 ## along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
3418 | 31 |
32 ## Author: Martin Buchholz | |
33 | |
34 ## Other contributors you could ask for help: Ivan Golubev, Jerry James, | |
35 ## Stephen Turnbull. | |
36 | |
37 ## Some useful commands for debugging emacs with gdb 4.16 or better. | |
38 ## | |
39 ## Since this file is called `.gdbinit', it will be read by gdb | |
40 ## automatically when gdb is run in the build directory, which is where | |
41 ## developers usually debug their xemacs. You can also source this | |
42 ## file from your ~/.gdbinit, if you like. | |
43 ## | |
44 ## Configure xemacs with --debug, and compile with -g. | |
45 ## | |
46 ## See also the question of the XEmacs FAQ, titled | |
47 ## "How to Debug an XEmacs problem with a debugger". | |
48 ## | |
49 ## This can be used to debug XEmacs no matter how the following are | |
50 ## specified: | |
51 | |
52 ## USE_UNION_TYPE | |
53 | |
54 ## (the above all have configure equivalents) | |
55 | |
56 ## Some functions defined here require a running process, but most | |
57 ## don't. Considerable effort has been expended to this end. | |
58 | |
59 ## See the dbg_ C support code in src/alloc.c that allows the functions | |
60 ## defined in this file to work correctly. | |
61 | |
62 #define NOT_C_CODE | |
63 #include "config.h" | |
64 | |
65 set print union off | |
66 set print pretty off | |
67 | |
68 #ifdef VDB_POSIX | |
69 handle SIGSEGV SIGBUS nostop noprint | |
70 #endif | |
71 | |
72 set $Lisp_Type_Int = -2 | |
4643
e9ccbc62f7e7
Don't rely on GDB understanding the Lisp_Type_{Record,Char} enums, gdbinit.in
Aidan Kehoe <kehoea@parhasard.net>
parents:
3934
diff
changeset
|
73 set $Lisp_Type_Record = 0 |
e9ccbc62f7e7
Don't rely on GDB understanding the Lisp_Type_{Record,Char} enums, gdbinit.in
Aidan Kehoe <kehoea@parhasard.net>
parents:
3934
diff
changeset
|
74 set $Lisp_Type_Char = 2 |
3418 | 75 |
76 define decode_object | |
77 set $obj = (unsigned long) $arg0 | |
78 if $obj & 1 | |
79 ## It's an int | |
80 set $val = $obj >> 1 | |
81 set $type = $Lisp_Type_Int | |
82 else | |
83 set $type = $obj & dbg_typemask | |
4643
e9ccbc62f7e7
Don't rely on GDB understanding the Lisp_Type_{Record,Char} enums, gdbinit.in
Aidan Kehoe <kehoea@parhasard.net>
parents:
3934
diff
changeset
|
84 if $type == $Lisp_Type_Char |
3418 | 85 set $val = ($obj & dbg_valmask) >> dbg_gctypebits |
86 else | |
87 ## It's a record pointer | |
88 set $val = $obj | |
89 end | |
90 end | |
91 | |
4643
e9ccbc62f7e7
Don't rely on GDB understanding the Lisp_Type_{Record,Char} enums, gdbinit.in
Aidan Kehoe <kehoea@parhasard.net>
parents:
3934
diff
changeset
|
92 if $type == $Lisp_Type_Record |
3418 | 93 set $lheader = ((struct lrecord_header *) $val) |
94 set $lrecord_type = ($lheader->type) | |
95 set $imp = ((struct lrecord_implementation *) lrecord_implementations_table[(int) $lrecord_type]) | |
96 else | |
97 set $lrecord_type = -1 | |
98 set $lheader = -1 | |
99 set $imp = -1 | |
100 end | |
101 end | |
102 | |
103 document decode_object | |
104 Usage: decode_object lisp_object | |
105 Extract implementation information from a Lisp Object. | |
106 Defines variables $val, $type and $imp. | |
107 end | |
108 | |
109 define xint | |
110 decode_object $arg0 | |
111 print ((long) $val) | |
112 end | |
113 | |
114 define xtype | |
115 decode_object $arg0 | |
116 if $type == $Lisp_Type_Int | |
117 echo int\n | |
118 else | |
4643
e9ccbc62f7e7
Don't rely on GDB understanding the Lisp_Type_{Record,Char} enums, gdbinit.in
Aidan Kehoe <kehoea@parhasard.net>
parents:
3934
diff
changeset
|
119 if $type == $Lisp_Type_Char |
3418 | 120 echo char\n |
121 else | |
122 printf "record type: %s\n", $imp->name | |
123 end | |
124 end | |
125 end | |
126 | |
127 document xtype | |
128 Usage: xtype lisp_object | |
129 Print the Lisp type of a lisp object. | |
130 end | |
131 | |
132 define lisp-shadows | |
133 run -batch -vanilla -f list-load-path-shadows | |
134 end | |
135 | |
136 document lisp-shadows | |
137 Usage: lisp-shadows | |
138 Run xemacs to check for lisp shadows | |
139 end | |
140 | |
141 define environment-to-run-temacs | |
142 unset env EMACSLOADPATH | |
4939
349f01075eb7
build fixes for gdbinit and config-dependent elc files
Ben Wing <ben@xemacs.org>
parents:
4935
diff
changeset
|
143 set env EMACSBOOTSTRAPLOADPATH=@srcdir@/../lisp/:@srcdir@/.. |
3418 | 144 set env EMACSBOOTSTRAPMODULEPATH=../modules/:.. |
145 end | |
146 | |
147 define run-temacs | |
148 environment-to-run-temacs | |
4939
349f01075eb7
build fixes for gdbinit and config-dependent elc files
Ben Wing <ben@xemacs.org>
parents:
4935
diff
changeset
|
149 run -nd -no-packages -batch -l @srcdir@/../lisp/loadup.el run-temacs -q |
3418 | 150 end |
151 | |
152 document run-temacs | |
153 Usage: run-temacs | |
154 Run temacs interactively, like xemacs. | |
155 Use this with debugging tools (like purify) that cannot deal with dumping, | |
156 or when temacs builds successfully, but xemacs does not. | |
157 end | |
158 | |
4951 | 159 define check-xemacs-arg |
5069
14f0dd1fabdb
move test-harness to lisp/ directory so it gets byte-compiled
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
160 run -vanilla -batch -l test-harness -f batch-test-emacs @srcdir@/../tests/$arg0 |
4951 | 161 end |
162 | |
3418 | 163 define check-xemacs |
4951 | 164 if $argc == 0 |
165 check-xemacs-arg automated | |
166 else | |
167 check-xemacs-arg automated/$arg0 | |
168 end | |
3418 | 169 end |
170 | |
171 document check-xemacs | |
4951 | 172 Usage: check-xemacs [FILE] |
173 Run the test suite. If no file given, run the whole suite, equivalent to | |
174 'make check'. If a file given, run the suite only on the specified file. | |
3418 | 175 end |
176 | |
4951 | 177 define check-temacs-arg |
3418 | 178 environment-to-run-temacs |
5069
14f0dd1fabdb
move test-harness to lisp/ directory so it gets byte-compiled
Ben Wing <ben@xemacs.org>
parents:
4953
diff
changeset
|
179 run -nd -no-packages -batch -l @srcdir@/../lisp/loadup.el run-temacs -q -batch -l test-harness -f batch-test-emacs @srcdir@/../tests/$arg0 |
4951 | 180 |
181 define check-temacs | |
182 if $argc == 0 | |
183 check-temacs-arg automated | |
184 else | |
185 check-temacs-arg automated/$arg0 | |
186 end | |
3418 | 187 end |
188 | |
189 document check-temacs | |
4951 | 190 Usage: check-temacs [FILE] |
191 Run the test suite on temacs. If no file given, run the whole suite, | |
192 equivalent to 'make check-temacs'. If a file given, run the suite only on | |
193 the specified file. | |
194 | |
3418 | 195 Use this with debugging tools (like purify) that cannot deal with dumping, |
196 or when temacs builds successfully, but xemacs does not. | |
197 end | |
198 | |
199 define update-elc | |
200 environment-to-run-temacs | |
4939
349f01075eb7
build fixes for gdbinit and config-dependent elc files
Ben Wing <ben@xemacs.org>
parents:
4935
diff
changeset
|
201 run -nd -no-packages -batch -l @srcdir@/../lisp/update-elc.el |
3418 | 202 end |
203 | |
204 document update-elc | |
205 Usage: update-elc | |
206 Run the core lisp byte compilation part of the build procedure. | |
207 Use when debugging temacs, not xemacs! | |
208 Use this when temacs builds successfully, but xemacs does not. | |
209 end | |
210 | |
4935
7ef913bf3c9a
modify gdbinit to track Makefile.in.in, add command for update-elc-2
Ben Wing <ben@xemacs.org>
parents:
4643
diff
changeset
|
211 define update-elc-2 |
7ef913bf3c9a
modify gdbinit to track Makefile.in.in, add command for update-elc-2
Ben Wing <ben@xemacs.org>
parents:
4643
diff
changeset
|
212 environment-to-run-temacs |
4939
349f01075eb7
build fixes for gdbinit and config-dependent elc files
Ben Wing <ben@xemacs.org>
parents:
4935
diff
changeset
|
213 run -no-packages -batch -no-autoloads -l update-elc-2.el -f batch-update-elc-2 @srcdir@/../lisp |
4935
7ef913bf3c9a
modify gdbinit to track Makefile.in.in, add command for update-elc-2
Ben Wing <ben@xemacs.org>
parents:
4643
diff
changeset
|
214 end |
7ef913bf3c9a
modify gdbinit to track Makefile.in.in, add command for update-elc-2
Ben Wing <ben@xemacs.org>
parents:
4643
diff
changeset
|
215 |
7ef913bf3c9a
modify gdbinit to track Makefile.in.in, add command for update-elc-2
Ben Wing <ben@xemacs.org>
parents:
4643
diff
changeset
|
216 document update-elc-2 |
7ef913bf3c9a
modify gdbinit to track Makefile.in.in, add command for update-elc-2
Ben Wing <ben@xemacs.org>
parents:
4643
diff
changeset
|
217 Usage: update-elc-2 |
7ef913bf3c9a
modify gdbinit to track Makefile.in.in, add command for update-elc-2
Ben Wing <ben@xemacs.org>
parents:
4643
diff
changeset
|
218 Run the post-dump core lisp byte compilation part of the build procedure. |
7ef913bf3c9a
modify gdbinit to track Makefile.in.in, add command for update-elc-2
Ben Wing <ben@xemacs.org>
parents:
4643
diff
changeset
|
219 end |
7ef913bf3c9a
modify gdbinit to track Makefile.in.in, add command for update-elc-2
Ben Wing <ben@xemacs.org>
parents:
4643
diff
changeset
|
220 |
3418 | 221 define dmp |
222 environment-to-run-temacs | |
4939
349f01075eb7
build fixes for gdbinit and config-dependent elc files
Ben Wing <ben@xemacs.org>
parents:
4935
diff
changeset
|
223 run -nd -no-packages -batch -l @srcdir@/../lisp/loadup.el dump |
3418 | 224 end |
225 | |
226 document dmp | |
227 Usage: dmp | |
228 Run the dumping part of the build procedure. | |
229 Use when debugging temacs, not xemacs! | |
230 Use this when temacs builds successfully, but xemacs does not. | |
231 end | |
232 | |
233 define ldp | |
234 printf "%s", "Lisp => " | |
235 call debug_print($arg0) | |
236 end | |
237 | |
238 document ldp | |
239 Usage: ldp lisp_object | |
240 Print a Lisp Object value using the Lisp printer. | |
241 Requires a running xemacs process. | |
242 end | |
243 | |
244 define lbt | |
245 call debug_backtrace() | |
246 end | |
247 | |
248 document lbt | |
249 Usage: lbt | |
250 Print the current Lisp stack trace. | |
251 Requires a running xemacs process. | |
252 end | |
253 | |
254 | |
255 define leval | |
4953
304aebb79cd3
function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents:
4951
diff
changeset
|
256 ldp Feval(Fcar(Fread_from_string(build_cistring($arg0),Qnil,Qnil))) |
3418 | 257 end |
258 | |
259 document leval | |
260 Usage: leval "SEXP" | |
261 Eval a lisp expression. | |
262 Requires a running xemacs process. | |
263 | |
264 Example: | |
265 (gdb) leval "(+ 1 2)" | |
266 Lisp ==> 3 | |
267 end | |
268 | |
269 | |
270 define wtype | |
271 print $arg0->core.widget_class->core_class.class_name | |
272 end | |
273 | |
274 define xtname | |
275 print XrmQuarkToString(((Object)($arg0))->object.xrm_name) | |
276 end | |
277 | |
278 ## GDB's command language makes you want to ... | |
279 | |
280 define pptype | |
281 set $type_ptr = ($arg0 *) $val | |
282 print $type_ptr | |
283 print *$type_ptr | |
284 end | |
285 | |
286 define pstructtype | |
287 set $type_ptr = (struct $arg0 *) $val | |
288 print $type_ptr | |
289 print *$type_ptr | |
290 end | |
291 | |
292 define pobj | |
293 decode_object $arg0 | |
294 if $type == $Lisp_Type_Int | |
295 printf "Integer: %d\n", $val | |
296 else | |
4643
e9ccbc62f7e7
Don't rely on GDB understanding the Lisp_Type_{Record,Char} enums, gdbinit.in
Aidan Kehoe <kehoea@parhasard.net>
parents:
3934
diff
changeset
|
297 if $type == $Lisp_Type_Char |
3418 | 298 if $val > 32 && $val < 128 |
299 printf "Char: %c\n", $val | |
300 else | |
301 printf "Char: %d\n", $val | |
302 end | |
303 else | |
304 if $lrecord_type == lrecord_type_string | |
305 pptype Lisp_String | |
306 else | |
307 if $lrecord_type == lrecord_type_cons | |
308 pptype Lisp_Cons | |
309 else | |
310 if $lrecord_type == lrecord_type_symbol | |
311 pptype Lisp_Symbol | |
5641
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
312 #ifdef NEW_GC |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
313 set $val = ((Lisp_String *)$type_ptr->name)->data_object |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
314 decode_object $val |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
315 if $lrecord_type == lrecord_type_string_indirect_data |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
316 printf "Symbol name: %s\n", ((Lisp_String_Indirect_Data *)$val)->data |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
317 else |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
318 if $lrecord_type == lrecord_type_string_direct_data |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
319 printf "Symbol name: %s\n", ((Lisp_String_Direct_Data *)$val)->data |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
320 end |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
321 end |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
322 #else |
3418 | 323 printf "Symbol name: %s\n", ((Lisp_String *)$type_ptr->name)->data_ |
5641
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
324 #endif |
3418 | 325 else |
326 if $lrecord_type == lrecord_type_vector | |
327 pptype Lisp_Vector | |
328 printf "Vector of length %d\n", $type_ptr->size | |
329 ##print *($type_ptr->data) @ $type_ptr->size | |
330 else | |
331 if $lrecord_type == lrecord_type_bit_vector | |
332 pptype Lisp_Bit_Vector | |
333 else | |
334 if $lrecord_type == lrecord_type_buffer | |
335 pstructtype buffer | |
336 else | |
337 if $lrecord_type == lrecord_type_char_table | |
338 pptype Lisp_Char_Table | |
339 else | |
340 if $lrecord_type == lrecord_type_char_table_entry | |
341 pptype Lisp_Char_Table_Entry | |
342 else | |
343 if $lrecord_type == lrecord_type_charset | |
344 pptype Lisp_Charset | |
345 else | |
346 if $lrecord_type == lrecord_type_coding_system | |
347 pptype Lisp_Coding_System | |
348 else | |
349 if $lrecord_type == lrecord_type_color_instance | |
350 pptype Lisp_Color_Instance | |
351 else | |
352 if $lrecord_type == lrecord_type_command_builder | |
353 pptype command_builder | |
354 else | |
355 if $lrecord_type == lrecord_type_compiled_function | |
356 pptype Lisp_Compiled_Function | |
357 else | |
358 if $lrecord_type == lrecord_type_console | |
359 pstructtype console | |
360 else | |
361 if $lrecord_type == lrecord_type_database | |
362 pptype Lisp_Database | |
363 else | |
364 if $lrecord_type == lrecord_type_device | |
365 pstructtype device | |
366 else | |
367 if $lrecord_type == lrecord_type_event | |
368 pptype Lisp_Event | |
369 else | |
370 if $lrecord_type == lrecord_type_extent | |
371 pstructtype extent | |
372 else | |
373 if $lrecord_type == lrecord_type_extent_auxiliary | |
374 pstructtype extent_auxiliary | |
375 else | |
376 if $lrecord_type == lrecord_type_extent_info | |
377 pstructtype extent_info | |
378 else | |
379 if $lrecord_type == lrecord_type_face | |
380 pptype Lisp_Face | |
381 else | |
382 if $lrecord_type == lrecord_type_float | |
383 pptype Lisp_Float | |
384 else | |
385 if $lrecord_type == lrecord_type_font_instance | |
386 pptype Lisp_Font_Instance | |
387 else | |
388 if $lrecord_type == lrecord_type_frame | |
389 pstructtype frame | |
390 else | |
391 if $lrecord_type == lrecord_type_glyph | |
392 pptype Lisp_Glyph | |
393 else | |
394 if $lrecord_type == lrecord_type_gui_item | |
395 pptype Lisp_Gui_Item | |
396 else | |
397 if $lrecord_type == lrecord_type_hash_table | |
398 pptype Lisp_Hash_Table | |
399 else | |
400 if $lrecord_type == lrecord_type_image_instance | |
401 pptype Lisp_Image_Instance | |
402 else | |
403 if $lrecord_type == lrecord_type_keymap | |
404 pptype Lisp_Keymap | |
405 else | |
406 if $lrecord_type == lrecord_type_ldap | |
407 pptype Lisp_LDAP | |
408 else | |
409 if $lrecord_type == lrecord_type_lstream | |
410 pstructtype lstream | |
411 else | |
412 if $lrecord_type == lrecord_type_marker | |
413 pptype Lisp_Marker | |
414 else | |
415 if $lrecord_type == lrecord_type_opaque | |
416 pptype Lisp_Opaque | |
417 else | |
418 if $lrecord_type == lrecord_type_opaque_ptr | |
419 pptype Lisp_Opaque_Ptr | |
420 else | |
421 if $lrecord_type == lrecord_type_process | |
422 pptype Lisp_Process | |
423 else | |
424 if $lrecord_type == lrecord_type_range_table | |
425 pptype Lisp_Range_Table | |
426 else | |
427 if $lrecord_type == lrecord_type_specifier | |
428 pptype Lisp_Specifier | |
429 else | |
430 if $lrecord_type == lrecord_type_subr | |
431 pptype Lisp_Subr | |
432 else | |
433 if $lrecord_type == lrecord_type_symbol_value_buffer_local | |
434 pstructtype symbol_value_buffer_local | |
435 else | |
436 if $lrecord_type == lrecord_type_symbol_value_forward | |
437 pstructtype symbol_value_forward | |
438 else | |
439 if $lrecord_type == lrecord_type_symbol_value_lisp_magic | |
440 pstructtype symbol_value_lisp_magic | |
441 else | |
442 if $lrecord_type == lrecord_type_symbol_value_varalias | |
443 pstructtype symbol_value_varalias | |
444 else | |
445 if $lrecord_type == lrecord_type_timeout | |
446 pptype Lisp_Timeout | |
447 else | |
448 if $lrecord_type == lrecord_type_toolbar_button | |
449 pstructtype toolbar_button | |
450 else | |
451 if $lrecord_type == lrecord_type_tooltalk_message | |
452 pptype Lisp_Tooltalk_Message | |
453 else | |
454 if $lrecord_type == lrecord_type_tooltalk_pattern | |
455 pptype Lisp_Tooltalk_Pattern | |
456 else | |
457 if $lrecord_type == lrecord_type_weak_list | |
458 pstructtype weak_list | |
459 else | |
460 if $lrecord_type == lrecord_type_window | |
461 pstructtype window | |
462 else | |
463 if $lrecord_type == lrecord_type_fc_pattern | |
464 pstructtype fc_pattern | |
465 else | |
3934 | 466 if $lrecord_type == lrecord_type_fc_config |
467 pstructtype fc_config | |
3418 | 468 else |
5641
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
469 #ifndef NEW_GC |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
470 if $lrecord_type == lrecord_type_lcrecord_list |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
471 pstructtype lcrecord_list |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
472 else |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
473 if $lrecord_type == lrecord_type_string_direct_data |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
474 pptype Lisp_String_Direct_Data |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
475 else |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
476 if $lrecord_type == lrecord_type_string_indirect_data |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
477 pptype Lisp_String_Indirect_Data |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
478 else |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
479 #endif |
3418 | 480 echo Unknown Lisp Object type\n |
5598
bccc91a65536
Fix .gdbinit and .dbxrc when using the new garbage collector.
Marcus Crestani <crestani@informatik.uni-tuebingen.de>
parents:
5437
diff
changeset
|
481 print $lrecord_type |
3418 | 482 print $arg0 |
483 ## Barf, gag, retch | |
484 end | |
5641
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
485 #ifndef NEW_GC |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
486 end |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
487 end |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
488 end |
f4d74be74462
Fix symbol and string printing in gdb with pobj and NEW_GC. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
5598
diff
changeset
|
489 #endif |
3418 | 490 end |
491 end | |
492 end | |
493 end | |
494 end | |
495 end | |
496 end | |
497 end | |
498 end | |
499 end | |
500 end | |
501 end | |
502 end | |
503 end | |
504 end | |
505 ## Repeat after me... gdb sux, gdb sux, gdb sux... | |
506 end | |
507 end | |
508 end | |
509 end | |
510 end | |
511 end | |
512 end | |
513 end | |
514 end | |
515 end | |
516 end | |
517 end | |
518 end | |
519 end | |
520 end | |
521 end | |
522 end | |
523 end | |
524 ## Are we having fun yet?? | |
525 end | |
526 end | |
527 end | |
528 end | |
529 end | |
530 end | |
531 end | |
532 end | |
533 end | |
534 end | |
535 end | |
536 end | |
537 end | |
538 end | |
539 end | |
540 end | |
541 end | |
542 end | |
543 end | |
544 | |
545 document pobj | |
546 Usage: pobj lisp_object | |
547 Print the internal C representation of a Lisp Object. | |
548 end | |
549 | |
550 ## ------------------------------------------------------------- | |
551 ## functions to test the debugging support itself. | |
552 ## If you change this file, make sure the following still work... | |
553 ## ------------------------------------------------------------- | |
554 define test_xtype | |
555 printf "Vemacs_major_version: " | |
556 xtype Vemacs_major_version | |
557 printf "Vhelp_char: " | |
558 xtype Vhelp_char | |
559 printf "Qnil: " | |
560 xtype Qnil | |
561 printf "Qunbound: " | |
562 xtype Qunbound | |
563 printf "Vobarray: " | |
564 xtype Vobarray | |
565 printf "Vall_weak_lists: " | |
566 xtype Vall_weak_lists | |
567 printf "Vxemacs_codename: " | |
568 xtype Vxemacs_codename | |
569 end | |
570 | |
571 define test_pobj | |
572 printf "Vemacs_major_version: " | |
573 pobj Vemacs_major_version | |
574 printf "Vhelp_char: " | |
575 pobj Vhelp_char | |
576 printf "Qnil: " | |
577 pobj Qnil | |
578 printf "Qunbound: " | |
579 pobj Qunbound | |
580 printf "Vobarray: " | |
581 pobj Vobarray | |
582 printf "Vall_weak_lists: " | |
583 pobj Vall_weak_lists | |
584 printf "Vxemacs_codename: " | |
585 pobj Vxemacs_codename | |
586 end | |
587 |