annotate src/.gdbinit @ 801:2b676dc88c66

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