1 # Set up something to print out s-expressions.
7 Print the emacs s-expression which is $.
8 Works only when an inferior emacs is executing.
11 # Set this to the same thing as the DATA_SEG_BITS macro in your
12 # machine-description files.
13 set $data_seg_bits = 0
16 set $data_seg_bits = 0x10000000
19 Set up the xfoo macros to deal with the MIPS processor.
20 Specifically, this sets $data_seg_bits to the right thing.
24 output (enum Lisp_Type) (($ >> 28) & 0x7)
26 output ((($ >> 28) & 0x7) == Lisp_Misc ? (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($ & 0x0fffffff) | $data_seg_bits))->type) : (($ >> 28) & 0x7) == Lisp_Vectorlike ? ($size = ((struct Lisp_Vector *) (($ & 0x0fffffff) | $data_seg_bits))->size, (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)) : 0)
30 Print the type of $, assuming it is an Emacs Lisp value.
31 If the first type printed is Lisp_Vector or Lisp_Misc,
32 the second line gives the more precise type.
33 Otherwise the second line doesn't mean anything.
37 set $size = ((struct Lisp_Vector *) (($ & 0x0fffffff) | $data_seg_bits))->size
38 output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)
42 Print the vector subtype of $, assuming it is a vector or pseudovector.
46 output (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($ & 0x0fffffff) | $data_seg_bits))->type)
50 Print the specific type of $, assuming it is some misc type.
54 print (($ & 0x0fffffff) << 4) >> 4
57 Print $, assuming it is an Emacs Lisp integer. This gets the sign right.
61 print (void *) (($ & 0x0fffffff) | $data_seg_bits)
64 Print the pointer portion of $, assuming it is an Emacs Lisp value.
68 print (struct window *) (($ & 0x0fffffff) | $data_seg_bits)
69 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
72 Print $ as a window pointer, assuming it is an Emacs Lisp window value.
73 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
77 print (struct Lisp_Marker *) (($ & 0x0fffffff) | $data_seg_bits)
80 Print $ as a marker pointer, assuming it is an Emacs Lisp marker value.
84 print (struct buffer *) (($ & 0x0fffffff) | $data_seg_bits)
85 output &((struct Lisp_String *) ((($->name) & 0x0fffffff) | $data_seg_bits))->data
89 Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value.
90 Print the name of the buffer.
94 print (struct Lisp_Symbol *) ((((int) $) & 0x0fffffff) | $data_seg_bits)
99 Print the name and address of the symbol $.
100 This command assumes that $ is an Emacs Lisp symbol value.
104 print (struct Lisp_String *) (($ & 0x0fffffff) | $data_seg_bits)
105 output ($->size > 1000) ? 0 : ($->data[0])@($->size)
109 Print the contents and address of the string $.
110 This command assumes that $ is an Emacs Lisp string value.
114 print (struct Lisp_Vector *) (($ & 0x0fffffff) | $data_seg_bits)
115 output ($->size > 50) ? 0 : ($->contents[0])@($->size)
119 Print the contents and address of the vector $.
120 This command assumes that $ is an Emacs Lisp vector value.
124 print (struct frame *) (($ & 0x0fffffff) | $data_seg_bits)
127 Print $ as a frame pointer, assuming it is an Emacs Lisp frame value.
131 print (struct Lisp_Cons *) (($ & 0x0fffffff) | $data_seg_bits)
136 Print the contents of $, assuming it is an Emacs Lisp cons.
140 print ((($ >> 28) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & 0x0fffffff) | $data_seg_bits))->car : 0)
143 Print the car of $, assuming it is an Emacs Lisp pair.
147 print ((($ >> 28) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & 0x0fffffff) | $data_seg_bits))->cdr : 0)
150 Print the cdr of $, assuming it is an Emacs Lisp pair.
154 print (struct Lisp_Subr *) (($ & 0x0fffffff) | $data_seg_bits)
159 Print the address of the subr which the Lisp_Object $ points to.
163 print (struct Lisp_Process *) (($ & 0x0fffffff) | $data_seg_bits)
168 Print the address of the struct Lisp_process which the Lisp_Object $ points to.
172 print ((struct Lisp_Float *) (($ & 0x0fffffff) | $data_seg_bits))->data
175 Print $ assuming it is a lisp floating-point number.
179 print (struct scrollbar *) (($ & 0x0fffffff) | $data_seg_bits)
184 Print $ as a scrollbar pointer.
188 set print sevenbit-strings
190 show environment DISPLAY
191 show environment TERM
192 set args -geometry 80x40+0+0
194 # Don't let abort actually run, as it will make
195 # stdio stop working and therefore the `pr' command above as well.
198 # If we are running in synchronous mode, we want a chance to look around
199 # before Emacs exits. Perhaps we should put the break somewhere else
201 break x_error_quitter