[Emacs]
Emacs gdbまわり
- たんに私が以下のことを知りたかったから作ったページ
- gud-gdbまわりで、Emacsがいかにしてブレークポイントの描画をしているか?
- text-modeであってもEmacsがそれを描画できるのが不思議
ソースコードを見てみる
- XPMをコードの中で定義して、それを描画しているように見える。
(defconst breakpoint-xpm-data "/* XPM */ static char *magick[] = { /* columns rows colors chars-per-pixel */ "10 10 2 1", " c red", "+ c None", /* pixels */ "+++ +++", "++ ++", "+ +", " ", " ", " ", " ", "+ +", "++ ++", "+++ +++", };" "XPM data used for breakpoint icon.") (defconst breakpoint-enabled-pbm-data "P1 10 10\", 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0" "PBM data used for enabled breakpoint icon.") (defconst breakpoint-disabled-pbm-data "P1 10 10\", 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0" "PBM data used for disabled breakpoint icon.")