annotate src/.gdbinit @ 572:0c2e4ee42304

*** empty log message ***
author Roland McGrath <roland@gnu.org>
date Tue, 10 Mar 1992 22:16:10 +0000
parents 696d82e36360
children 40b255f55df3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
567
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 # Set up something to print out s-expressions.
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 define pr
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3 set Fprin1 ($, Qexternal_debugging_output)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 echo \n
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 document pr
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 Print the emacs s-expression which is $.
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 Works only when an inferior emacs is executing.
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 define xtype
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 print (enum Lisp_Type) (($ >> 24) & 0x7f)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 p $$
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 define xint
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 print (($ & 0x00ffffff) << 8) >> 8
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 define xptr
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 print (void *) ($ & 0x00ffffff)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 define xwindow
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 print (struct window *) ($ & 0x00ffffff)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 define xmarker
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 print (struct Lisp_Marker *) ($ & 0x00ffffff)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 define xbuffer
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 print (struct buffer *) ($ & 0x00ffffff)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 define xsymbol
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 print (struct Lisp_Symbol *) ($ & 0x00ffffff)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 print &$->name->data
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 print $$
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 define xstring
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 print (struct Lisp_String *) ($ & 0x00ffffff)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 print ($->data[0])@($->size)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 print $$
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 document xstring
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 Assume that $ is an Emacs Lisp string object, print the string's
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 contents, and set $ to a pointer to the string.
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 define xvector
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 set $temp = (struct Lisp_Vector *) ($ & 0x00ffffff)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 print ($temp->contents[0])@($temp->size)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 print $temp
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 document xvector
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 Assume that $ is an Emacs Lisp vector object, print the vector's
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62 contents, and set $ to a pointer to the vector.
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 define xscreen
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 print (struct screen *) ($ & 0x00ffffff)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 define xcons
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70 print (struct Lisp_Cons *) ($ & 0x00ffffff)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 print *$
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 define xcar
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 print ((($ >> 24) & 0x7f) == Lisp_Cons ? ((struct Lisp_Cons *) ($ & 0x00ffffff))->car : 0)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 define xcdr
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79 print ((($ >> 24) & 0x7f) == Lisp_Cons ? ((struct Lisp_Cons *) ($ & 0x00ffffff))->cdr : 0)
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80 end
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82 set prettyprint on
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 # Don't let abort actually run, as it will make
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85 # stdio stop working and therefore the `pr' command below as well.
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 break abort
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 # If we are running in synchronous mode, we want a chance to look around
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89 # before Emacs exits. Perhaps we should put the break somewhere else
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 # instead...
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 break _XPrintDefaultError
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93 unset env TERMCAP
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 unset env TERM
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95 set env DISPLAY :0.0
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
96 info env DISPLAY
696d82e36360 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 set args -q