Mercurial > emacs
comparison src/.gdbinit @ 60148:28b65d07edde
(pitx, pit): Pretty print display iterator.
(prowx, prow): Pretty print glyph row.
(pcursorx, pcursor): Pretty print a window cursor.
(pwinx, pwin): Pretty print struct window.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 18 Feb 2005 22:21:36 +0000 |
parents | 5ee7eaad2958 |
children | 123211374403 389421e988c2 bf0d492ea2d5 |
comparison
equal
deleted
inserted
replaced
60147:842490bee3d6 | 60148:28b65d07edde |
---|---|
99 end | 99 end |
100 document ppt | 100 document ppt |
101 Print point, beg, end, narrow, and gap for current buffer. | 101 Print point, beg, end, narrow, and gap for current buffer. |
102 end | 102 end |
103 | 103 |
104 # Print out iterator given as first arg | |
105 define pitx | |
106 set $it = $arg0 | |
107 printf "cur=%d", $it->current.pos.charpos | |
108 if ($it->current.pos.charpos != $it->current.pos.bytepos) | |
109 printf "[%d]", $it->current.pos.bytepos | |
110 end | |
111 printf " start=%d", $it->start.pos.charpos | |
112 if ($it->start.pos.charpos != $it->start.pos.bytepos) | |
113 printf "[%d]", $it->start.pos.bytepos | |
114 end | |
115 printf " stop=%d ", $it->stop_charpos | |
116 output $it->what | |
117 if ($it->what == IT_CHARACTER) | |
118 if ($it->len == 1 && $it->c >= ' ' && it->c < 255) | |
119 printf "['%c']", $it->c | |
120 else | |
121 printf "[%d,%d]", $it->c, $it->len | |
122 end | |
123 end | |
124 printf " next=" | |
125 output $it->method | |
126 printf "\n" | |
127 printf "vpos=%d hpos=%d", $it->vpos, $it->hpos, | |
128 printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y | |
129 printf " x=%d lvx=%d", $it->current_x, $it->last_visible_x | |
130 printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent | |
131 printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent | |
132 printf "\n" | |
133 end | |
134 document pitx | |
135 Pretty print a display iterator. | |
136 Take one arg, an iterator object or pointer. | |
137 end | |
138 | |
139 define pit | |
140 pitx it | |
141 end | |
142 document pit | |
143 Pretty print the display iterator it. | |
144 end | |
145 | |
146 define prowx | |
147 set $row = $arg0 | |
148 printf "y=%d x=%d pwid=%d", $row->y, $row->x, $row->pixel_width | |
149 printf " a+d=%d+%d=%d", $row->ascent, $row->height-$row->ascent, $row->height | |
150 printf " phys=%d+%d=%d", $row->phys_ascent, $row->phys_height-$row->phys_ascent, $row->phys_height | |
151 printf " vis=%d", $row->visible_height | |
152 printf " L=%d T=%d R=%d", $row->used[0], $row->used[1], $row->used[2] | |
153 printf "\n" | |
154 printf "start=%d end=%d", $row->start.pos.charpos, $row->end.pos.charpos | |
155 if ($row->enabled_p) | |
156 printf " ENA" | |
157 end | |
158 if ($row->displays_text_p) | |
159 printf " DISP" | |
160 end | |
161 if ($row->mode_line_p) | |
162 printf " MODEL" | |
163 end | |
164 if ($row->continued_p) | |
165 printf " CONT" | |
166 end | |
167 if ($row-> truncated_on_left_p) | |
168 printf " TRUNC:L" | |
169 end | |
170 if ($row-> truncated_on_right_p) | |
171 printf " TRUNC:R" | |
172 end | |
173 if ($row->starts_in_middle_of_char_p) | |
174 printf " STARTMID" | |
175 end | |
176 if ($row->ends_in_middle_of_char_p) | |
177 printf " ENDMID" | |
178 end | |
179 if ($row->ends_in_newline_from_string_p) | |
180 printf " ENDNLFS" | |
181 end | |
182 if ($row->ends_at_zv_p) | |
183 printf " ENDZV" | |
184 end | |
185 if ($row->overlapped_p) | |
186 printf " OLAPD" | |
187 end | |
188 if ($row->overlapping_p) | |
189 printf " OLAPNG" | |
190 end | |
191 printf "\n" | |
192 end | |
193 document prowx | |
194 Pretty print information about glyph_row. | |
195 Takes one argument, a row object or pointer. | |
196 end | |
197 | |
198 define prow | |
199 prowx row | |
200 end | |
201 document prow | |
202 Pretty print information about glyph_row in row. | |
203 end | |
204 | |
205 | |
206 define pcursorx | |
207 set $cp = $arg0 | |
208 printf "y=%d x=%d vpos=%d hpos=%d", $cp->y, $cp->x, $cp->vpos, $cp->hpos | |
209 end | |
210 document pcursorx | |
211 Pretty print a window cursor | |
212 end | |
213 | |
214 define pcursor | |
215 printf "output: " | |
216 pcursorx output_cursor | |
217 printf "\n" | |
218 end | |
219 document pcursor | |
220 Pretty print the output_cursor | |
221 end | |
222 | |
223 define pwinx | |
224 set $w = $arg0 | |
225 xgetint $w->sequence_number | |
226 if ($w->mini_p != Qnil) | |
227 printf "Mini " | |
228 end | |
229 printf "Window %d ", $int | |
230 xgetptr $w->buffer | |
231 set $tem = (struct buffer *) $ptr | |
232 xgetptr $tem->name | |
233 printf "%s", ((struct Lisp_String *) $ptr)->data | |
234 printf "\n" | |
235 xgetptr $w->start | |
236 set $tem = (struct Lisp_Marker *) $ptr | |
237 printf "start=%d end:", $tem->charpos | |
238 if ($w->window_end_valid != Qnil) | |
239 xgetint $w->window_end_pos | |
240 printf "pos=%d", $int | |
241 xgetint $w->window_end_vpos | |
242 printf " vpos=%d", $int | |
243 else | |
244 printf "invalid" | |
245 end | |
246 printf " vscroll=%d", $w->vscroll | |
247 if ($w->force_start != Qnil) | |
248 printf " FORCE_START" | |
249 end | |
250 if ($w->must_be_updated_p) | |
251 printf " MUST_UPD" | |
252 end | |
253 printf "\n" | |
254 printf "cursor: " | |
255 pcursorx $w->cursor | |
256 printf " phys: " | |
257 pcursorx $w->phys_cursor | |
258 if ($w->phys_cursor_on_p) | |
259 printf " ON" | |
260 else | |
261 printf " OFF" | |
262 end | |
263 printf " blk=" | |
264 if ($w->last_cursor_off_p != $w->cursor_off_p) | |
265 if ($w->last_cursor_off_p) | |
266 printf "ON->" | |
267 else | |
268 printf "OFF->" | |
269 end | |
270 end | |
271 if ($w->cursor_off_p) | |
272 printf "ON" | |
273 else | |
274 printf "OFF" | |
275 end | |
276 printf "\n" | |
277 end | |
278 document pwinx | |
279 Pretty print a window structure. | |
280 Takes one argument, a pointer to a window structure | |
281 end | |
282 | |
283 define pwin | |
284 pwinx w | |
285 end | |
286 document pwin | |
287 Pretty print window structure w. | |
288 end | |
289 | |
290 | |
104 define xtype | 291 define xtype |
105 xgettype $ | 292 xgettype $ |
106 output $type | 293 output $type |
107 echo \n | 294 echo \n |
108 if $type == Lisp_Misc | 295 if $type == Lisp_Misc |