annotate src/.gdbinit @ 2865:8baa2f03d853

[xemacs-hg @ 2005-07-19 09:45:00 by didierv] Face aliasing feature
author didierv
date Tue, 19 Jul 2005 09:45:23 +0000
parents ec5cb254c826
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
1 # -*- ksh -*-
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
2 # Copyright (C) 1998 Free Software Foundation, Inc.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
3
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
4 # This file is part of XEmacs.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
5
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
6 # XEmacs is free software; you can redistribute it and/or modify it
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
7 # under the terms of the GNU General Public License as published by the
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
8 # Free Software Foundation; either version 2, or (at your option) any
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
9 # later version.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
10
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
11 # XEmacs is distributed in the hope that it will be useful, but WITHOUT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
14 # for more details.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
15
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
16 # You should have received a copy of the GNU General Public License
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
17 # along with XEmacs; see the file COPYING. If not, write to
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
19 # Boston, MA 02111-1307, USA.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
20
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
21 # Author: Martin Buchholz
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
22
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
23 # Some useful commands for debugging emacs with gdb 4.16 or better.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
24 #
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
25 # Since this file is called `.gdbinit', it will be read by gdb
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
26 # automatically when gdb is run in the build directory, which is where
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
27 # developers usually debug their xemacs. You can also source this
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
28 # file from your ~/.gdbinit, if you like.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
29 #
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
30 # Configure xemacs with --debug, and compile with -g.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
31 #
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
32 # See also the question of the XEmacs FAQ, titled
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
33 # "How to Debug an XEmacs problem with a debugger".
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
34 #
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
35 # This can be used to debug XEmacs no matter how the following are
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
36 # specified:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
37
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
38 # USE_UNION_TYPE
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
39
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
40 # (the above all have configure equivalents)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
41
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
42 # Some functions defined here require a running process, but most
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
43 # don't. Considerable effort has been expended to this end.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
44
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
45 # See the dbg_ C support code in src/alloc.c that allows the functions
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
46 # defined in this file to work correctly.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
47
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
48 set print union off
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
49 set print pretty off
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
50
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
51 set $Lisp_Type_Int = -2
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
52
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
53 define decode_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
54 set $obj = (unsigned long) $arg0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
55 if $obj & 1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
56 # It's an int
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
57 set $val = $obj >> 1
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
58 set $type = $Lisp_Type_Int
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
59 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
60 set $type = $obj & dbg_typemask
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
61 if $type == Lisp_Type_Char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
62 set $val = ($obj & dbg_valmask) >> dbg_gctypebits
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
63 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
64 # It's a record pointer
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
65 set $val = $obj
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
66 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
67 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
68
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
69 if $type == Lisp_Type_Record
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
70 set $lheader = ((struct lrecord_header *) $val)
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
71 set $lrecord_type = ($lheader->type)
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 454
diff changeset
72 set $imp = ((struct lrecord_implementation *) lrecord_implementations_table[(int) $lrecord_type])
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
73 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
74 set $lrecord_type = -1
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
75 set $lheader = -1
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
76 set $imp = -1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
77 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
78 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
79
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
80 document decode_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
81 Usage: decode_object lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
82 Extract implementation information from a Lisp Object.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
83 Defines variables $val, $type and $imp.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
84 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
85
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
86 define xint
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
87 decode_object $arg0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
88 print ((long) $val)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
89 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
90
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
91 define xtype
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
92 decode_object $arg0
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
93 if $type == $Lisp_Type_Int
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
94 echo int\n
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
95 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
96 if $type == Lisp_Type_Char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
97 echo char\n
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
98 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
99 printf "record type: %s\n", $imp->name
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
100 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
101 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
102 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
103
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
104 document xtype
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
105 Usage: xtype lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
106 Print the Lisp type of a lisp object.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
107 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
108
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
109 define lisp-shadows
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
110 run -batch -vanilla -f list-load-path-shadows
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
111 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
112
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
113 document lisp-shadows
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
114 Usage: lisp-shadows
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
115 Run xemacs to check for lisp shadows
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
116 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
117
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
118 define environment-to-run-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
119 unset env EMACSLOADPATH
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
120 set env EMACSBOOTSTRAPLOADPATH=../lisp/:..
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
121 set env EMACSBOOTSTRAPMODULEPATH=../modules/:..
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
122 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
123
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
124 define run-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
125 environment-to-run-temacs
452
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 400
diff changeset
126 run -nd -batch -l ../lisp/loadup.el run-temacs -q
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
127 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
128
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
129 document run-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
130 Usage: run-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
131 Run temacs interactively, like xemacs.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
132 Use this with debugging tools (like purify) that cannot deal with dumping,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
133 or when temacs builds successfully, but xemacs does not.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
134 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
135
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
136 define check-xemacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
137 run -batch -l ../tests/automated/test-harness.el -f batch-test-emacs ../tests/automated
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
138 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
139
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
140 document check-xemacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
141 Usage: check-xemacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
142 Run the test suite. Equivalent to 'make check'.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
143 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
144
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
145 define check-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
146 environment-to-run-temacs
452
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 400
diff changeset
147 run -nd -batch -l ../lisp/loadup.el run-temacs -q -batch -l ../tests/automated/test-harness.el -f batch-test-emacs ../tests/automated
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
148 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
149
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
150 document check-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
151 Usage: check-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
152 Run the test suite on temacs. Equivalent to 'make check-temacs'.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
153 Use this with debugging tools (like purify) that cannot deal with dumping,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
154 or when temacs builds successfully, but xemacs does not.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
155 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
156
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
157 define update-elc
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
158 environment-to-run-temacs
452
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 400
diff changeset
159 run -nd -batch -l ../lisp/update-elc.el
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
160 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
161
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
162 document update-elc
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
163 Usage: update-elc
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
164 Run the core lisp byte compilation part of the build procedure.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
165 Use when debugging temacs, not xemacs!
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
166 Use this when temacs builds successfully, but xemacs does not.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
167 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
168
454
d7a9135ec789 Import from CVS: tag r21-2-42
cvs
parents: 452
diff changeset
169 define dmp
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
170 environment-to-run-temacs
452
3d3049ae1304 Import from CVS: tag r21-2-41
cvs
parents: 400
diff changeset
171 run -nd -batch -l ../lisp/loadup.el dump
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
172 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
173
454
d7a9135ec789 Import from CVS: tag r21-2-42
cvs
parents: 452
diff changeset
174 document dmp
d7a9135ec789 Import from CVS: tag r21-2-42
cvs
parents: 452
diff changeset
175 Usage: dmp
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
176 Run the dumping part of the build procedure.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
177 Use when debugging temacs, not xemacs!
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
178 Use this when temacs builds successfully, but xemacs does not.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
179 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
180
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
181 define ldp
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
182 printf "%s", "Lisp => "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
183 call debug_print($arg0)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
184 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
185
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
186 document ldp
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
187 Usage: ldp lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
188 Print a Lisp Object value using the Lisp printer.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
189 Requires a running xemacs process.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
190 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
191
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
192 define lbt
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
193 call debug_backtrace()
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
194 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
195
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
196 document lbt
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
197 Usage: lbt
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
198 Print the current Lisp stack trace.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
199 Requires a running xemacs process.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
200 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
201
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
202
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
203 define leval
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
204 ldp Feval(Fcar(Fread_from_string(build_string($arg0),Qnil,Qnil)))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
205 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
206
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
207 document leval
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
208 Usage: leval "SEXP"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
209 Eval a lisp expression.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
210 Requires a running xemacs process.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
211
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
212 Example:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
213 (gdb) leval "(+ 1 2)"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
214 Lisp ==> 3
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
215 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
216
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
217
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
218 define wtype
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
219 print $arg0->core.widget_class->core_class.class_name
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
220 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
221
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
222 define xtname
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
223 print XrmQuarkToString(((Object)($arg0))->object.xrm_name)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
224 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
225
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
226 # GDB's command language makes you want to ...
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
227
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
228 define pptype
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
229 set $type_ptr = ($arg0 *) $val
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
230 print $type_ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
231 print *$type_ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
232 end
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
233
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
234 define pstructtype
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
235 set $type_ptr = (struct $arg0 *) $val
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
236 print $type_ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
237 print *$type_ptr
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
238 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
239
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
240 define pobj
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
241 decode_object $arg0
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
242 if $type == $Lisp_Type_Int
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
243 printf "Integer: %d\n", $val
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
244 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
245 if $type == Lisp_Type_Char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
246 if $val > 32 && $val < 128
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
247 printf "Char: %c\n", $val
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
248 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
249 printf "Char: %d\n", $val
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
250 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
251 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
252 if $lrecord_type == lrecord_type_string
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
253 pptype Lisp_String
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
254 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
255 if $lrecord_type == lrecord_type_cons
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
256 pptype Lisp_Cons
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
257 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
258 if $lrecord_type == lrecord_type_symbol
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
259 pptype Lisp_Symbol
1579
aebc80e1f056 [xemacs-hg @ 2003-07-18 20:07:04 by james]
james
parents: 458
diff changeset
260 printf "Symbol name: %s\n", ((Lisp_String *)$type_ptr->name)->data_
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
261 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
262 if $lrecord_type == lrecord_type_vector
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
263 pptype Lisp_Vector
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
264 printf "Vector of length %d\n", $type_ptr->size
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
265 #print *($type_ptr->data) @ $type_ptr->size
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
266 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
267 if $lrecord_type == lrecord_type_bit_vector
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
268 pptype Lisp_Bit_Vector
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
269 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
270 if $lrecord_type == lrecord_type_buffer
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
271 pstructtype buffer
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
272 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
273 if $lrecord_type == lrecord_type_char_table
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
274 pptype Lisp_Char_Table
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
275 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
276 if $lrecord_type == lrecord_type_char_table_entry
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
277 pptype Lisp_Char_Table_Entry
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
278 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
279 if $lrecord_type == lrecord_type_charset
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
280 pptype Lisp_Charset
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
281 else
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
282 if $lrecord_type == lrecord_type_coding_system
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
283 pptype Lisp_Coding_System
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
284 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
285 if $lrecord_type == lrecord_type_color_instance
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
286 pptype Lisp_Color_Instance
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
287 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
288 if $lrecord_type == lrecord_type_command_builder
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
289 pptype command_builder
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
290 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
291 if $lrecord_type == lrecord_type_compiled_function
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
292 pptype Lisp_Compiled_Function
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
293 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
294 if $lrecord_type == lrecord_type_console
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
295 pstructtype console
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
296 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
297 if $lrecord_type == lrecord_type_database
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
298 pptype Lisp_Database
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
299 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
300 if $lrecord_type == lrecord_type_device
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
301 pstructtype device
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
302 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
303 if $lrecord_type == lrecord_type_event
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
304 pptype Lisp_Event
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
305 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
306 if $lrecord_type == lrecord_type_extent
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
307 pstructtype extent
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
308 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
309 if $lrecord_type == lrecord_type_extent_auxiliary
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
310 pstructtype extent_auxiliary
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
311 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
312 if $lrecord_type == lrecord_type_extent_info
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
313 pstructtype extent_info
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
314 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
315 if $lrecord_type == lrecord_type_face
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
316 pptype Lisp_Face
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
317 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
318 if $lrecord_type == lrecord_type_float
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
319 pptype Lisp_Float
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
320 else
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
321 if $lrecord_type == lrecord_type_font_instance
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
322 pptype Lisp_Font_Instance
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
323 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
324 if $lrecord_type == lrecord_type_frame
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
325 pstructtype frame
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
326 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
327 if $lrecord_type == lrecord_type_glyph
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
328 pptype Lisp_Glyph
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
329 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
330 if $lrecord_type == lrecord_type_gui_item
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
331 pptype Lisp_Gui_Item
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
332 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
333 if $lrecord_type == lrecord_type_hash_table
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
334 pptype Lisp_Hash_Table
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
335 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
336 if $lrecord_type == lrecord_type_image_instance
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
337 pptype Lisp_Image_Instance
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
338 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
339 if $lrecord_type == lrecord_type_keymap
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
340 pptype Lisp_Keymap
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
341 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
342 if $lrecord_type == lrecord_type_lcrecord_list
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
343 pstructtype lcrecord_list
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
344 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
345 if $lrecord_type == lrecord_type_ldap
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
346 pptype Lisp_LDAP
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
347 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
348 if $lrecord_type == lrecord_type_lstream
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
349 pstructtype lstream
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
350 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
351 if $lrecord_type == lrecord_type_marker
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
352 pptype Lisp_Marker
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
353 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
354 if $lrecord_type == lrecord_type_opaque
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
355 pptype Lisp_Opaque
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
356 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
357 if $lrecord_type == lrecord_type_opaque_ptr
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
358 pptype Lisp_Opaque_Ptr
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
359 else
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
360 if $lrecord_type == lrecord_type_popup_data
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
361 pptype popup_data
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
362 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
363 if $lrecord_type == lrecord_type_process
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
364 pptype Lisp_Process
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
365 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
366 if $lrecord_type == lrecord_type_range_table
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
367 pptype Lisp_Range_Table
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
368 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
369 if $lrecord_type == lrecord_type_specifier
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
370 pptype Lisp_Specifier
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
371 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
372 if $lrecord_type == lrecord_type_subr
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
373 pptype Lisp_Subr
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
374 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
375 if $lrecord_type == lrecord_type_symbol_value_buffer_local
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
376 pstructtype symbol_value_buffer_local
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
377 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
378 if $lrecord_type == lrecord_type_symbol_value_forward
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
379 pstructtype symbol_value_forward
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
380 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
381 if $lrecord_type == lrecord_type_symbol_value_lisp_magic
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
382 pstructtype symbol_value_lisp_magic
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
383 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
384 if $lrecord_type == lrecord_type_symbol_value_varalias
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
385 pstructtype symbol_value_varalias
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
386 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
387 if $lrecord_type == lrecord_type_timeout
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
388 pptype Lisp_Timeout
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
389 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
390 if $lrecord_type == lrecord_type_toolbar_button
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
391 pstructtype toolbar_button
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
392 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
393 if $lrecord_type == lrecord_type_tooltalk_message
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
394 pptype Lisp_Tooltalk_Message
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
395 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
396 if $lrecord_type == lrecord_type_tooltalk_pattern
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
397 pptype Lisp_Tooltalk_Pattern
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
398 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
399 if $lrecord_type == lrecord_type_weak_list
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
400 pstructtype weak_list
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
401 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
402 if $lrecord_type == lrecord_type_window
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
403 pstructtype window
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
404 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
405 if $lrecord_type == lrecord_type_window_configuration
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
406 pstructtype window_config
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
407 else
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
408 if $lrecord_type == lrecord_type_fc_pattern
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
409 pstructtype fc_pattern
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
410 else
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
411 if $lrecord_type == lrecord_type_fc_objectset
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
412 pstructtype fc_objectset
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
413 else
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
414 if $lrecord_type == lrecord_type_fc_fontset
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
415 pstructtype fc_fontset
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
416 else
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
417 echo Unknown Lisp Object type\n
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
418 print $arg0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
419 # Barf, gag, retch
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
420 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
421 end
2354
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
422 end
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
423 end
ec5cb254c826 [xemacs-hg @ 2004-10-28 10:48:10 by stephent]
stephent
parents: 1579
diff changeset
424 end
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
425 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
426 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
427 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
428 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
429 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
430 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
431 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
432 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
433 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
434 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
435 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
436 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
437 end
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
438 end
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
439 end
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
440 # Repeat after me... gdb sux, gdb sux, gdb sux...
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
441 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
442 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
443 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
444 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
445 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
446 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
447 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
448 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
449 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
450 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
451 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
452 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
453 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
454 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
455 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
456 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
457 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
458 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
459 # Are we having fun yet??
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
460 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
461 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
462 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
463 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
464 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
465 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
466 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
467 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
468 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
469 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
470 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
471 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
472 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
473 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
474 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
475 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
476 end
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
477 end
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
478 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
479
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
480 document pobj
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
481 Usage: pobj lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
482 Print the internal C representation of a Lisp Object.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
483 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
484
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
485 # -------------------------------------------------------------
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
486 # functions to test the debugging support itself.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
487 # If you change this file, make sure the following still work...
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
488 # -------------------------------------------------------------
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
489 define test_xtype
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
490 printf "Vemacs_major_version: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
491 xtype Vemacs_major_version
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
492 printf "Vhelp_char: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
493 xtype Vhelp_char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
494 printf "Qnil: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
495 xtype Qnil
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
496 printf "Qunbound: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
497 xtype Qunbound
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
498 printf "Vobarray: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
499 xtype Vobarray
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
500 printf "Vall_weak_lists: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
501 xtype Vall_weak_lists
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
502 printf "Vxemacs_codename: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
503 xtype Vxemacs_codename
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
504 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
505
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
506 define test_pobj
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
507 printf "Vemacs_major_version: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
508 pobj Vemacs_major_version
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
509 printf "Vhelp_char: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
510 pobj Vhelp_char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
511 printf "Qnil: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
512 pobj Qnil
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
513 printf "Qunbound: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
514 pobj Qunbound
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
515 printf "Vobarray: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
516 pobj Vobarray
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
517 printf "Vall_weak_lists: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
518 pobj Vall_weak_lists
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
519 printf "Vxemacs_codename: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
520 pobj Vxemacs_codename
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
521 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
522