aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-02-18 22:21:36 +0000
committerKim F. Storm2005-02-18 22:21:36 +0000
commitafca296c98d13baa2f4984b928117474f674eeec (patch)
treebc2e8840670fb8913bd4d859edbbc44718924b6e /src
parentb1c2adc30d8653a74503a12f766fa11aa9e59acf (diff)
downloademacs-afca296c98d13baa2f4984b928117474f674eeec.tar.gz
emacs-afca296c98d13baa2f4984b928117474f674eeec.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit187
1 files changed, 187 insertions, 0 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 440fa858244..54e4f4352d7 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -101,6 +101,193 @@ document ppt
101Print point, beg, end, narrow, and gap for current buffer. 101Print point, beg, end, narrow, and gap for current buffer.
102end 102end
103 103
104# Print out iterator given as first arg
105define 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"
133end
134document pitx
135Pretty print a display iterator.
136Take one arg, an iterator object or pointer.
137end
138
139define pit
140 pitx it
141end
142document pit
143Pretty print the display iterator it.
144end
145
146define 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"
192end
193document prowx
194Pretty print information about glyph_row.
195Takes one argument, a row object or pointer.
196end
197
198define prow
199 prowx row
200end
201document prow
202Pretty print information about glyph_row in row.
203end
204
205
206define pcursorx
207 set $cp = $arg0
208 printf "y=%d x=%d vpos=%d hpos=%d", $cp->y, $cp->x, $cp->vpos, $cp->hpos
209end
210document pcursorx
211Pretty print a window cursor
212end
213
214define pcursor
215 printf "output: "
216 pcursorx output_cursor
217 printf "\n"
218end
219document pcursor
220Pretty print the output_cursor
221end
222
223define 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"
277end
278document pwinx
279Pretty print a window structure.
280Takes one argument, a pointer to a window structure
281end
282
283define pwin
284 pwinx w
285end
286document pwin
287Pretty print window structure w.
288end
289
290
104define xtype 291define xtype
105 xgettype $ 292 xgettype $
106 output $type 293 output $type