comparison src/.gdbinit @ 90472:138027c8c982

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 300-313) - Update from CVS - Update from CVS: lispref/display.texi (Forcing Redisplay): Fix typo. - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 105-106) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-74
author Miles Bader <miles@gnu.org>
date Sat, 17 Jun 2006 20:57:37 +0000
parents 146cd8369025 9f75a05018ea
children 138ce2701550
comparison
equal deleted inserted replaced
90471:bdc1386b2827 90472:138027c8c982
188 printf " ch='%c'", $it->c 188 printf " ch='%c'", $it->c
189 else 189 else
190 printf " ch=[%d,%d]", $it->c, $it->len 190 printf " ch=[%d,%d]", $it->c, $it->len
191 end 191 end
192 else 192 else
193 if ($it->what == IT_IMAGE) 193 printf " "
194 printf " IMAGE=%d", $it->image_id 194 output $it->what
195 else
196 printf " "
197 output $it->what
198 end
199 end 195 end
200 if ($it->method != GET_FROM_BUFFER) 196 if ($it->method != GET_FROM_BUFFER)
201 printf " next=" 197 printf " next="
202 output $it->method 198 output $it->method
203 if ($it->method == GET_FROM_STRING) 199 if ($it->method == GET_FROM_STRING)
204 printf "[%d]", $it->current.string_pos.charpos 200 printf "[%d]", $it->current.string_pos.charpos
201 end
202 if ($it->method == GET_FROM_IMAGE)
203 printf "[%d]", $it->image_id
204 end
205 if ($it->method == GET_FROM_COMPOSITION)
206 printf "[%d,%d,%d]", $it->cmp_id, $it->len, $it->cmp_len
205 end 207 end
206 end 208 end
207 printf "\n" 209 printf "\n"
208 if ($it->region_beg_charpos >= 0) 210 if ($it->region_beg_charpos >= 0)
209 printf "reg=%d-%d ", $it->region_beg_charpos, $it->region_end_charpos 211 printf "reg=%d-%d ", $it->region_beg_charpos, $it->region_end_charpos
370 end 372 end
371 document pwin 373 document pwin
372 Pretty print window structure w. 374 Pretty print window structure w.
373 end 375 end
374 376
377 define pgx
378 set $g = $arg0
379 if ($g->type == CHAR_GLYPH)
380 if ($g->u.ch >= ' ' && $g->u.ch < 127)
381 printf "CHAR[%c]", $g->u.ch
382 else
383 printf "CHAR[0x%x]", $g->u.ch
384 end
385 end
386 if ($g->type == COMPOSITE_GLYPH)
387 printf "COMP[%d]", $g->u.cmp_id
388 end
389 if ($g->type == IMAGE_GLYPH)
390 printf "IMAGE[%d]", $g->u.img_id
391 end
392 if ($g->type == STRETCH_GLYPH)
393 printf "STRETCH[%d+%d]", $g->u.stretch.height, $g->u.stretch.ascent
394 end
395 xgettype ($g->object)
396 if ($type == Lisp_String)
397 printf " str=%x[%d]", $g->object, $g->charpos
398 else
399 printf " pos=%d", $g->charpos
400 end
401 printf " w=%d a+d=%d+%d", $g->pixel_width, $g->ascent, $g->descent
402 if ($g->face_id != DEFAULT_FACE_ID)
403 printf " face=%d", $g->face_id
404 end
405 if ($g->voffset)
406 printf " vof=%d", $g->voffset
407 end
408 if ($g->multibyte_p)
409 printf " MB"
410 end
411 if ($g->padding_p)
412 printf " PAD"
413 end
414 if ($g->glyph_not_available_p)
415 printf " N/A"
416 end
417 if ($g->overlaps_vertically_p)
418 printf " OVL"
419 end
420 if ($g->left_box_line_p)
421 printf " ["
422 end
423 if ($g->right_box_line_p)
424 printf " ]"
425 end
426 if ($g->slice.x || $g->slice.y || $g->slice.width || $g->slice.height)
427 printf " slice=%d,%d,%d,%d" ,$g->slice.x, $g->slice.y, $g->slice.width, $g->slice.height
428 end
429 printf "\n"
430 end
431 document pgx
432 Pretty print a glyph structure.
433 Takes one argument, a pointer to a glyph structure
434 end
435
436 define pg
437 set $pgidx = 0
438 pgx glyph
439 end
440 document pg
441 Pretty print glyph structure glyph.
442 end
443
444 define pgi
445 set $pgidx = $arg0
446 pgx (&glyph[$pgidx])
447 end
448 document pgi
449 Pretty print glyph structure glyph[I].
450 Takes one argument, a integer I.
451 end
452
453 define pgn
454 set $pgidx = $pgidx + 1
455 pgx (&glyph[$pgidx])
456 end
457 document pgn
458 Pretty print next glyph structure.
459 end
460
461 define pgrowx
462 set $row = $arg0
463 set $area = 0
464 set $xofs = $row->x
465 while ($area < 3)
466 set $used = $row->used[$area]
467 if ($used > 0)
468 set $gl0 = $row->glyphs[$area]
469 set $pgidx = 0
470 printf "%s: %d glyphs\n", ($area == 0 ? "LEFT" : $area == 2 ? "RIGHT" : "TEXT"), $used
471 while ($pgidx < $used)
472 printf "%3d %4d: ", $pgidx, $xofs
473 pgx $gl0[$pgidx]
474 set $xofs = $xofs + $gl0[$pgidx]->pixel_width
475 set $pgidx = $pgidx + 1
476 end
477 end
478 set $area = $area + 1
479 end
480 end
481 document pgrowx
482 Pretty print all glyphs in a row structure.
483 Takes one argument, a pointer to a row structure.
484 end
485
486 define pgrow
487 pgrowx row
488 end
489 document pgrow
490 Pretty print all glyphs in row structure row.
491 end
375 492
376 define xtype 493 define xtype
377 xgettype $ 494 xgettype $
378 output $type 495 output $type
379 echo \n 496 echo \n