annotate src/.gdbinit @ 75218:6a5ce97ea40d

(maybe_resize_hash_table): Copy new size of hash table into EMACS_INT to avoid GCC warnings.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 13 Jan 2007 21:46:28 +0000
parents 8079b89022bf
children f4d4f6f361cc 17e0dd217877 bc10a33dd40b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
68651
3bd95f4f2941 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 68297
diff changeset
1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
3bd95f4f2941 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 68297
diff changeset
2 # 2004, 2005, 2006 Free Software Foundation, Inc.
36219
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
3 #
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
4 # This file is part of GNU Emacs.
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
5 #
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
6 # GNU Emacs is free software; you can redistribute it and/or modify
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
7 # it under the terms of the GNU General Public License as published by
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
8 # the Free Software Foundation; either version 2, or (at your option)
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
9 # any later version.
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
10 #
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
11 # GNU Emacs is distributed in the hope that it will be useful,
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
14 # GNU General Public License for more details.
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
15 #
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
16 # You should have received a copy of the GNU General Public License
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
17 # along with GNU Emacs; see the file COPYING. If not, write to the
64084
a8fa7c632ee4 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62416
diff changeset
18 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
a8fa7c632ee4 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62416
diff changeset
19 # Boston, MA 02110-1301, USA.
36219
f440b9766968 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 35792
diff changeset
20
13359
4c60f92bdaa6 Do `set main' to make gdb_valbits etc. available.
Richard M. Stallman <rms@gnu.org>
parents: 12278
diff changeset
21 # Force loading of symbols, enough to give us gdb_valbits etc.
4c60f92bdaa6 Do `set main' to make gdb_valbits etc. available.
Richard M. Stallman <rms@gnu.org>
parents: 12278
diff changeset
22 set main
4c60f92bdaa6 Do `set main' to make gdb_valbits etc. available.
Richard M. Stallman <rms@gnu.org>
parents: 12278
diff changeset
23
15536
fb218a8bd186 Add `dir ../lwlib'.
Richard M. Stallman <rms@gnu.org>
parents: 13551
diff changeset
24 # Find lwlib source files too.
fb218a8bd186 Add `dir ../lwlib'.
Richard M. Stallman <rms@gnu.org>
parents: 13551
diff changeset
25 dir ../lwlib
34876
8dbc92d11de2 Comment out the line pointing to the Lesstif source
Gerd Moellmann <gerd@gnu.org>
parents: 32812
diff changeset
26 #dir /gd/gnu/lesstif-0.89.9/lib/Xm
15536
fb218a8bd186 Add `dir ../lwlib'.
Richard M. Stallman <rms@gnu.org>
parents: 13551
diff changeset
27
20672
0ef14112e9b3 Make GDB not handle SIGINT.
Karl Heuer <kwzh@gnu.org>
parents: 20582
diff changeset
28 # Don't enter GDB when user types C-g to quit.
0ef14112e9b3 Make GDB not handle SIGINT.
Karl Heuer <kwzh@gnu.org>
parents: 20582
diff changeset
29 # This has one unfortunate effect: you can't type C-c
0ef14112e9b3 Make GDB not handle SIGINT.
Karl Heuer <kwzh@gnu.org>
parents: 20582
diff changeset
30 # at the GDB to stop Emacs, when using X.
0ef14112e9b3 Make GDB not handle SIGINT.
Karl Heuer <kwzh@gnu.org>
parents: 20582
diff changeset
31 # However, C-z works just as well in that case.
67027
e40cac65496b Revert unwanted changes.
Andreas Schwab <schwab@suse.de>
parents: 67020
diff changeset
32 handle 2 noprint pass
20672
0ef14112e9b3 Make GDB not handle SIGINT.
Karl Heuer <kwzh@gnu.org>
parents: 20582
diff changeset
33
66903
4689a51b18f9 Make SIGTSTP work like SIGINT normally does.
Nick Roberts <nickrob@snap.net.nz>
parents: 66817
diff changeset
34 # Make it work like SIGINT normally does.
4689a51b18f9 Make SIGTSTP work like SIGINT normally does.
Nick Roberts <nickrob@snap.net.nz>
parents: 66817
diff changeset
35 handle SIGTSTP nopass
4689a51b18f9 Make SIGTSTP work like SIGINT normally does.
Nick Roberts <nickrob@snap.net.nz>
parents: 66817
diff changeset
36
74750
8079b89022bf Pass on SIGUSR1 and SIGUSR2 to Emacs.
Kim F. Storm <storm@cua.dk>
parents: 72390
diff changeset
37 # Pass on user signals
8079b89022bf Pass on SIGUSR1 and SIGUSR2 to Emacs.
Kim F. Storm <storm@cua.dk>
parents: 72390
diff changeset
38 handle SIGUSR1 noprint pass
8079b89022bf Pass on SIGUSR1 and SIGUSR2 to Emacs.
Kim F. Storm <storm@cua.dk>
parents: 72390
diff changeset
39 handle SIGUSR2 noprint pass
8079b89022bf Pass on SIGUSR1 and SIGUSR2 to Emacs.
Kim F. Storm <storm@cua.dk>
parents: 72390
diff changeset
40
30636
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
41 # Don't pass SIGALRM to Emacs. This makes problems when
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
42 # debugging.
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
43 handle SIGALRM ignore
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
44
59660
5ee7eaad2958 (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Richard M. Stallman <rms@gnu.org>
parents: 57911
diff changeset
45 # $valmask and $tagmask are mask values set up by the xreload macro below.
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
46
59660
5ee7eaad2958 (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Richard M. Stallman <rms@gnu.org>
parents: 57911
diff changeset
47 # Use $bugfix so that the value isn't a constant.
5ee7eaad2958 (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Richard M. Stallman <rms@gnu.org>
parents: 57911
diff changeset
48 # Using a constant runs into GDB bugs sometimes.
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
49 define xgetptr
59660
5ee7eaad2958 (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Richard M. Stallman <rms@gnu.org>
parents: 57911
diff changeset
50 set $bugfix = $arg0
5ee7eaad2958 (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Richard M. Stallman <rms@gnu.org>
parents: 57911
diff changeset
51 set $ptr = (gdb_use_union ? $bugfix.u.val : $bugfix & $valmask) | gdb_data_seg_bits
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
52 end
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
53
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
54 define xgetint
59660
5ee7eaad2958 (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Richard M. Stallman <rms@gnu.org>
parents: 57911
diff changeset
55 set $bugfix = $arg0
5ee7eaad2958 (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Richard M. Stallman <rms@gnu.org>
parents: 57911
diff changeset
56 set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix : $bugfix << gdb_gctypebits) >> gdb_gctypebits
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
57 end
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
58
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
59 define xgettype
59660
5ee7eaad2958 (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Richard M. Stallman <rms@gnu.org>
parents: 57911
diff changeset
60 set $bugfix = $arg0
5ee7eaad2958 (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable.
Richard M. Stallman <rms@gnu.org>
parents: 57911
diff changeset
61 set $type = gdb_use_union ? $bugfix.s.type : (enum Lisp_Type) (gdb_use_lsb ? $bugfix & $tagmask : $bugfix >> gdb_valbits)
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
62 end
11872
a28bd38b2ff3 gdb_lisp_params to get storage layout info.
Karl Heuer <kwzh@gnu.org>
parents: 11006
diff changeset
63
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 # Set up something to print out s-expressions.
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
65 # We save and restore print_output_debug_flag to prevent the w32 port
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
66 # from calling OutputDebugString, which causes GDB to display each
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
67 # character twice (yuk!).
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68 define pr
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
69 set $output_debug = print_output_debug_flag
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
70 set print_output_debug_flag = 0
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
71 set debug_print ($)
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
72 set print_output_debug_flag = $output_debug
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 document pr
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 Print the emacs s-expression which is $.
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 Works only when an inferior emacs is executing.
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78
57306
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
79 # Print out s-expressions
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
80 define pp
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
81 set $tmp = $arg0
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
82 set $output_debug = print_output_debug_flag
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
83 set print_output_debug_flag = 0
66776
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
84 set safe_debug_print ($tmp)
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
85 set print_output_debug_flag = $output_debug
57306
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
86 end
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
87 document pp
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
88 Print the argument as an emacs s-expression
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
89 Works only when an inferior emacs is executing.
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
90 end
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
91
66772
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
92 # Print out s-expressions from tool bar
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
93 define pp1
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
94 set $tmp = $arg0
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
95 set $output_debug = print_output_debug_flag
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
96 set print_output_debug_flag = 0
66776
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
97 set safe_debug_print ($tmp)
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
98 set print_output_debug_flag = $output_debug
66772
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
99 end
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
100 document pp1
70247
039ae41bde1a (pp1, pv1): Only print value as expression is now printed out by gud-print.
Nick Roberts <nickrob@snap.net.nz>
parents: 69679
diff changeset
101 Print the argument as an emacs s-expression.
66772
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
102 Works only when an inferior emacs is executing.
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
103 For use on tool bar when debugging in Emacs
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
104 where the variable name would not otherwise
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
105 be recorded in the GUD buffer.
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
106 end
f14bee895419 (pp1): New user-defined function.
Nick Roberts <nickrob@snap.net.nz>
parents: 64321
diff changeset
107
66776
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
108 # Print value of lisp variable
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
109 define pv
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
110 set $tmp = "$arg0"
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
111 set $output_debug = print_output_debug_flag
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
112 set print_output_debug_flag = 0
66776
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
113 set safe_debug_print ( find_symbol_value (intern ($tmp)))
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
114 set print_output_debug_flag = $output_debug
66776
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
115 end
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
116 document pv
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
117 Print the value of the lisp variable given as argument.
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
118 Works only when an inferior emacs is executing.
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
119 end
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
120
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
121 # Print value of lisp variable
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
122 define pv1
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
123 set $tmp = "$arg0"
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
124 set $output_debug = print_output_debug_flag
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
125 set print_output_debug_flag = 0
66776
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
126 set safe_debug_print (find_symbol_value (intern ($tmp)))
69679
7a7755ff46ed (pr, pp, pp1, pv, pv1): Force print_output_debug_flag to zero
Eli Zaretskii <eliz@gnu.org>
parents: 68857
diff changeset
127 set print_output_debug_flag = $output_debug
66776
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
128 end
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
129 document pv1
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
130 Print the value of the lisp variable given as argument.
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
131 Works only when an inferior emacs is executing.
70247
039ae41bde1a (pp1, pv1): Only print value as expression is now printed out by gud-print.
Nick Roberts <nickrob@snap.net.nz>
parents: 69679
diff changeset
132 For use when debugging in Emacs where the variable
039ae41bde1a (pp1, pv1): Only print value as expression is now printed out by gud-print.
Nick Roberts <nickrob@snap.net.nz>
parents: 69679
diff changeset
133 name would not otherwise be recorded in the GUD buffer.
66776
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
134 end
2acb0afcc57a (pp, pp1): Use safe_debug_print.
Kim F. Storm <storm@cua.dk>
parents: 66772
diff changeset
135
57911
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
136 # Print out current buffer point and boundaries
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
137 define ppt
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
138 set $b = current_buffer
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
139 set $t = $b->text
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
140 printf "BUF PT: %d", $b->pt
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
141 if ($b->pt != $b->pt_byte)
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
142 printf "[%d]", $b->pt_byte
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
143 end
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
144 printf " of 1..%d", $t->z
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
145 if ($t->z != $t->z_byte)
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
146 printf "[%d]", $t->z_byte
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
147 end
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
148 if ($b->begv != 1 || $b->zv != $t->z)
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
149 printf " NARROW=%d..%d", $b->begv, $b->zv
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
150 if ($b->begv != $b->begv_byte || $b->zv != $b->zv_byte)
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
151 printf " [%d..%d]", $b->begv_byte, $b->zv_byte
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
152 end
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
153 end
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
154 printf " GAP: %d", $t->gpt
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
155 if ($t->gpt != $t->gpt_byte)
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
156 printf "[%d]", $t->gpt_byte
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
157 end
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
158 printf " SZ=%d\n", $t->gap_size
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
159 end
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
160 document ppt
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
161 Print point, beg, end, narrow, and gap for current buffer.
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
162 end
d1917e4b98e7 (ppt): New function.
Kim F. Storm <storm@cua.dk>
parents: 57306
diff changeset
163
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
164 # Print out iterator given as first arg
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
165 define pitx
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
166 set $it = $arg0
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
167 printf "cur=%d", $it->current.pos.charpos
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
168 if ($it->current.pos.charpos != $it->current.pos.bytepos)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
169 printf "[%d]", $it->current.pos.bytepos
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
170 end
72390
00776be18466 (pitx): Print iterator position.
Kim F. Storm <storm@cua.dk>
parents: 71433
diff changeset
171 printf " pos=%d", $it->position.charpos
00776be18466 (pitx): Print iterator position.
Kim F. Storm <storm@cua.dk>
parents: 71433
diff changeset
172 if ($it->position.charpos != $it->position.bytepos)
00776be18466 (pitx): Print iterator position.
Kim F. Storm <storm@cua.dk>
parents: 71433
diff changeset
173 printf "[%d]", $it->position.bytepos
00776be18466 (pitx): Print iterator position.
Kim F. Storm <storm@cua.dk>
parents: 71433
diff changeset
174 end
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
175 printf " start=%d", $it->start.pos.charpos
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
176 if ($it->start.pos.charpos != $it->start.pos.bytepos)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
177 printf "[%d]", $it->start.pos.bytepos
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
178 end
62416
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
179 printf " end=%d", $it->end_charpos
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
180 printf " stop=%d", $it->stop_charpos
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
181 printf " face=%d", $it->face_id
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
182 if ($it->multibyte_p)
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
183 printf " MB"
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
184 end
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
185 if ($it->header_line_p)
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
186 printf " HL"
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
187 end
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
188 if ($it->n_overlay_strings > 0)
66817
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
189 printf " nov=%d", $it->n_overlay_strings
62416
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
190 end
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
191 if ($it->sp != 0)
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
192 printf " sp=%d", $it->sp
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
193 end
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
194 if ($it->what == IT_CHARACTER)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
195 if ($it->len == 1 && $it->c >= ' ' && it->c < 255)
64321
18dde5f76662 (pitx): Fix output format. Print string charpos.
Kim F. Storm <storm@cua.dk>
parents: 64084
diff changeset
196 printf " ch='%c'", $it->c
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
197 else
64321
18dde5f76662 (pitx): Fix output format. Print string charpos.
Kim F. Storm <storm@cua.dk>
parents: 64084
diff changeset
198 printf " ch=[%d,%d]", $it->c, $it->len
62416
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
199 end
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
200 else
71363
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
201 printf " "
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
202 output $it->what
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
203 end
62416
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
204 if ($it->method != GET_FROM_BUFFER)
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
205 printf " next="
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
206 output $it->method
64321
18dde5f76662 (pitx): Fix output format. Print string charpos.
Kim F. Storm <storm@cua.dk>
parents: 64084
diff changeset
207 if ($it->method == GET_FROM_STRING)
18dde5f76662 (pitx): Fix output format. Print string charpos.
Kim F. Storm <storm@cua.dk>
parents: 64084
diff changeset
208 printf "[%d]", $it->current.string_pos.charpos
18dde5f76662 (pitx): Fix output format. Print string charpos.
Kim F. Storm <storm@cua.dk>
parents: 64084
diff changeset
209 end
71363
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
210 if ($it->method == GET_FROM_IMAGE)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
211 printf "[%d]", $it->image_id
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
212 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
213 if ($it->method == GET_FROM_COMPOSITION)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
214 printf "[%d,%d,%d]", $it->cmp_id, $it->len, $it->cmp_len
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
215 end
62416
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
216 end
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
217 printf "\n"
62416
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
218 if ($it->region_beg_charpos >= 0)
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
219 printf "reg=%d-%d ", $it->region_beg_charpos, $it->region_end_charpos
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
220 end
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
221 printf "vpos=%d hpos=%d", $it->vpos, $it->hpos,
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
222 printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y
62416
123211374403 (pitx): Print more info about iterator.
Kim F. Storm <storm@cua.dk>
parents: 60148
diff changeset
223 printf " x=%d vx=%d-%d", $it->current_x, $it->first_visible_x, $it->last_visible_x
70425
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
224 printf " w=%d", $it->pixel_width
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
225 printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
226 printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
227 printf "\n"
71433
562b7f0c2fe8 (pitx): Dump iterator stack.
Kim F. Storm <storm@cua.dk>
parents: 71363
diff changeset
228 set $i = 0
72390
00776be18466 (pitx): Print iterator position.
Kim F. Storm <storm@cua.dk>
parents: 71433
diff changeset
229 while ($i < $it->sp && $i < 4)
71433
562b7f0c2fe8 (pitx): Dump iterator stack.
Kim F. Storm <storm@cua.dk>
parents: 71363
diff changeset
230 set $e = $it->stack[$i]
562b7f0c2fe8 (pitx): Dump iterator stack.
Kim F. Storm <storm@cua.dk>
parents: 71363
diff changeset
231 printf "stack[%d]: ", $i
562b7f0c2fe8 (pitx): Dump iterator stack.
Kim F. Storm <storm@cua.dk>
parents: 71363
diff changeset
232 output $e->method
562b7f0c2fe8 (pitx): Dump iterator stack.
Kim F. Storm <storm@cua.dk>
parents: 71363
diff changeset
233 printf "[%d]", $e->position.charpos
562b7f0c2fe8 (pitx): Dump iterator stack.
Kim F. Storm <storm@cua.dk>
parents: 71363
diff changeset
234 printf "\n"
562b7f0c2fe8 (pitx): Dump iterator stack.
Kim F. Storm <storm@cua.dk>
parents: 71363
diff changeset
235 set $i = $i + 1
562b7f0c2fe8 (pitx): Dump iterator stack.
Kim F. Storm <storm@cua.dk>
parents: 71363
diff changeset
236 end
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
237 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
238 document pitx
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
239 Pretty print a display iterator.
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
240 Take one arg, an iterator object or pointer.
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
241 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
242
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
243 define pit
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
244 pitx it
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
245 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
246 document pit
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
247 Pretty print the display iterator it.
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
248 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
249
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
250 define prowx
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
251 set $row = $arg0
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
252 printf "y=%d x=%d pwid=%d", $row->y, $row->x, $row->pixel_width
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
253 printf " a+d=%d+%d=%d", $row->ascent, $row->height-$row->ascent, $row->height
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
254 printf " phys=%d+%d=%d", $row->phys_ascent, $row->phys_height-$row->phys_ascent, $row->phys_height
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
255 printf " vis=%d", $row->visible_height
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
256 printf " L=%d T=%d R=%d", $row->used[0], $row->used[1], $row->used[2]
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
257 printf "\n"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
258 printf "start=%d end=%d", $row->start.pos.charpos, $row->end.pos.charpos
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
259 if ($row->enabled_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
260 printf " ENA"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
261 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
262 if ($row->displays_text_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
263 printf " DISP"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
264 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
265 if ($row->mode_line_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
266 printf " MODEL"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
267 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
268 if ($row->continued_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
269 printf " CONT"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
270 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
271 if ($row-> truncated_on_left_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
272 printf " TRUNC:L"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
273 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
274 if ($row-> truncated_on_right_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
275 printf " TRUNC:R"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
276 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
277 if ($row->starts_in_middle_of_char_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
278 printf " STARTMID"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
279 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
280 if ($row->ends_in_middle_of_char_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
281 printf " ENDMID"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
282 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
283 if ($row->ends_in_newline_from_string_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
284 printf " ENDNLFS"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
285 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
286 if ($row->ends_at_zv_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
287 printf " ENDZV"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
288 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
289 if ($row->overlapped_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
290 printf " OLAPD"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
291 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
292 if ($row->overlapping_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
293 printf " OLAPNG"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
294 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
295 printf "\n"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
296 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
297 document prowx
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
298 Pretty print information about glyph_row.
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
299 Takes one argument, a row object or pointer.
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
300 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
301
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
302 define prow
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
303 prowx row
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
304 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
305 document prow
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
306 Pretty print information about glyph_row in row.
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
307 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
308
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
309
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
310 define pcursorx
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
311 set $cp = $arg0
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
312 printf "y=%d x=%d vpos=%d hpos=%d", $cp->y, $cp->x, $cp->vpos, $cp->hpos
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
313 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
314 document pcursorx
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
315 Pretty print a window cursor
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
316 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
317
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
318 define pcursor
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
319 printf "output: "
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
320 pcursorx output_cursor
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
321 printf "\n"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
322 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
323 document pcursor
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
324 Pretty print the output_cursor
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
325 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
326
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
327 define pwinx
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
328 set $w = $arg0
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
329 xgetint $w->sequence_number
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
330 if ($w->mini_p != Qnil)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
331 printf "Mini "
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
332 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
333 printf "Window %d ", $int
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
334 xgetptr $w->buffer
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
335 set $tem = (struct buffer *) $ptr
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
336 xgetptr $tem->name
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
337 printf "%s", ((struct Lisp_String *) $ptr)->data
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
338 printf "\n"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
339 xgetptr $w->start
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
340 set $tem = (struct Lisp_Marker *) $ptr
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
341 printf "start=%d end:", $tem->charpos
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
342 if ($w->window_end_valid != Qnil)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
343 xgetint $w->window_end_pos
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
344 printf "pos=%d", $int
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
345 xgetint $w->window_end_vpos
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
346 printf " vpos=%d", $int
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
347 else
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
348 printf "invalid"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
349 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
350 printf " vscroll=%d", $w->vscroll
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
351 if ($w->force_start != Qnil)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
352 printf " FORCE_START"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
353 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
354 if ($w->must_be_updated_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
355 printf " MUST_UPD"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
356 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
357 printf "\n"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
358 printf "cursor: "
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
359 pcursorx $w->cursor
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
360 printf " phys: "
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
361 pcursorx $w->phys_cursor
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
362 if ($w->phys_cursor_on_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
363 printf " ON"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
364 else
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
365 printf " OFF"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
366 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
367 printf " blk="
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
368 if ($w->last_cursor_off_p != $w->cursor_off_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
369 if ($w->last_cursor_off_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
370 printf "ON->"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
371 else
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
372 printf "OFF->"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
373 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
374 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
375 if ($w->cursor_off_p)
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
376 printf "ON"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
377 else
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
378 printf "OFF"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
379 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
380 printf "\n"
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
381 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
382 document pwinx
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
383 Pretty print a window structure.
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
384 Takes one argument, a pointer to a window structure
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
385 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
386
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
387 define pwin
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
388 pwinx w
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
389 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
390 document pwin
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
391 Pretty print window structure w.
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
392 end
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
393
71363
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
394 define pgx
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
395 set $g = $arg0
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
396 if ($g->type == CHAR_GLYPH)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
397 if ($g->u.ch >= ' ' && $g->u.ch < 127)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
398 printf "CHAR[%c]", $g->u.ch
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
399 else
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
400 printf "CHAR[0x%x]", $g->u.ch
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
401 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
402 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
403 if ($g->type == COMPOSITE_GLYPH)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
404 printf "COMP[%d]", $g->u.cmp_id
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
405 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
406 if ($g->type == IMAGE_GLYPH)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
407 printf "IMAGE[%d]", $g->u.img_id
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
408 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
409 if ($g->type == STRETCH_GLYPH)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
410 printf "STRETCH[%d+%d]", $g->u.stretch.height, $g->u.stretch.ascent
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
411 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
412 xgettype ($g->object)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
413 if ($type == Lisp_String)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
414 printf " str=%x[%d]", $g->object, $g->charpos
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
415 else
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
416 printf " pos=%d", $g->charpos
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
417 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
418 printf " w=%d a+d=%d+%d", $g->pixel_width, $g->ascent, $g->descent
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
419 if ($g->face_id != DEFAULT_FACE_ID)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
420 printf " face=%d", $g->face_id
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
421 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
422 if ($g->voffset)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
423 printf " vof=%d", $g->voffset
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
424 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
425 if ($g->multibyte_p)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
426 printf " MB"
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
427 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
428 if ($g->padding_p)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
429 printf " PAD"
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
430 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
431 if ($g->glyph_not_available_p)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
432 printf " N/A"
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
433 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
434 if ($g->overlaps_vertically_p)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
435 printf " OVL"
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
436 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
437 if ($g->left_box_line_p)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
438 printf " ["
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
439 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
440 if ($g->right_box_line_p)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
441 printf " ]"
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
442 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
443 if ($g->slice.x || $g->slice.y || $g->slice.width || $g->slice.height)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
444 printf " slice=%d,%d,%d,%d" ,$g->slice.x, $g->slice.y, $g->slice.width, $g->slice.height
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
445 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
446 printf "\n"
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
447 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
448 document pgx
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
449 Pretty print a glyph structure.
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
450 Takes one argument, a pointer to a glyph structure
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
451 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
452
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
453 define pg
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
454 set $pgidx = 0
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
455 pgx glyph
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
456 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
457 document pg
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
458 Pretty print glyph structure glyph.
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
459 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
460
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
461 define pgi
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
462 set $pgidx = $arg0
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
463 pgx (&glyph[$pgidx])
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
464 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
465 document pgi
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
466 Pretty print glyph structure glyph[I].
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
467 Takes one argument, a integer I.
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
468 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
469
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
470 define pgn
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
471 set $pgidx = $pgidx + 1
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
472 pgx (&glyph[$pgidx])
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
473 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
474 document pgn
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
475 Pretty print next glyph structure.
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
476 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
477
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
478 define pgrowx
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
479 set $row = $arg0
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
480 set $area = 0
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
481 set $xofs = $row->x
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
482 while ($area < 3)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
483 set $used = $row->used[$area]
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
484 if ($used > 0)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
485 set $gl0 = $row->glyphs[$area]
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
486 set $pgidx = 0
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
487 printf "%s: %d glyphs\n", ($area == 0 ? "LEFT" : $area == 2 ? "RIGHT" : "TEXT"), $used
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
488 while ($pgidx < $used)
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
489 printf "%3d %4d: ", $pgidx, $xofs
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
490 pgx $gl0[$pgidx]
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
491 set $xofs = $xofs + $gl0[$pgidx]->pixel_width
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
492 set $pgidx = $pgidx + 1
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
493 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
494 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
495 set $area = $area + 1
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
496 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
497 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
498 document pgrowx
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
499 Pretty print all glyphs in a row structure.
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
500 Takes one argument, a pointer to a row structure.
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
501 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
502
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
503 define pgrow
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
504 pgrowx row
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
505 end
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
506 document pgrow
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
507 Pretty print all glyphs in row structure row.
9f75a05018ea (pitx): Show composition parameters.
Kim F. Storm <storm@cua.dk>
parents: 70425
diff changeset
508 end
60148
28b65d07edde (pitx, pit): Pretty print display iterator.
Kim F. Storm <storm@cua.dk>
parents: 59660
diff changeset
509
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
510 define xtype
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
511 xgettype $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
512 output $type
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
513 echo \n
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
514 if $type == Lisp_Misc
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
515 xmisctype
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
516 else
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
517 if $type == Lisp_Vectorlike
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
518 xvectype
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
519 end
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
520 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
521 end
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
522 document xtype
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
523 Print the type of $, assuming it is an Emacs Lisp value.
10299
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
524 If the first type printed is Lisp_Vector or Lisp_Misc,
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
525 a second line gives the more precise type.
10299
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
526 end
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
527
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
528 define xvectype
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
529 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
530 set $size = ((struct Lisp_Vector *) $ptr)->size
55609
253acecd37f9 Mask off gdb_array_mark_flag from vector sizes.
Andreas Schwab <schwab@suse.de>
parents: 54690
diff changeset
531 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size & ~gdb_array_mark_flag
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
532 echo \n
10299
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
533 end
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
534 document xvectype
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
535 Print the size or vector subtype of $, assuming it is a vector or pseudovector.
10299
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
536 end
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
537
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
538 define xmisctype
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
539 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
540 output (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type)
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
541 echo \n
10299
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
542 end
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
543 document xmisctype
0de933eb95a2 Adapt to new Lisp_Object format.
Richard M. Stallman <rms@gnu.org>
parents: 8310
diff changeset
544 Print the specific type of $, assuming it is some misc type.
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
545 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
546
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
547 define xint
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
548 xgetint $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
549 print $int
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
550 end
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
551 document xint
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
552 Print $, assuming it is an Emacs Lisp integer. This gets the sign right.
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
553 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
554
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
555 define xptr
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
556 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
557 print (void *) $ptr
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
558 end
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
559 document xptr
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
560 Print the pointer portion of $, assuming it is an Emacs Lisp value.
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
561 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
562
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
563 define xmarker
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
564 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
565 print (struct Lisp_Marker *) $ptr
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
566 end
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
567 document xmarker
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
568 Print $ as a marker pointer, assuming it is an Emacs Lisp marker value.
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
569 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
570
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
571 define xoverlay
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
572 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
573 print (struct Lisp_Overlay *) $ptr
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
574 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
575 document xoverlay
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
576 Print $ as a overlay pointer, assuming it is an Emacs Lisp overlay value.
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
577 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
578
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
579 define xmiscfree
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
580 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
581 print (struct Lisp_Free *) $ptr
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
582 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
583 document xmiscfree
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
584 Print $ as a misc free-cell pointer, assuming it is an Emacs Lisp Misc value.
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
585 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
586
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
587 define xintfwd
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
588 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
589 print (struct Lisp_Intfwd *) $ptr
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
590 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
591 document xintfwd
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
592 Print $ as an integer forwarding pointer, assuming it is an Emacs Lisp Misc value.
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
593 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
594
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
595 define xboolfwd
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
596 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
597 print (struct Lisp_Boolfwd *) $ptr
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
598 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
599 document xboolfwd
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
600 Print $ as a boolean forwarding pointer, assuming it is an Emacs Lisp Misc value.
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
601 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
602
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
603 define xobjfwd
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
604 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
605 print (struct Lisp_Objfwd *) $ptr
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
606 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
607 document xobjfwd
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
608 Print $ as an object forwarding pointer, assuming it is an Emacs Lisp Misc value.
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
609 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
610
10495
70bd087c47a9 (xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents: 10483
diff changeset
611 define xbufobjfwd
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
612 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
613 print (struct Lisp_Buffer_Objfwd *) $ptr
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
614 end
10495
70bd087c47a9 (xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents: 10483
diff changeset
615 document xbufobjfwd
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
616 Print $ as a buffer-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
617 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
618
11006
2aa4135eee50 (xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents: 10582
diff changeset
619 define xkbobjfwd
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
620 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
621 print (struct Lisp_Kboard_Objfwd *) $ptr
10582
6063c1f07723 (xdispobjfwd): New macro.
Karl Heuer <kwzh@gnu.org>
parents: 10495
diff changeset
622 end
11006
2aa4135eee50 (xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents: 10582
diff changeset
623 document xkbobjfwd
2aa4135eee50 (xkbobjfwd): Renamed from xdispobjfwd.
Karl Heuer <kwzh@gnu.org>
parents: 10582
diff changeset
624 Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
10582
6063c1f07723 (xdispobjfwd): New macro.
Karl Heuer <kwzh@gnu.org>
parents: 10495
diff changeset
625 end
6063c1f07723 (xdispobjfwd): New macro.
Karl Heuer <kwzh@gnu.org>
parents: 10495
diff changeset
626
10495
70bd087c47a9 (xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents: 10483
diff changeset
627 define xbuflocal
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
628 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
629 print (struct Lisp_Buffer_Local_Value *) $ptr
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
630 end
10495
70bd087c47a9 (xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents: 10483
diff changeset
631 document xbuflocal
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
632 Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value.
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
633 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
634
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
635 define xsymbol
55686
c17438f97e46 (xsymbol): Fix last change.
Kim F. Storm <storm@cua.dk>
parents: 55681
diff changeset
636 set $sym = $
c17438f97e46 (xsymbol): Fix last change.
Kim F. Storm <storm@cua.dk>
parents: 55681
diff changeset
637 xgetptr $sym
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
638 print (struct Lisp_Symbol *) $ptr
55686
c17438f97e46 (xsymbol): Fix last change.
Kim F. Storm <storm@cua.dk>
parents: 55681
diff changeset
639 xprintsym $sym
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
640 echo \n
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
641 end
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
642 document xsymbol
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
643 Print the name and address of the symbol $.
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
644 This command assumes that $ is an Emacs Lisp symbol value.
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
645 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
646
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
647 define xstring
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
648 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
649 print (struct Lisp_String *) $ptr
55681
91c18484e1a2 (xprintstr): New fun.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 55609
diff changeset
650 xprintstr $
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
651 echo \n
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
652 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
653 document xstring
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
654 Print the contents and address of the string $.
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
655 This command assumes that $ is an Emacs Lisp string value.
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
656 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
657
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
658 define xvector
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
659 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
660 print (struct Lisp_Vector *) $ptr
55609
253acecd37f9 Mask off gdb_array_mark_flag from vector sizes.
Andreas Schwab <schwab@suse.de>
parents: 54690
diff changeset
661 output ($->size > 50) ? 0 : ($->contents[0])@($->size & ~gdb_array_mark_flag)
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 949
diff changeset
662 echo \n
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
663 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
664 document xvector
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
665 Print the contents and address of the vector $.
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
666 This command assumes that $ is an Emacs Lisp vector value.
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
667 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
668
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
669 define xprocess
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
670 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
671 print (struct Lisp_Process *) $ptr
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
672 output *$
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
673 echo \n
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
674 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
675 document xprocess
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
676 Print the address of the struct Lisp_process which the Lisp_Object $ points to.
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
677 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
678
1113
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 1069
diff changeset
679 define xframe
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
680 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
681 print (struct frame *) $ptr
70425
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
682 xgetptr $->name
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
683 set $ptr = (struct Lisp_String *) $ptr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
684 xprintstr $ptr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
685 echo \n
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
686 end
1113
0ffcf74fb8ad entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 1069
diff changeset
687 document xframe
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
688 Print $ as a frame pointer, assuming it is an Emacs Lisp frame value.
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
689 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
690
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
691 define xcompiled
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
692 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
693 print (struct Lisp_Vector *) $ptr
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
694 output ($->contents[0])@($->size & 0xff)
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
695 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
696 document xcompiled
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
697 Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value.
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
698 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
699
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
700 define xwindow
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
701 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
702 print (struct window *) $ptr
68857
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
703 set $window = (struct window *) $ptr
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
704 xgetint $window->total_cols
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
705 set $width=$int
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
706 xgetint $window->total_lines
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
707 set $height=$int
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
708 xgetint $window->left_col
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
709 set $left=$int
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
710 xgetint $window->top_line
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
711 set $top=$int
faf10626ffee (xwindow): Update the code to show the window box.
Richard M. Stallman <rms@gnu.org>
parents: 68651
diff changeset
712 printf "%dx%d+%d+%d\n", $width, $height, $left, $top
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
713 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
714 document xwindow
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
715 Print $ as a window pointer, assuming it is an Emacs Lisp window value.
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
716 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
717 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
718
10495
70bd087c47a9 (xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents: 10483
diff changeset
719 define xwinconfig
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
720 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
721 print (struct save_window_data *) $ptr
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
722 end
10495
70bd087c47a9 (xbufobjfwd, xbuflocal, xwinconfig):
Karl Heuer <kwzh@gnu.org>
parents: 10483
diff changeset
723 document xwinconfig
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
724 Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value.
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
725 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
726
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
727 define xsubr
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
728 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
729 print (struct Lisp_Subr *) $ptr
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
730 output *$
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
731 echo \n
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
732 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
733 document xsubr
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
734 Print the address of the subr which the Lisp_Object $ points to.
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
735 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
736
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
737 define xchartable
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
738 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
739 print (struct Lisp_Char_Table *) $ptr
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
740 printf "Purpose: "
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
741 xprintsym $->purpose
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
742 printf " %d extra slots", ($->size & 0x1ff) - 388
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
743 echo \n
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
744 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
745 document xchartable
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
746 Print the address of the char-table $, and its purpose.
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
747 This command assumes that $ is an Emacs Lisp char-table value.
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
748 end
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
749
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
750 define xboolvector
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
751 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
752 print (struct Lisp_Bool_Vector *) $ptr
55609
253acecd37f9 Mask off gdb_array_mark_flag from vector sizes.
Andreas Schwab <schwab@suse.de>
parents: 54690
diff changeset
753 output ($->size > 256) ? 0 : ($->data[0])@((($->size & ~gdb_array_mark_flag) + 7)/ 8)
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
754 echo \n
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
755 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
756 document xboolvector
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
757 Print the contents and address of the bool-vector $.
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
758 This command assumes that $ is an Emacs Lisp bool-vector value.
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
759 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
760
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
761 define xbuffer
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
762 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
763 print (struct buffer *) $ptr
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
764 xgetptr $->name
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
765 output ((struct Lisp_String *) $ptr)->data
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
766 echo \n
22012
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
767 end
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
768 document xbuffer
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
769 Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value.
4379a41b6f2e (xstring): Handle unibyte strings.
Richard M. Stallman <rms@gnu.org>
parents: 20672
diff changeset
770 Print the name of the buffer.
10483
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
771 end
727cd2061e2a (xboolfwd, xbuffer_local_value, xbuffer_objfwd, xcompiled, xintfwd, xmiscfree,
Karl Heuer <kwzh@gnu.org>
parents: 10337
diff changeset
772
30636
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
773 define xhashtable
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
774 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
775 print (struct Lisp_Hash_Table *) $ptr
30636
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
776 end
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
777 document xhashtable
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
778 Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value.
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
779 end
88e0ba67d3bc (xhashtable): New command.
Gerd Moellmann <gerd@gnu.org>
parents: 27290
diff changeset
780
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
781 define xcons
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
782 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
783 print (struct Lisp_Cons *) $ptr
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
784 output/x *$
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
785 echo \n
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
786 end
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
787 document xcons
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
788 Print the contents of $, assuming it is an Emacs Lisp cons.
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
789 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
790
18522
c572c073c982 (xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents: 15536
diff changeset
791 define nextcons
67020
2385088bbb84 (nextcons, xcdr, xfloat): Update for changes in
Andreas Schwab <schwab@suse.de>
parents: 66903
diff changeset
792 p $.u.cdr
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
793 xcons
18522
c572c073c982 (xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents: 15536
diff changeset
794 end
c572c073c982 (xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents: 15536
diff changeset
795 document nextcons
c572c073c982 (xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents: 15536
diff changeset
796 Print the contents of the next cell in a list.
c572c073c982 (xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents: 15536
diff changeset
797 This assumes that the last thing you printed was a cons cell contents
c572c073c982 (xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents: 15536
diff changeset
798 (type struct Lisp_Cons) or a pointer to one.
c572c073c982 (xcons): Print car and cdr in hex.
Richard M. Stallman <rms@gnu.org>
parents: 15536
diff changeset
799 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
800 define xcar
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
801 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
802 xgettype $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
803 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->car : 0)
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
804 end
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
805 document xcar
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
806 Print the car of $, assuming it is an Emacs Lisp pair.
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
807 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
808
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
809 define xcdr
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
810 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
811 xgettype $
67020
2385088bbb84 (nextcons, xcdr, xfloat): Update for changes in
Andreas Schwab <schwab@suse.de>
parents: 66903
diff changeset
812 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->u.cdr : 0)
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
813 end
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
814 document xcdr
7962
05260d3b988d Doc fixes.
Richard M. Stallman <rms@gnu.org>
parents: 7961
diff changeset
815 Print the cdr of $, assuming it is an Emacs Lisp pair.
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
816 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
817
70425
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
818 define xlist
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
819 xgetptr $
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
820 set $cons = (struct Lisp_Cons *) $ptr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
821 xgetptr Qnil
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
822 set $nil = $ptr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
823 set $i = 0
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
824 while $cons != $nil && $i < 10
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
825 p/x $cons->car
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
826 xpr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
827 xgetptr $cons->u.cdr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
828 set $cons = (struct Lisp_Cons *) $ptr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
829 set $i = $i + 1
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
830 printf "---\n"
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
831 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
832 if $cons == $nil
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
833 printf "nil\n"
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
834 else
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
835 printf "...\n"
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
836 p $ptr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
837 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
838 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
839 document xlist
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
840 Print $ assuming it is a list.
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
841 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
842
4267
aabcab2eab73 Add size to geometry spec.
Jim Blandy <jimb@redhat.com>
parents: 2162
diff changeset
843 define xfloat
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
844 xgetptr $
67020
2385088bbb84 (nextcons, xcdr, xfloat): Update for changes in
Andreas Schwab <schwab@suse.de>
parents: 66903
diff changeset
845 print ((struct Lisp_Float *) $ptr)->u.data
4267
aabcab2eab73 Add size to geometry spec.
Jim Blandy <jimb@redhat.com>
parents: 2162
diff changeset
846 end
aabcab2eab73 Add size to geometry spec.
Jim Blandy <jimb@redhat.com>
parents: 2162
diff changeset
847 document xfloat
aabcab2eab73 Add size to geometry spec.
Jim Blandy <jimb@redhat.com>
parents: 2162
diff changeset
848 Print $ assuming it is a lisp floating-point number.
aabcab2eab73 Add size to geometry spec.
Jim Blandy <jimb@redhat.com>
parents: 2162
diff changeset
849 end
aabcab2eab73 Add size to geometry spec.
Jim Blandy <jimb@redhat.com>
parents: 2162
diff changeset
850
1789
2c65d1a8af09 * .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents: 1551
diff changeset
851 define xscrollbar
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
852 xgetptr $
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
853 print (struct scrollbar *) $ptr
1789
2c65d1a8af09 * .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents: 1551
diff changeset
854 output *$
2c65d1a8af09 * .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents: 1551
diff changeset
855 echo \n
2c65d1a8af09 * .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents: 1551
diff changeset
856 end
4268
0795ced6013f (xscrollbar): Fix typo specifying doc string.
Richard M. Stallman <rms@gnu.org>
parents: 4267
diff changeset
857 document xscrollbar
1789
2c65d1a8af09 * .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents: 1551
diff changeset
858 Print $ as a scrollbar pointer.
2c65d1a8af09 * .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents: 1551
diff changeset
859 end
2c65d1a8af09 * .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents: 1551
diff changeset
860
70425
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
861 define xpr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
862 xtype
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
863 if $type == Lisp_Int
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
864 xint
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
865 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
866 if $type == Lisp_Symbol
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
867 xsymbol
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
868 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
869 if $type == Lisp_String
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
870 xstring
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
871 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
872 if $type == Lisp_Cons
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
873 xcons
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
874 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
875 if $type == Lisp_Float
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
876 xfloat
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
877 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
878 if $type == Lisp_Misc
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
879 set $misc = (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type)
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
880 if $misc == Lisp_Misc_Free
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
881 xmiscfree
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
882 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
883 if $misc == Lisp_Misc_Boolfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
884 xboolfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
885 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
886 if $misc == Lisp_Misc_Marker
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
887 xmarker
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
888 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
889 if $misc == Lisp_Misc_Intfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
890 xintfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
891 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
892 if $misc == Lisp_Misc_Boolfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
893 xboolfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
894 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
895 if $misc == Lisp_Misc_Objfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
896 xobjfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
897 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
898 if $misc == Lisp_Misc_Buffer_Objfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
899 xbufobjfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
900 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
901 if $misc == Lisp_Misc_Buffer_Local_Value
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
902 xbuflocal
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
903 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
904 # if $misc == Lisp_Misc_Some_Buffer_Local_Value
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
905 # xvalue
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
906 # end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
907 if $misc == Lisp_Misc_Overlay
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
908 xoverlay
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
909 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
910 if $misc == Lisp_Misc_Kboard_Objfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
911 xkbobjfwd
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
912 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
913 # if $misc == Lisp_Misc_Save_Value
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
914 # xsavevalue
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
915 # end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
916 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
917 if $type == Lisp_Vectorlike
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
918 set $size = ((struct Lisp_Vector *) $ptr)->size
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
919 if ($size & PVEC_FLAG)
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
920 set $vec = (enum pvec_type) ($size & PVEC_TYPE_MASK)
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
921 if $vec == PVEC_NORMAL_VECTOR
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
922 xvector
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
923 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
924 if $vec == PVEC_PROCESS
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
925 xprocess
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
926 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
927 if $vec == PVEC_FRAME
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
928 xframe
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
929 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
930 if $vec == PVEC_COMPILED
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
931 xcompiled
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
932 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
933 if $vec == PVEC_WINDOW
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
934 xwindow
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
935 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
936 if $vec == PVEC_WINDOW_CONFIGURATION
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
937 xwinconfig
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
938 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
939 if $vec == PVEC_SUBR
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
940 xsubr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
941 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
942 if $vec == PVEC_CHAR_TABLE
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
943 xchartable
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
944 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
945 if $vec == PVEC_BOOL_VECTOR
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
946 xboolvector
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
947 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
948 if $vec == PVEC_BUFFER
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
949 xbuffer
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
950 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
951 if $vec == PVEC_HASH_TABLE
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
952 xhashtable
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
953 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
954 else
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
955 xvector
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
956 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
957 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
958 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
959 document xpr
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
960 Print $ as a lisp object of any type.
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
961 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
962
55681
91c18484e1a2 (xprintstr): New fun.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 55609
diff changeset
963 define xprintstr
91c18484e1a2 (xprintstr): New fun.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 55609
diff changeset
964 set $data = $arg0->data
91c18484e1a2 (xprintstr): New fun.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 55609
diff changeset
965 output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte)
91c18484e1a2 (xprintstr): New fun.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 55609
diff changeset
966 end
91c18484e1a2 (xprintstr): New fun.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 55609
diff changeset
967
27290
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
968 define xprintsym
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
969 xgetptr $arg0
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
970 set $sym = (struct Lisp_Symbol *) $ptr
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
971 xgetptr $sym->xname
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
972 set $sym_name = (struct Lisp_String *) $ptr
55681
91c18484e1a2 (xprintstr): New fun.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 55609
diff changeset
973 xprintstr $sym_name
27290
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
974 end
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
975 document xprintsym
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
976 Print argument as a symbol.
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
977 end
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
978
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
979 define xbacktrace
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
980 set $bt = backtrace_list
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 45966
diff changeset
981 while $bt
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
982 xgettype (*$bt->function)
32812
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
983 if $type == Lisp_Symbol
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
984 xprintsym (*$bt->function)
70425
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
985 printf " (0x%x)\n", *$bt->args
32812
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
986 else
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
987 printf "0x%x ", *$bt->function
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
988 if $type == Lisp_Vectorlike
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
989 xgetptr (*$bt->function)
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
990 set $size = ((struct Lisp_Vector *) $ptr)->size
55609
253acecd37f9 Mask off gdb_array_mark_flag from vector sizes.
Andreas Schwab <schwab@suse.de>
parents: 54690
diff changeset
991 output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size & ~gdb_array_mark_flag
32812
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
992 else
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
993 printf "Lisp type %d", $type
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
994 end
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
995 echo \n
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
996 end
27290
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
997 set $bt = $bt->next
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
998 end
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
999 end
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1000 document xbacktrace
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1001 Print a backtrace of Lisp function calls from backtrace_list.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 45966
diff changeset
1002 Set a breakpoint at Fsignal and call this to see from where
32812
c49b460bb280 (xbacktrace): Handle case that $bt->function isn't
Gerd Moellmann <gerd@gnu.org>
parents: 31960
diff changeset
1003 an error was signaled.
27290
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1004 end
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1005
70425
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1006 define which
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1007 set debug_print (which_symbols ($arg0))
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1008 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1009 document which
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1010 Print symbols which references a given lisp object,
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1011 either as its symbol value or symbol function.
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1012 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1013
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1014 define xbytecode
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1015 set $bt = byte_stack_list
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1016 while $bt
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1017 xgettype ($bt->byte_string)
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1018 printf "0x%x => ", $bt->byte_string
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1019 which $bt->byte_string
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1020 set $bt = $bt->next
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1021 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1022 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1023 document xbytecode
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1024 Print a backtrace of the byte code stack.
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1025 end
d481556dd1b5 (xframe): Print frame name.
Kim F. Storm <storm@cua.dk>
parents: 70247
diff changeset
1026
66817
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1027 # Show Lisp backtrace after normal backtrace.
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1028 define hookpost-backtrace
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1029 set $bt = backtrace_list
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1030 if $bt
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1031 echo \n
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1032 echo Lisp Backtrace:\n
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1033 xbacktrace
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1034 end
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1035 end
98ff41842c94 (pitx): Fix output format if n_overlay_strings > 0.
Kim F. Storm <storm@cua.dk>
parents: 66776
diff changeset
1036
27290
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1037 define xreload
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
1038 set $tagmask = (((long)1 << gdb_gctypebits) - 1)
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
1039 set $valmask = gdb_use_lsb ? ~($tagmask) : ((long)1 << gdb_valbits) - 1
27290
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1040 end
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1041 document xreload
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1042 When starting Emacs a second time in the same gdb session under
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
1043 FreeBSD 2.2.5, gdb 4.13, $valmask have lost
35792
9ec1e59890a2 (hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents: 34876
diff changeset
1044 their values. (The same happens on current (2000) versions of GNU/Linux
9ec1e59890a2 (hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents: 34876
diff changeset
1045 with gdb 5.0.)
31960
eb2d3d3a8eb5 (xreload): Note its need on GNU/Linux.
Dave Love <fx@gnu.org>
parents: 30636
diff changeset
1046 This function reloads them.
27290
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1047 end
54690
f9c48c0105bd Make it work for USE_LSB_TAG and !NO_LISP_UNION.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 52401
diff changeset
1048 xreload
27290
c26a9f95a880 Adapt to new strings.
Gerd Moellmann <gerd@gnu.org>
parents: 22012
diff changeset
1049
57306
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1050 # Flush display (X only)
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1051 define ff
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1052 set x_flush (0)
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1053 end
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1054 document ff
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1055 Flush pending X window display updates to screen.
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1056 Works only when an inferior emacs is executing.
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1057 end
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1058
aca7edaa93d4 (pp): Shorthand for p ARG + pr.
Kim F. Storm <storm@cua.dk>
parents: 55686
diff changeset
1059
35792
9ec1e59890a2 (hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents: 34876
diff changeset
1060 define hook-run
9ec1e59890a2 (hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents: 34876
diff changeset
1061 xreload
9ec1e59890a2 (hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents: 34876
diff changeset
1062 end
9ec1e59890a2 (hook-run): Define to run xreload.
Dave Love <fx@gnu.org>
parents: 34876
diff changeset
1063
42907
1865230232b7 (hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 42682
diff changeset
1064 # Call xreload if a new Emacs executable is loaded.
1865230232b7 (hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 42682
diff changeset
1065 define hookpost-run
1865230232b7 (hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 42682
diff changeset
1066 xreload
1865230232b7 (hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 42682
diff changeset
1067 end
1865230232b7 (hookpost-run): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 42682
diff changeset
1068
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 567
diff changeset
1069 set print pretty on
4267
aabcab2eab73 Add size to geometry spec.
Jim Blandy <jimb@redhat.com>
parents: 2162
diff changeset
1070 set print sevenbit-strings
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1071
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
1072 show environment DISPLAY
4487
177aaa70734d Don't put -q in args.
Richard M. Stallman <rms@gnu.org>
parents: 4268
diff changeset
1073 show environment TERM
67027
e40cac65496b Revert unwanted changes.
Andreas Schwab <schwab@suse.de>
parents: 67020
diff changeset
1074 set args -geometry 80x40+0+0
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
1075
67925
477140fdc860 Tell users not to worry about GDB warnings that some functions do not
Eli Zaretskii <eliz@gnu.org>
parents: 67633
diff changeset
1076 # People get bothered when they see messages about non-existent functions...
68007
0b578812ab24 Undo last change. Instead, look at Vsystem_type to
Kim F. Storm <storm@cua.dk>
parents: 67925
diff changeset
1077 xgetptr Vsystem_type
68297
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1078 # $ptr is NULL in temacs
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1079 if ($ptr != 0)
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1080 set $tem = (struct Lisp_Symbol *) $ptr
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1081 xgetptr $tem->xname
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1082 set $tem = (struct Lisp_String *) $ptr
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1083 set $tem = (char *) $tem->data
67925
477140fdc860 Tell users not to worry about GDB warnings that some functions do not
Eli Zaretskii <eliz@gnu.org>
parents: 67633
diff changeset
1084
68297
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1085 # Don't let abort actually run, as it will make stdio stop working and
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1086 # therefore the `pr' command above as well.
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1087 if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd'
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1088 # The windows-nt build replaces abort with its own function.
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1089 break w32_abort
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1090 else
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1091 break abort
9b3bace59343 Don't dereference Vsystem_type's Lisp_Symbol pointer if it is NULL.
Eli Zaretskii <eliz@gnu.org>
parents: 68074
diff changeset
1092 end
68047
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1093 end
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1094
68047
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1095 # x_error_quitter is defined only on X. But window-system is set up
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1096 # only at run time, during Emacs startup, so we need to defer setting
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1097 # the breakpoint. init_sys_modes is the first function called on
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1098 # every platform after init_display, where window-system is set.
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1099 tbreak init_sys_modes
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1100 commands
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1101 silent
68024
75f9e1ee6fa6 Avoid a warning message when x_error_quitter is not compiled in.
Eli Zaretskii <eliz@gnu.org>
parents: 68007
diff changeset
1102 xgetptr Vwindow_system
75f9e1ee6fa6 Avoid a warning message when x_error_quitter is not compiled in.
Eli Zaretskii <eliz@gnu.org>
parents: 68007
diff changeset
1103 set $tem = (struct Lisp_Symbol *) $ptr
75f9e1ee6fa6 Avoid a warning message when x_error_quitter is not compiled in.
Eli Zaretskii <eliz@gnu.org>
parents: 68007
diff changeset
1104 xgetptr $tem->xname
75f9e1ee6fa6 Avoid a warning message when x_error_quitter is not compiled in.
Eli Zaretskii <eliz@gnu.org>
parents: 68007
diff changeset
1105 set $tem = (struct Lisp_String *) $ptr
75f9e1ee6fa6 Avoid a warning message when x_error_quitter is not compiled in.
Eli Zaretskii <eliz@gnu.org>
parents: 68007
diff changeset
1106 set $tem = (char *) $tem->data
68047
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1107 # If we are running in synchronous mode, we want a chance to look
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1108 # around before Emacs exits. Perhaps we should put the break
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1109 # somewhere else instead...
68024
75f9e1ee6fa6 Avoid a warning message when x_error_quitter is not compiled in.
Eli Zaretskii <eliz@gnu.org>
parents: 68007
diff changeset
1110 if $tem[0] == 'x' && $tem[1] == '\0'
68052
52ebcbbec4f0 Fix typo.
Nick Roberts <nickrob@snap.net.nz>
parents: 68047
diff changeset
1111 break x_error_quitter
68024
75f9e1ee6fa6 Avoid a warning message when x_error_quitter is not compiled in.
Eli Zaretskii <eliz@gnu.org>
parents: 68007
diff changeset
1112 end
68047
cb837057e642 Fix last change.
Eli Zaretskii <eliz@gnu.org>
parents: 68024
diff changeset
1113 continue
68007
0b578812ab24 Undo last change. Instead, look at Vsystem_type to
Kim F. Storm <storm@cua.dk>
parents: 67925
diff changeset
1114 end
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
1115 # arch-tag: 12f34321-7bfa-4240-b77a-3cd3a1696dfe