annotate src/.gdbinit @ 450:98528da0b7fc r21-2-40

Import from CVS: tag r21-2-40
author cvs
date Mon, 13 Aug 2007 11:39:20 +0200
parents a86b2b5e0111
children 3d3049ae1304
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)
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
72 set $imp = lrecord_implementations_table[$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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
126 run -batch -l ../lisp/loadup.el run-temacs -q
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
147 run -batch -l ../lisp/loadup.el run-temacs -q -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
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
159 run -batch -l ../lisp/update-elc.el
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
169 define dump-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
170 environment-to-run-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
171 run -batch -l ../lisp/loadup.el dump
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
174 document dump-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
175 Usage: dump-temacs
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 # if you use Purify, do this:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
182 # export PURIFYOPTIONS='-pointer-mask=0x0fffffff'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
183
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
184 define ldp
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
185 printf "%s", "Lisp => "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
186 call debug_print($arg0)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
187 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
188
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
189 document ldp
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
190 Usage: ldp lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
191 Print a Lisp Object value using the Lisp printer.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
192 Requires a running xemacs process.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
193 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
194
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
195 define lbt
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
196 call debug_backtrace()
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
197 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
198
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
199 document lbt
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
200 Usage: lbt
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
201 Print the current Lisp stack trace.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
202 Requires a running xemacs process.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
203 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
204
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
205
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
206 define leval
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
207 ldp Feval(Fcar(Fread_from_string(build_string($arg0),Qnil,Qnil)))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
208 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
209
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
210 document leval
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
211 Usage: leval "SEXP"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
212 Eval a lisp expression.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
213 Requires a running xemacs process.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
214
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
215 Example:
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
216 (gdb) leval "(+ 1 2)"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
217 Lisp ==> 3
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
218 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
219
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
220
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
221 define wtype
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
222 print $arg0->core.widget_class->core_class.class_name
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
223 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
224
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
225 define xtname
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
226 print XrmQuarkToString(((Object)($arg0))->object.xrm_name)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
227 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
228
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
229 # GDB's command language makes you want to ...
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
230
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
231 define ptype
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
232 set $type_ptr = ($arg0 *) $val
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
233 print $type_ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
234 print *$type_ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
235 end
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
236
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
237 define pstructtype
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
238 set $type_ptr = (struct $arg0 *) $val
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
239 print $type_ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
240 print *$type_ptr
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
241 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
242
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
243 define pobj
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
244 decode_object $arg0
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
245 if $type == $Lisp_Type_Int
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
246 printf "Integer: %d\n", $val
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
247 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
248 if $type == Lisp_Type_Char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
249 if $val > 32 && $val < 128
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
250 printf "Char: %c\n", $val
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
251 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
252 printf "Char: %d\n", $val
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
253 end
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_string
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
256 ptype Lisp_String
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_cons
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
259 ptype Lisp_Cons
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
260 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
261 if $lrecord_type == lrecord_type_symbol
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
262 ptype Lisp_Symbol
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
263 printf "Symbol name: %s\n", $type_ptr->name->data
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
264 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
265 if $lrecord_type == lrecord_type_vector
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
266 ptype Lisp_Vector
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
267 printf "Vector of length %d\n", $type_ptr->size
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
268 #print *($type_ptr->data) @ $type_ptr->size
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_bit_vector
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
271 ptype Lisp_Bit_Vector
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_buffer
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
274 pstructtype buffer
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
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
277 ptype Lisp_Char_Table
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_char_table_entry
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
280 ptype Lisp_Char_Table_Entry
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
281 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
282 if $lrecord_type == lrecord_type_charset
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
283 ptype Lisp_Charset
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
284 else
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
285 if $lrecord_type == lrecord_type_coding_system
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
286 ptype Lisp_Coding_System
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_color_instance
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
289 ptype Lisp_Color_Instance
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_command_builder
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
292 ptype command_builder
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_compiled_function
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
295 ptype Lisp_Compiled_Function
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_console
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
298 pstructtype console
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_database
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
301 ptype Lisp_Database
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_device
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
304 pstructtype device
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_event
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
307 ptype Lisp_Event
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
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
310 pstructtype extent
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_auxiliary
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
313 pstructtype extent_auxiliary
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_extent_info
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
316 pstructtype extent_info
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_face
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
319 ptype Lisp_Face
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
320 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
321 if $lrecord_type == lrecord_type_float
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
322 ptype Lisp_Float
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
323 else
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
324 if $lrecord_type == lrecord_type_font_instance
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
325 ptype Lisp_Font_Instance
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_frame
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
328 pstructtype frame
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_glyph
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
331 ptype Lisp_Glyph
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_gui_item
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
334 ptype Lisp_Gui_Item
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_hash_table
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
337 ptype Lisp_Hash_Table
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_image_instance
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
340 ptype Lisp_Image_Instance
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_keymap
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
343 ptype Lisp_Keymap
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_lcrecord_list
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
346 pstructtype lcrecord_list
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_ldap
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
349 ptype Lisp_LDAP
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_lstream
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
352 pstructtype lstream
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_marker
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
355 ptype Lisp_Marker
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
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
358 ptype Lisp_Opaque
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
359 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
360 if $lrecord_type == lrecord_type_opaque_ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
361 ptype Lisp_Opaque_Ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
362 else
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
363 if $lrecord_type == lrecord_type_popup_data
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
364 ptype popup_data
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_process
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
367 ptype Lisp_Process
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_range_table
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
370 ptype Lisp_Range_Table
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_specifier
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
373 ptype Lisp_Specifier
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_subr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
376 ptype Lisp_Subr
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_buffer_local
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
379 pstructtype symbol_value_buffer_local
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_forward
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
382 pstructtype symbol_value_forward
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_lisp_magic
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
385 pstructtype symbol_value_lisp_magic
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_symbol_value_varalias
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
388 pstructtype symbol_value_varalias
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_timeout
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
391 ptype Lisp_Timeout
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_toolbar_button
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
394 pstructtype toolbar_button
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_message
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
397 ptype Lisp_Tooltalk_Message
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_tooltalk_pattern
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
400 ptype Lisp_Tooltalk_Pattern
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_weak_list
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
403 pstructtype weak_list
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
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
406 pstructtype window
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
407 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
408 if $lrecord_type == lrecord_type_window_configuration
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
409 pstructtype window_config
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
410 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
411 echo Unknown Lisp Object type\n
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
412 print $arg0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
413 # Barf, gag, retch
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
414 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
415 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
416 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
417 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
418 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
419 end
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
422 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
423 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
424 end
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
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
429 end
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
430 end
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
431 # Repeat after me... gdb sux, gdb sux, gdb sux...
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
438 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
439 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
440 end
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 # Are we having fun yet??
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 end
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
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
468 end
398
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
471 document pobj
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
472 Usage: pobj lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
473 Print the internal C representation of a Lisp Object.
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
476 # -------------------------------------------------------------
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
477 # functions to test the debugging support itself.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
478 # If you change this file, make sure the following still work...
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 define test_xtype
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
481 printf "Vemacs_major_version: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
482 xtype Vemacs_major_version
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
483 printf "Vhelp_char: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
484 xtype Vhelp_char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
485 printf "Qnil: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
486 xtype Qnil
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
487 printf "Qunbound: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
488 xtype Qunbound
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
489 printf "Vobarray: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
490 xtype Vobarray
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
491 printf "Vall_weak_lists: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
492 xtype Vall_weak_lists
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
493 printf "Vxemacs_codename: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
494 xtype Vxemacs_codename
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
495 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
496
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
497 define test_pobj
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
498 printf "Vemacs_major_version: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
499 pobj Vemacs_major_version
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
500 printf "Vhelp_char: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
501 pobj Vhelp_char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
502 printf "Qnil: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
503 pobj Qnil
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
504 printf "Qunbound: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
505 pobj Qunbound
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
506 printf "Vobarray: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
507 pobj Vobarray
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
508 printf "Vall_weak_lists: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
509 pobj Vall_weak_lists
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
510 printf "Vxemacs_codename: "
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
511 pobj Vxemacs_codename
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
512 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
513