Mercurial > emacs
annotate src/.gdbinit @ 8275:4fdf77f4e45c
type-break-mode: New variable and function.
type-break-interval: Increase default to 1 hour.
type-break-query-interval: Variable renamed from type-break-delay-interval.
type-break-keystroke-interval: Variable deleted.
type-break-keystroke-threshold: New variable.
type-break-demo-life: Function renamed from type-break-life.
type-break-demo-hanoi: Function renamed from type-break-hanoi.
type-break-alarm-p: Variable renamed from type-break-p.
type-break: Don't query.
type-break-query: (New function) query here.
type-break-check: Call type-break-query, not type-break.
Do nothing if type-break-mode is nil.
Increment type-break-keystroke-count with the length of this-command-keys,
not just 1.
Query for break when keystroke count exceeds cdr of keystroke threshold
variable.
Query for break after an alarm only if keystroke count exceeds car of
keystroke threshold variable.
type-break-select: Function deleted.
type-break: Move that code here.
type-break-cancel-schedule: Function renamed from cancel-type-break.
Reset type-break-alarm-p.
type-break-alarm: Function renamed from type-break-soon.
(top level): Call type-break-mode; don't set up hook explicitly.
author | Noah Friedman <friedman@splode.com> |
---|---|
date | Mon, 18 Jul 1994 07:37:18 +0000 |
parents | 05260d3b988d |
children | def3ab3a6f01 |
rev | line source |
---|---|
567 | 1 # Set up something to print out s-expressions. |
2 define pr | |
6534 | 3 set debug_print ($) |
567 | 4 echo \n |
5 end | |
6 document pr | |
7 Print the emacs s-expression which is $. | |
8 Works only when an inferior emacs is executing. | |
9 end | |
10 | |
1113 | 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 | |
14 | |
1551 | 15 define mips |
16 set $data_seg_bits = 0x10000000 | |
17 end | |
18 document mips | |
19 Set up the xfoo macros to deal with the MIPS processor. | |
20 Specifically, this sets $data_seg_bits to the right thing. | |
21 end | |
22 | |
567 | 23 define xtype |
999 | 24 output (enum Lisp_Type) (($ >> 24) & 0x7f) |
25 echo \n | |
567 | 26 end |
638 | 27 document xtype |
7962 | 28 Print the type of $, assuming it is an Emacs Lisp value. |
638 | 29 end |
567 | 30 |
31 define xint | |
32 print (($ & 0x00ffffff) << 8) >> 8 | |
33 end | |
638 | 34 document xint |
7962 | 35 Print $, assuming it is an Emacs Lisp integer. This gets the sign right. |
638 | 36 end |
567 | 37 |
38 define xptr | |
1113 | 39 print (void *) (($ & 0x00ffffff) | $data_seg_bits) |
567 | 40 end |
638 | 41 document xptr |
7962 | 42 Print the pointer portion of $, assuming it is an Emacs Lisp value. |
638 | 43 end |
567 | 44 |
45 define xwindow | |
1113 | 46 print (struct window *) (($ & 0x00ffffff) | $data_seg_bits) |
999 | 47 printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top |
567 | 48 end |
638 | 49 document xwindow |
7962 | 50 Print $ as a window pointer, assuming it is an Emacs Lisp window value. |
999 | 51 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP". |
638 | 52 end |
567 | 53 |
54 define xmarker | |
1113 | 55 print (struct Lisp_Marker *) (($ & 0x00ffffff) | $data_seg_bits) |
567 | 56 end |
638 | 57 document xmarker |
7962 | 58 Print $ as a marker pointer, assuming it is an Emacs Lisp marker value. |
638 | 59 end |
567 | 60 |
61 define xbuffer | |
1113 | 62 print (struct buffer *) (($ & 0x00ffffff) | $data_seg_bits) |
63 output &((struct Lisp_String *) ((($->name) & 0x00ffffff) | $data_seg_bits))->data | |
999 | 64 echo \n |
567 | 65 end |
638 | 66 document xbuffer |
7962 | 67 Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. |
727 | 68 Print the name of the buffer. |
638 | 69 end |
567 | 70 |
71 define xsymbol | |
7961
f3e1a5c7bba1
(xsymbol): Cast $ to int.
Richard M. Stallman <rms@gnu.org>
parents:
6534
diff
changeset
|
72 print (struct Lisp_Symbol *) ((((int) $) & 0x00ffffff) | $data_seg_bits) |
999 | 73 output &$->name->data |
74 echo \n | |
567 | 75 end |
638 | 76 document xsymbol |
77 Print the name and address of the symbol $. | |
7962 | 78 This command assumes that $ is an Emacs Lisp symbol value. |
638 | 79 end |
567 | 80 |
81 define xstring | |
1113 | 82 print (struct Lisp_String *) (($ & 0x00ffffff) | $data_seg_bits) |
7961
f3e1a5c7bba1
(xsymbol): Cast $ to int.
Richard M. Stallman <rms@gnu.org>
parents:
6534
diff
changeset
|
83 output ($->size > 1000) ? 0 : ($->data[0])@($->size) |
999 | 84 echo \n |
567 | 85 end |
86 document xstring | |
638 | 87 Print the contents and address of the string $. |
7962 | 88 This command assumes that $ is an Emacs Lisp string value. |
567 | 89 end |
90 | |
91 define xvector | |
1113 | 92 print (struct Lisp_Vector *) (($ & 0x00ffffff) | $data_seg_bits) |
7961
f3e1a5c7bba1
(xsymbol): Cast $ to int.
Richard M. Stallman <rms@gnu.org>
parents:
6534
diff
changeset
|
93 output ($->size > 50) ? 0 : ($->contents[0])@($->size) |
999 | 94 echo \n |
567 | 95 end |
96 document xvector | |
638 | 97 Print the contents and address of the vector $. |
7962 | 98 This command assumes that $ is an Emacs Lisp vector value. |
567 | 99 end |
100 | |
1113 | 101 define xframe |
102 print (struct frame *) (($ & 0x00ffffff) | $data_seg_bits) | |
567 | 103 end |
1113 | 104 document xframe |
7962 | 105 Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. |
638 | 106 end |
567 | 107 |
108 define xcons | |
1113 | 109 print (struct Lisp_Cons *) (($ & 0x00ffffff) | $data_seg_bits) |
1069 | 110 output *$ |
999 | 111 echo \n |
567 | 112 end |
638 | 113 document xcons |
7962 | 114 Print the contents of $, assuming it is an Emacs Lisp cons. |
638 | 115 end |
567 | 116 |
117 define xcar | |
1113 | 118 print ((($ >> 24) & 0x7f) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & 0x00ffffff) | $data_seg_bits))->car : 0) |
567 | 119 end |
638 | 120 document xcar |
7962 | 121 Print the car of $, assuming it is an Emacs Lisp pair. |
638 | 122 end |
567 | 123 |
124 define xcdr | |
1113 | 125 print ((($ >> 24) & 0x7f) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & 0x00ffffff) | $data_seg_bits))->cdr : 0) |
567 | 126 end |
638 | 127 document xcdr |
7962 | 128 Print the cdr of $, assuming it is an Emacs Lisp pair. |
638 | 129 end |
567 | 130 |
1113 | 131 define xsubr |
132 print (struct Lisp_Subr *) (($ & 0x00ffffff) | $data_seg_bits) | |
133 output *$ | |
134 echo \n | |
135 end | |
136 document xsubr | |
137 Print the address of the subr which the Lisp_Object $ points to. | |
138 end | |
139 | |
1943
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
140 define xprocess |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
141 print (struct Lisp_Process *) (($ & 0x00ffffff) | $data_seg_bits) |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
142 output *$ |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
143 echo \n |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
144 end |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
145 document xprocess |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
146 Print the address of the struct Lisp_process which the Lisp_Object $ points to. |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
147 end |
80482f2d54bf
* .gdbinit (xprocess): New command.
Jim Blandy <jimb@redhat.com>
parents:
1789
diff
changeset
|
148 |
4267 | 149 define xfloat |
150 print ((struct Lisp_Float *) (($ & 0x00ffffff) | $data_seg_bits))->data | |
151 end | |
152 document xfloat | |
153 Print $ assuming it is a lisp floating-point number. | |
154 end | |
155 | |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
156 define xscrollbar |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
157 print (struct scrollbar *) (($ & 0x00ffffff) | $data_seg_bits) |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
158 output *$ |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
159 echo \n |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
160 end |
4268
0795ced6013f
(xscrollbar): Fix typo specifying doc string.
Richard M. Stallman <rms@gnu.org>
parents:
4267
diff
changeset
|
161 document xscrollbar |
1789
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
162 Print $ as a scrollbar pointer. |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
163 end |
2c65d1a8af09
* .gdbinit: Add "-geometry +0+0" to default args.
Jim Blandy <jimb@redhat.com>
parents:
1551
diff
changeset
|
164 |
638 | 165 set print pretty on |
4267 | 166 set print sevenbit-strings |
567 | 167 |
732 | 168 show environment DISPLAY |
4487 | 169 show environment TERM |
170 set args -geometry 80x40+0+0 | |
732 | 171 |
567 | 172 # Don't let abort actually run, as it will make |
2162 | 173 # stdio stop working and therefore the `pr' command above as well. |
567 | 174 break abort |
175 | |
176 # If we are running in synchronous mode, we want a chance to look around | |
177 # before Emacs exits. Perhaps we should put the break somewhere else | |
178 # instead... | |
179 break _XPrintDefaultError | |
180 |