annotate src/.dbxrc @ 402:5a2589c672dc r21-2-31

Import from CVS: tag r21-2-31
author cvs
date Mon, 13 Aug 2007 11:14:58 +0200
parents a86b2b5e0111
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 # You can use this file to debug XEmacs using Sun WorkShop's dbx.
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 # Some functions defined here require a running process, but most
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
26 # don't. Considerable effort has been expended to this end.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
27
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
28 # Since this file is called `.dbxrc', it will be read by dbx
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
29 # automatically when dbx is run in the build directory, which is where
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
30 # developers usually debug their xemacs.
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 comments in .gdbinit.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
33
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
34 # See also the question of the XEmacs FAQ, titled
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
35 # "How to Debug an XEmacs problem with a debugger".
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
36
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
37 # gdb sources the ./.gdbinit in _addition_ to ~/.gdbinit.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
38 # But dbx does _not_ source ~/.dbxrc if it found ./.dbxrc.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
39 # So we simulate the gdb algorithm by doing it ourselves here.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
40 if test -r $HOME/.dbxrc; then . $HOME/.dbxrc; fi
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 dbxenv language_mode ansic
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
43
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
44 ignore POLL
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
45 ignore IO
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
46
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
47 document lbt << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
48 Usage: lbt
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
49 Print the current Lisp stack trace.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
50 Requires a running xemacs process.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
51 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
52
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
53 function lbt {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
54 call debug_backtrace()
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
55 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
56
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
57 document ldp << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
58 Usage: ldp lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
59 Print a Lisp Object value using the Lisp printer.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
60 Requires a running xemacs process.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
61 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
62
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
63 function ldp {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
64 call debug_print ($1);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
65 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
66
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
67 Lisp_Type_Int=-2
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
68
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
69 # A bug in dbx prevents string variables from having values beginning with `-'!!
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
70 function XEmacsInit {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
71 function ToInt { eval "$1=\$[(int) \`alloc.c\`$1]"; }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
72 ToInt dbg_USE_UNION_TYPE
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
73 ToInt Lisp_Type_Char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
74 ToInt Lisp_Type_Record
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
75 ToInt dbg_valbits
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
76 ToInt dbg_gctypebits
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
77 function ToLong { eval "$1=\$[(\`alloc.c\`unsigned long) \`alloc.c\`$1]"; }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
78 ToLong dbg_valmask
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
79 ToLong dbg_typemask
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
80 xemacs_initted=yes
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
81 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
82
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
83 function printvar {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
84 for i in $*; do eval "echo $i=\$$i"; done
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
87 document decode_object << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
88 Usage: decode_object lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
89 Extract implementation information from a Lisp Object.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
90 Defines variables $val, $type and $imp.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
91 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
92
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
93 # Various dbx bugs cause ugliness in following code
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
94 function decode_object {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
95 if test -z "$xemacs_initted"; then XEmacsInit; fi;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
96 if test $dbg_USE_UNION_TYPE = 1; then
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
97 # Repeat after me... dbx sux, dbx sux, dbx sux...
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
98 # Allow both `pobj Qnil' and `pobj 0x82746834' to work
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
99 case $(whatis $1) in
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
100 *Lisp_Object*) obj="$[(`alloc.c`unsigned long)(($1).i)]";;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
101 *) obj="$[(`alloc.c`unsigned long)($1)]";;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
102 esac
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
103 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
104 obj="$[(`alloc.c`unsigned long)($1)]";
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
105 fi
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
106 if test $[(int)($obj & 1)] = 1; then
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
107 # It's an int
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
108 val=$[(long)(((unsigned long long)$obj) >> 1)]
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
109 type=$Lisp_Type_Int
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
110 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
111 type=$[(int)(((void*)$obj) & $dbg_typemask)]
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
112 if test $type = $Lisp_Type_Char; then
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
113 val=$[(void*)(long)(((unsigned long long)($obj & $dbg_valmask)) >> $dbg_gctypebits)]
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
114 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
115 # It's a record pointer
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
116 val=$[(void*)$obj]
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
117 if test "$val" = "(nil)"; then type=null_pointer; fi
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
118 fi
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
119 fi
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
120
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
121 if test $type = $Lisp_Type_Record; then
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
122 lheader="((struct lrecord_header *) $val)"
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
123 lrecord_type=$[(enum lrecord_type) $lheader->type]
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
124 imp=$[(void*)(`alloc.c`lrecord_implementations_table[$lheader->type])]
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
125 else
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
126 lheader="((struct lrecord_header *) -1)"
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
127 lrecord_type=-1
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
128 imp="0xdeadbeef"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
129 fi
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
130 # printvar obj val type imp
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
131 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
132
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
133 function xint {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
134 decode_object "$*"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
135 print (long) ($val)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
136 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
137
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
138 document xtype << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
139 Usage: xtype lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
140 Print the Lisp type of a lisp object.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
141 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
142
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
143 function xtype {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
144 decode_object "$*"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
145 if test $type = $Lisp_Type_Int; then echo "int"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
146 elif test $type = $Lisp_Type_Char; then echo "char"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
147 elif test $type = null_pointer; then echo "null_pointer"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
148 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
149 echo "record type with name: $[((struct lrecord_implementation *)$imp)->name]"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
150 fi
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
151 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
152
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
153 function lisp-shadows {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
154 run -batch -vanilla -f list-load-path-shadows
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
155 }
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 function environment-to-run-temacs {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
158 unset EMACSLOADPATH
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
159 export EMACSBOOTSTRAPLOADPATH=../lisp/:..
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
160 export EMACSBOOTSTRAPMODULEPATH=../modules/:..
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
163 document run-temacs << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
164 Usage: run-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
165 Run temacs interactively, like xemacs.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
166 Use this with debugging tools (like purify) that cannot deal with dumping,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
167 or when temacs builds successfully, but xemacs does not.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
168 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
169
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
170 function run-temacs {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
171 environment-to-run-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
172 run -batch -l ../lisp/loadup.el run-temacs -q ${1+"$@"}
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
175 document check-xemacs << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
176 Usage: check-xemacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
177 Run the test suite. Equivalent to 'make check'.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
178 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
179
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
180 function check-xemacs {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
181 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
182 }
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 document check-temacs << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
185 Usage: check-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
186 Run the test suite on temacs. Equivalent to 'make check-temacs'.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
187 Use this with debugging tools (like purify) that cannot deal with dumping,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
188 or when temacs builds successfully, but xemacs does not.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
189 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
190
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
191 function check-temacs {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
192 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
193 }
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 document update-elc << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
196 Usage: update-elc
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
197 Run the core lisp byte compilation part of the build procedure.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
198 Use when debugging temacs, not xemacs!
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
199 Use this when temacs builds successfully, but xemacs does not.
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 function update-elc {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
203 environment-to-run-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
204 run -batch -l ../lisp/update-elc.el
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
207 document dump-temacs << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
208 Usage: dump-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
209 Run the dumping part of the build procedure.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
210 Use when debugging temacs, not xemacs!
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
211 Use this when temacs builds successfully, but xemacs does not.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
212 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
213
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
214 function dump-temacs {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
215 environment-to-run-temacs
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
216 run -batch -l ../lisp/loadup.el dump
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
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
219 function pstruct { # pstruct foo.c struct-name
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
220 module "$1" > /dev/null
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
221 type_ptr="((struct $2 *) $val)"
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
222 print $type_ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
223 print *$type_ptr
398
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
226 document pobj << 'end'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
227 Usage: pobj lisp_object
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
228 Print the internal C representation of a Lisp Object.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
229 end
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
230
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
231 function pobj {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
232 decode_object $1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
233 if test $type = $Lisp_Type_Int; then
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
234 print -f"Integer: %d" $val
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
235 elif test $type = $Lisp_Type_Char; then
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
236 if test $[$val > 32 && $val < 128] = 1; then
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
237 print -f"Char: %c" $val
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
238 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
239 print -f"Char: %d" $val
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
240 fi
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
241 elif test $lrecord_type = lrecord_type_string; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
242 pstruct alloc.c Lisp_String
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
243 elif test $lrecord_type = lrecord_type_cons; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
244 pstruct alloc.c Lisp_Cons
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
245 elif test $lrecord_type = lrecord_type_symbol; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
246 pstruct symbols.c Lisp_Symbol
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
247 echo "Symbol name: $[(char *)($type_ptr->name->data)]"
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
248 elif test $lrecord_type = lrecord_type_vector; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
249 pstruct alloc.c Lisp_Vector
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
250 echo "Vector of length $[$type_ptr->size]"
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
251 elif test $lrecord_type = lrecord_type_bit_vector; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
252 pstruct fns.c Lisp_Bit_Vector
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
253 elif test $lrecord_type = lrecord_type_buffer; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
254 pstruct buffer.c buffer
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
255 elif test $lrecord_type = lrecord_type_char_table; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
256 pstruct chartab.c Lisp_Char_Table
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
257 elif test $lrecord_type = lrecord_type_char_table_entry; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
258 pstruct chartab.c Lisp_Char_Table_Entry
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
259 elif test $lrecord_type = lrecord_type_charset; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
260 pstruct mule-charset.c Lisp_Charset
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
261 elif test $lrecord_type = lrecord_type_coding_system; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
262 pstruct file-coding.c Lisp_Coding_System
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
263 elif test $lrecord_type = lrecord_type_color_instance; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
264 pstruct objects.c Lisp_Color_Instance
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
265 elif test $lrecord_type = lrecord_type_command_builder; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
266 pstruct event-stream.c command_builder
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
267 elif test $lrecord_type = lrecord_type_compiled_function; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
268 pstruct bytecode.c Lisp_Compiled_Function
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
269 elif test $lrecord_type = lrecord_type_console; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
270 pstruct console.c console
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
271 elif test $lrecord_type = lrecord_type_database; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
272 pstruct database.c Lisp_Database
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
273 elif test $lrecord_type = lrecord_type_device; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
274 pstruct device.c device
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
275 elif test $lrecord_type = lrecord_type_event; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
276 pstruct events.c Lisp_Event
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
277 elif test $lrecord_type = lrecord_type_extent; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
278 pstruct extents.c extent
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
279 elif test $lrecord_type = lrecord_type_extent_auxiliary; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
280 pstruct extents.c extent_auxiliary
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
281 elif test $lrecord_type = lrecord_type_extent_info; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
282 pstruct extents.c extent_info
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
283 elif test $lrecord_type = lrecord_type_face; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
284 pstruct faces.c Lisp_Face
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
285 elif test $lrecord_type = lrecord_type_float; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
286 pstruct floatfns.c Lisp_Float
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
287 elif test $lrecord_type = lrecord_type_font_instance; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
288 pstruct objects.c Lisp_Font_Instance
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
289 elif test $lrecord_type = lrecord_type_frame; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
290 pstruct frame.c frame
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
291 elif test $lrecord_type = lrecord_type_glyph; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
292 pstruct glyph.c Lisp_Glyph
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
293 elif test $lrecord_type = lrecord_type_gui_item; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
294 pstruct gui.c Lisp_Gui_Item
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
295 elif test $lrecord_type = lrecord_type_hash_table; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
296 pstruct elhash.c Lisp_Hash_Table
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
297 elif test $lrecord_type = lrecord_type_image_instance; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
298 pstruct glyphs.c Lisp_Image_Instance
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
299 elif test $lrecord_type = lrecord_type_keymap; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
300 pstruct keymap.c Lisp_Keymap
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
301 elif test $lrecord_type = lrecord_type_lcrecord_list; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
302 pstruct alloc.c lcrecord_list
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
303 elif test $lrecord_type = lrecord_type_ldap; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
304 pstruct ldap.c Lisp_LDAP
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
305 elif test $lrecord_type = lrecord_type_lstream; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
306 pstruct lstream.c lstream
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
307 elif test $lrecord_type = lrecord_type_marker; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
308 pstruct marker.c Lisp_Marker
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
309 elif test $lrecord_type = lrecord_type_opaque; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
310 pstruct opaque.c Lisp_Opaque
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
311 elif test $lrecord_type = lrecord_type_opaque_ptr; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
312 pstruct opaque.c Lisp_Opaque_Ptr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
313 elif test $lrecord_type = lrecord_type_popup_data; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
314 pstruct gui-x.c popup_data
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
315 elif test $lrecord_type = lrecord_type_process; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
316 pstruct process.c Lisp_Process
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
317 elif test $lrecord_type = lrecord_type_range_table; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
318 pstruct rangetab.c Lisp_Range_Table
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
319 elif test $lrecord_type = lrecord_type_specifier; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
320 pstruct specifier.c Lisp_Specifier
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
321 elif test $lrecord_type = lrecord_type_subr; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
322 pstruct eval.c Lisp_Subr
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
323 elif test $lrecord_type = lrecord_type_symbol_value_buffer_local; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
324 pstruct symbols.c symbol_value_buffer_local
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
325 elif test $lrecord_type = lrecord_type_symbol_value_forward; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
326 pstruct symbols.c symbol_value_forward
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
327 elif test $lrecord_type = lrecord_type_symbol_value_lisp_magic; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
328 pstruct symbols.c symbol_value_lisp_magic
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
329 elif test $lrecord_type = lrecord_type_symbol_value_varalias; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
330 pstruct symbols.c symbol_value_varalias
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
331 elif test $lrecord_type = lrecord_type_timeout; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
332 pstruct event-stream.c Lisp_Timeout
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
333 elif test $lrecord_type = lrecord_type_toolbar_button; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
334 pstruct toolbar.c toolbar_button
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
335 elif test $lrecord_type = lrecord_type_tooltalk_message; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
336 pstruct tooltalk.c Lisp_Tooltalk_Message
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
337 elif test $lrecord_type = lrecord_type_tooltalk_pattern; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
338 pstruct tooltalk.c Lisp_Tooltalk_Pattern
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
339 elif test $lrecord_type = lrecord_type_weak_list; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
340 pstruct data.c weak_list
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
341 elif test $lrecord_type = lrecord_type_window; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
342 pstruct window.c window
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
343 elif test $lrecord_type = lrecord_type_window_configuration; then
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
344 pstruct window.c window_config
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
345 elif test "$type" = "null_pointer"; then
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
346 echo "Lisp Object is a null pointer!!"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
347 else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
348 echo "Unknown Lisp Object type"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
349 print $1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
350 fi
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
351 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
352
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
353 dbxenv suppress_startup_message 4.0
400
a86b2b5e0111 Import from CVS: tag r21-2-30
cvs
parents: 398
diff changeset
354 # dbxenv mt_watchpoints on
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
355
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
356 function dp_core {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
357 print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
358 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
359
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
360 # Barf!
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
361 function print_shell {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
362 print *(`frame-x.c`TopLevelShellRec*) (((struct `frame-x.c`x_frame*) (((struct `frame-x.c`frame*) (Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
363 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
364
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
365 # -------------------------------------------------------------
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
366 # functions to test the debugging support itself.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
367 # If you change this file, make sure the following still work...
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
368 # -------------------------------------------------------------
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
369 function test_xtype {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
370 function doit { echo -n "$1: "; xtype "$1"; }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
371 test_various_objects
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
372 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
373
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
374 function test_pobj {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
375 function doit { echo '==============================='; echo -n "$1: "; pobj "$1"; }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
376 test_various_objects
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
377 }
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
378
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
379 function test_various_objects {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
380 doit Vemacs_major_version
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
381 doit Vhelp_char
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
382 doit Qnil
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
383 doit Qunbound
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
384 doit Vobarray
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
385 doit Vall_weak_lists
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
386 doit Vxemacs_codename
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
387 }