annotate src/.dbxrc.in @ 5792:8ef8d5e7c920

Fix broken texinfo references. See xemacs-beta message with ID <1395982782.4313.8.camel@linux1> and xemacs-patches message with ID <CAHCOHQnBtTTszzQ7u0S_F9rBzNKncTzi=b+ZY+ruBeQJ=V3=2A@mail.gmail.com>.
author Jerry James <james@xemacs.org>
date Fri, 28 Mar 2014 12:48:12 -0600
parents 3e5d5e8e4bb7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
1 ## dbx init file for XEmacs -*- ksh -*-
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
2 ## This is the source file for src/.dbxrc. Edit it, and rerun configure.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
3 ## (Running config.status is not enough.)
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
4 ## The generated file depends on src/config.h (currently only in one place).
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
5
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
6 ## Copyright (C) 1998 Free Software Foundation, Inc.
5069
14f0dd1fabdb move test-harness to lisp/ directory so it gets byte-compiled
Ben Wing <ben@xemacs.org>
parents: 3418
diff changeset
7 ## Copyright (C) 2010 Ben Wing.
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
8
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
9 ## This file is part of XEmacs.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
10
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5177
diff changeset
11 ## XEmacs is free software: you can redistribute it and/or modify it
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
12 ## under the terms of the GNU General Public License as published by the
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5177
diff changeset
13 ## Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5177
diff changeset
14 ## option) any later version.
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
15
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
16 ## XEmacs is distributed in the hope that it will be useful, but WITHOUT
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
17 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
18 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
19 ## for more details.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
20
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
21 ## You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5177
diff changeset
22 ## along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
23
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
24 ## Author: Martin Buchholz
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
25
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
26 ## Other contributors you could ask for help: Ivan Golubev, Jerry James,
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
27 ## Stephen Turnbull.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
28
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
29 ## You can use this file to debug XEmacs using Sun WorkShop's dbx.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
30
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
31 ## Some functions defined here require a running process, but most
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
32 ## don't. Considerable effort has been expended to this end.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
33
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
34 ## Since this file is called `.dbxrc', it will be read by dbx
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
35 ## automatically when dbx is run in the build directory, which is where
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
36 ## developers usually debug their xemacs.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
37
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
38 ## See also the comments in .gdbinit.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
39
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
40 ## See also the question of the XEmacs FAQ, titled
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
41 ## "How to Debug an XEmacs problem with a debugger".
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
42
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
43 ## gdb sources the ./.gdbinit in _addition_ to ~/.gdbinit.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
44 ## But dbx does _not_ source ~/.dbxrc if it found ./.dbxrc.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
45 ## So we simulate the gdb algorithm by doing it ourselves here.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
46
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
47 #define NOT_C_CODE
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
48 #include "config.h"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
49
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
50 if test -r $HOME/.dbxrc; then . $HOME/.dbxrc; fi
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
51
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
52 dbxenv language_mode ansic
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
53
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
54 ignore POLL
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
55 ignore IO
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
56
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
57 #ifdef VDB_POSIX
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
58 ignore SIGSEGV
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
59 ignore SIGBUS
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
60 #endif
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
61
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
62 document lbt << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
63 Usage: lbt
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
64 Print the current Lisp stack trace.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
65 Requires a running xemacs process.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
66 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
67
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
68 function lbt {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
69 call debug_backtrace()
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
70 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
71
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
72 document ldp << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
73 Usage: ldp lisp_object
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
74 Print a Lisp Object value using the Lisp printer.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
75 Requires a running xemacs process.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
76 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
77
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
78 function ldp {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
79 call debug_print ($1);
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
80 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
81
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
82 Lisp_Type_Int=-2
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
83
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
84 ## A bug in dbx prevents string variables from having values beginning with `-'!!
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
85 function XEmacsInit {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
86 function ToInt { eval "$1=\$[(int) \`alloc.c\`$1]"; }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
87 ToInt dbg_USE_UNION_TYPE
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
88 ToInt Lisp_Type_Char
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
89 ToInt Lisp_Type_Record
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
90 ToInt dbg_valbits
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
91 ToInt dbg_gctypebits
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
92 function ToLong { eval "$1=\$[(\`alloc.c\`unsigned long) \`alloc.c\`$1]"; }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
93 ToLong dbg_valmask
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
94 ToLong dbg_typemask
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
95 xemacs_initted=yes
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
96 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
97
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
98 function printvar {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
99 for i in $*; do eval "echo $i=\$$i"; done
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
100 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
101
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
102 document decode_object << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
103 Usage: decode_object lisp_object
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
104 Extract implementation information from a Lisp Object.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
105 Defines variables $val, $type and $imp.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
106 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
107
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
108 ## Various dbx bugs cause ugliness in following code
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
109 function decode_object {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
110 if test -z "$xemacs_initted"; then XEmacsInit; fi;
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
111 if test $dbg_USE_UNION_TYPE = 1; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
112 ## Repeat after me... dbx sux, dbx sux, dbx sux...
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
113 ## Allow both `pobj Qnil' and `pobj 0x82746834' to work
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
114 case $(whatis $1) in
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
115 *Lisp_Object*) obj="$[(`alloc.c`unsigned long)(($1).i)]";;
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
116 *) obj="$[(`alloc.c`unsigned long)($1)]";;
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
117 esac
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
118 else
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
119 obj="$[(`alloc.c`unsigned long)($1)]";
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
120 fi
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
121 if test $[(int)($obj & 1)] = 1; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
122 ## It's an int
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
123 val=$[(long)(((unsigned long long)$obj) >> 1)]
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
124 type=$Lisp_Type_Int
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
125 else
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
126 type=$[(int)(((void*)$obj) & $dbg_typemask)]
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
127 if test $type = $Lisp_Type_Char; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
128 val=$[(void*)(long)(((unsigned long long)($obj & $dbg_valmask)) >> $dbg_gctypebits)]
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
129 else
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
130 ## It's a record pointer
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
131 val=$[(void*)$obj]
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
132 if test "$val" = "(nil)"; then type=null_pointer; fi
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
133 fi
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
134 fi
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
135
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
136 if test $type = $Lisp_Type_Record; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
137 lheader="((struct lrecord_header *) $val)"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
138 lrecord_type=$[(enum lrecord_type) $lheader->type]
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
139 imp=$[(void*)(`alloc.c`lrecord_implementations_table[$lheader->type])]
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
140 else
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
141 lheader="((struct lrecord_header *) -1)"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
142 lrecord_type=-1
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
143 imp="0xdeadbeef"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
144 fi
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
145 ## printvar obj val type imp
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
146 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
147
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
148 function xint {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
149 decode_object "$*"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
150 print (long) ($val)
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
151 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
152
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
153 document xtype << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
154 Usage: xtype lisp_object
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
155 Print the Lisp type of a lisp object.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
156 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
157
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
158 function xtype {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
159 decode_object "$*"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
160 if test $type = $Lisp_Type_Int; then echo "int"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
161 elif test $type = $Lisp_Type_Char; then echo "char"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
162 elif test $type = null_pointer; then echo "null_pointer"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
163 else
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
164 echo "record type with name: $[((struct lrecord_implementation *)$imp)->name]"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
165 fi
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
166 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
167
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
168 function lisp-shadows {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
169 run -batch -vanilla -f list-load-path-shadows
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
170 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
171
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
172 function environment-to-run-temacs {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
173 unset EMACSLOADPATH
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
174 export EMACSBOOTSTRAPLOADPATH=../lisp/:..
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
175 export EMACSBOOTSTRAPMODULEPATH=../modules/:..
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
176 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
177
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
178 document run-temacs << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
179 Usage: run-temacs
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
180 Run temacs interactively, like xemacs.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
181 Use this with debugging tools (like purify) that cannot deal with dumping,
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
182 or when temacs builds successfully, but xemacs does not.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
183 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
184
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
185 function run-temacs {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
186 environment-to-run-temacs
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
187 run -nd -batch -l ../lisp/loadup.el run-temacs -q ${1+"$@"}
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
188 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
189
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
190 document check-xemacs << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
191 Usage: check-xemacs
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
192 Run the test suite. Equivalent to 'make check'.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
193 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
194
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
195 function check-xemacs {
5069
14f0dd1fabdb move test-harness to lisp/ directory so it gets byte-compiled
Ben Wing <ben@xemacs.org>
parents: 3418
diff changeset
196 run -batch -l test-harness -f batch-test-emacs ../tests/automated
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
197 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
198
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
199 document check-temacs << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
200 Usage: check-temacs
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
201 Run the test suite on temacs. Equivalent to 'make check-temacs'.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
202 Use this with debugging tools (like purify) that cannot deal with dumping,
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
203 or when temacs builds successfully, but xemacs does not.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
204 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
205
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
206 function check-temacs {
5069
14f0dd1fabdb move test-harness to lisp/ directory so it gets byte-compiled
Ben Wing <ben@xemacs.org>
parents: 3418
diff changeset
207 run-temacs -q -batch -l test-harness -f batch-test-emacs ../tests/automated
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
208 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
209
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
210 document update-elc << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
211 Usage: update-elc
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
212 Run the core lisp byte compilation part of the build procedure.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
213 Use when debugging temacs, not xemacs!
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
214 Use this when temacs builds successfully, but xemacs does not.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
215 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
216
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
217 function update-elc {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
218 environment-to-run-temacs
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
219 run -nd -batch -l ../lisp/update-elc.el
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
220 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
221
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
222 document dmp << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
223 Usage: dmp
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
224 Run the dumping part of the build procedure.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
225 Use when debugging temacs, not xemacs!
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
226 Use this when temacs builds successfully, but xemacs does not.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
227 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
228
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
229 function dmp {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
230 environment-to-run-temacs
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
231 run -nd -batch -l ../lisp/loadup.el dump
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
232 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
233
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
234 function pstruct { ## pstruct foo.c struct-name
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
235 module "$1" > /dev/null
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
236 type_ptr="((struct $2 *) $val)"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
237 print $type_ptr
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
238 print *$type_ptr
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
239 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
240
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
241 document pobj << 'end'
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
242 Usage: pobj lisp_object
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
243 Print the internal C representation of a Lisp Object.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
244 end
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
245
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
246 function pobj {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
247 decode_object $1
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
248 if test $type = $Lisp_Type_Int; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
249 print -f"Integer: %d" $val
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
250 elif test $type = $Lisp_Type_Char; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
251 if test $[$val > 32 && $val < 128] = 1; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
252 print -f"Char: %c" $val
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
253 else
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
254 print -f"Char: %d" $val
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
255 fi
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
256 elif test $lrecord_type = lrecord_type_string; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
257 pstruct alloc.c Lisp_String
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
258 elif test $lrecord_type = lrecord_type_cons; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
259 pstruct alloc.c Lisp_Cons
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
260 elif test $lrecord_type = lrecord_type_symbol; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
261 pstruct symbols.c Lisp_Symbol
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
262 echo "Symbol name: $[(char *)($type_ptr->name->data)]"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
263 elif test $lrecord_type = lrecord_type_vector; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
264 pstruct alloc.c Lisp_Vector
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
265 echo "Vector of length $[$type_ptr->size]"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
266 elif test $lrecord_type = lrecord_type_bit_vector; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
267 pstruct fns.c Lisp_Bit_Vector
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
268 elif test $lrecord_type = lrecord_type_buffer; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
269 pstruct buffer.c buffer
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
270 elif test $lrecord_type = lrecord_type_char_table; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
271 pstruct chartab.c Lisp_Char_Table
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
272 elif test $lrecord_type = lrecord_type_char_table_entry; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
273 pstruct chartab.c Lisp_Char_Table_Entry
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
274 elif test $lrecord_type = lrecord_type_charset; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
275 pstruct mule-charset.c Lisp_Charset
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
276 elif test $lrecord_type = lrecord_type_coding_system; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
277 pstruct file-coding.c Lisp_Coding_System
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
278 elif test $lrecord_type = lrecord_type_color_instance; then
5176
8b2f75cecb89 rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents: 3418
diff changeset
279 pstruct fontcolor.c Lisp_Color_Instance
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
280 elif test $lrecord_type = lrecord_type_command_builder; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
281 pstruct event-stream.c command_builder
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
282 elif test $lrecord_type = lrecord_type_compiled_function; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
283 pstruct bytecode.c Lisp_Compiled_Function
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
284 elif test $lrecord_type = lrecord_type_console; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
285 pstruct console.c console
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
286 elif test $lrecord_type = lrecord_type_database; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
287 pstruct database.c Lisp_Database
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
288 elif test $lrecord_type = lrecord_type_device; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
289 pstruct device.c device
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
290 elif test $lrecord_type = lrecord_type_event; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
291 pstruct events.c Lisp_Event
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
292 elif test $lrecord_type = lrecord_type_extent; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
293 pstruct extents.c extent
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
294 elif test $lrecord_type = lrecord_type_extent_auxiliary; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
295 pstruct extents.c extent_auxiliary
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
296 elif test $lrecord_type = lrecord_type_extent_info; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
297 pstruct extents.c extent_info
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
298 elif test $lrecord_type = lrecord_type_face; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
299 pstruct faces.c Lisp_Face
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
300 elif test $lrecord_type = lrecord_type_float; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
301 pstruct floatfns.c Lisp_Float
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
302 elif test $lrecord_type = lrecord_type_font_instance; then
5176
8b2f75cecb89 rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents: 3418
diff changeset
303 pstruct fontcolor.c Lisp_Font_Instance
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
304 elif test $lrecord_type = lrecord_type_frame; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
305 pstruct frame.c frame
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
306 elif test $lrecord_type = lrecord_type_glyph; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
307 pstruct glyph.c Lisp_Glyph
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
308 elif test $lrecord_type = lrecord_type_gui_item; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
309 pstruct gui.c Lisp_Gui_Item
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
310 elif test $lrecord_type = lrecord_type_hash_table; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
311 pstruct elhash.c Lisp_Hash_Table
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
312 elif test $lrecord_type = lrecord_type_image_instance; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
313 pstruct glyphs.c Lisp_Image_Instance
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
314 elif test $lrecord_type = lrecord_type_keymap; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
315 pstruct keymap.c Lisp_Keymap
5598
bccc91a65536 Fix .gdbinit and .dbxrc when using the new garbage collector.
Marcus Crestani <crestani@informatik.uni-tuebingen.de>
parents: 5402
diff changeset
316 #ifndef NEW_GC
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
317 elif test $lrecord_type = lrecord_type_lcrecord_list; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
318 pstruct alloc.c lcrecord_list
5598
bccc91a65536 Fix .gdbinit and .dbxrc when using the new garbage collector.
Marcus Crestani <crestani@informatik.uni-tuebingen.de>
parents: 5402
diff changeset
319 #endif
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
320 elif test $lrecord_type = lrecord_type_ldap; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
321 pstruct ldap.c Lisp_LDAP
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
322 elif test $lrecord_type = lrecord_type_lstream; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
323 pstruct lstream.c lstream
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
324 elif test $lrecord_type = lrecord_type_marker; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
325 pstruct marker.c Lisp_Marker
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
326 elif test $lrecord_type = lrecord_type_opaque; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
327 pstruct opaque.c Lisp_Opaque
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
328 elif test $lrecord_type = lrecord_type_opaque_ptr; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
329 pstruct opaque.c Lisp_Opaque_Ptr
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
330 elif test $lrecord_type = lrecord_type_popup_data; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
331 pstruct gui-x.c popup_data
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
332 elif test $lrecord_type = lrecord_type_process; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
333 pstruct process.c Lisp_Process
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
334 elif test $lrecord_type = lrecord_type_range_table; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
335 pstruct rangetab.c Lisp_Range_Table
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
336 elif test $lrecord_type = lrecord_type_specifier; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
337 pstruct specifier.c Lisp_Specifier
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
338 elif test $lrecord_type = lrecord_type_subr; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
339 pstruct eval.c Lisp_Subr
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
340 elif test $lrecord_type = lrecord_type_symbol_value_buffer_local; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
341 pstruct symbols.c symbol_value_buffer_local
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
342 elif test $lrecord_type = lrecord_type_symbol_value_forward; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
343 pstruct symbols.c symbol_value_forward
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
344 elif test $lrecord_type = lrecord_type_symbol_value_lisp_magic; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
345 pstruct symbols.c symbol_value_lisp_magic
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
346 elif test $lrecord_type = lrecord_type_symbol_value_varalias; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
347 pstruct symbols.c symbol_value_varalias
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
348 elif test $lrecord_type = lrecord_type_timeout; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
349 pstruct event-stream.c Lisp_Timeout
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
350 elif test $lrecord_type = lrecord_type_toolbar_button; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
351 pstruct toolbar.c toolbar_button
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
352 elif test $lrecord_type = lrecord_type_tooltalk_message; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
353 pstruct tooltalk.c Lisp_Tooltalk_Message
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
354 elif test $lrecord_type = lrecord_type_tooltalk_pattern; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
355 pstruct tooltalk.c Lisp_Tooltalk_Pattern
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
356 elif test $lrecord_type = lrecord_type_weak_list; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
357 pstruct data.c weak_list
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
358 elif test $lrecord_type = lrecord_type_window; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
359 pstruct window.c window
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
360 elif test $lrecord_type = lrecord_type_window_configuration; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
361 pstruct window.c window_config
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
362 elif test "$type" = "null_pointer"; then
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
363 echo "Lisp Object is a null pointer!!"
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
364 else
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
365 echo "Unknown Lisp Object type"
5598
bccc91a65536 Fix .gdbinit and .dbxrc when using the new garbage collector.
Marcus Crestani <crestani@informatik.uni-tuebingen.de>
parents: 5402
diff changeset
366 print $lrecord_type
3418
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
367 print $1
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
368 fi
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
369 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
370
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
371 dbxenv suppress_startup_message 4.0
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
372 ## dbxenv mt_watchpoints on
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
373
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
374 function dp_core {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
375 print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
376 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
377
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
378 ## Barf!
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
379 function print_shell {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
380 print *(`frame-x.c`TopLevelShellRec*) (((struct `frame-x.c`x_frame*) (((struct `frame-x.c`frame*) (Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget)
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
381 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
382
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
383 ## -------------------------------------------------------------
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
384 ## functions to test the debugging support itself.
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
385 ## If you change this file, make sure the following still work...
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
386 ## -------------------------------------------------------------
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
387 function test_xtype {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
388 function doit { echo -n "$1: "; xtype "$1"; }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
389 test_various_objects
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
390 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
391
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
392 function test_pobj {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
393 function doit { echo '==============================='; echo -n "$1: "; pobj "$1"; }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
394 test_various_objects
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
395 }
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
396
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
397 function test_various_objects {
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
398 doit Vemacs_major_version
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
399 doit Vhelp_char
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
400 doit Qnil
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
401 doit Qunbound
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
402 doit Vobarray
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
403 doit Vall_weak_lists
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
404 doit Vxemacs_codename
a1e20876b806 [xemacs-hg @ 2006-05-23 13:18:50 by stephent]
stephent
parents:
diff changeset
405 }