diff options
| author | Eli Zaretskii | 2009-12-19 14:16:47 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2009-12-19 14:16:47 +0000 |
| commit | be996d82f590113d9f8dec21929844bc9e4b796f (patch) | |
| tree | 3efe8af17b5f2ff90e1272519ba575f6e4577ae4 /src | |
| parent | ad9039554d76a81c177a80afb797cb0d6c5a8c4d (diff) | |
| download | emacs-be996d82f590113d9f8dec21929844bc9e4b796f.tar.gz emacs-be996d82f590113d9f8dec21929844bc9e4b796f.zip | |
(pitx): Don't use enum names, use their values. Remove reference to
non-existing value GET_FROM_COMPOSITION.
(pgx): Don't use enum names, use their values.
(pitmethod): New helper command.
(pitx): Use it to display iteration method.
(pgrowit): New command.
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 92 | ||||
| -rw-r--r-- | src/ChangeLog | 7 |
2 files changed, 84 insertions, 15 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 5c7e6d8e525..6e717836376 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -163,6 +163,35 @@ Print current buffer's point and boundaries. | |||
| 163 | Prints values of point, beg, end, narrow, and gap for current buffer. | 163 | Prints values of point, beg, end, narrow, and gap for current buffer. |
| 164 | end | 164 | end |
| 165 | 165 | ||
| 166 | define pitmethod | ||
| 167 | set $itmethod = $arg0 | ||
| 168 | # output $itmethod | ||
| 169 | if ($itmethod == 0) | ||
| 170 | printf "GET_FROM_BUFFER" | ||
| 171 | end | ||
| 172 | if ($itmethod == 1) | ||
| 173 | printf "GET_FROM_DISPLAY_VECTOR" | ||
| 174 | end | ||
| 175 | if ($itmethod == 2) | ||
| 176 | printf "GET_FROM_STRING" | ||
| 177 | end | ||
| 178 | if ($itmethod == 3) | ||
| 179 | printf "GET_FROM_C_STRING" | ||
| 180 | end | ||
| 181 | if ($itmethod == 4) | ||
| 182 | printf "GET_FROM_IMAGE" | ||
| 183 | end | ||
| 184 | if ($itmethod == 5) | ||
| 185 | printf "GET_FROM_STRETCH" | ||
| 186 | end | ||
| 187 | if ($itmethod < 0 || $itmethod > 5) | ||
| 188 | output $itmethod | ||
| 189 | end | ||
| 190 | end | ||
| 191 | document pitmethod | ||
| 192 | Pretty print it->method given as first arg | ||
| 193 | end | ||
| 194 | |||
| 166 | # Print out iterator given as first arg | 195 | # Print out iterator given as first arg |
| 167 | define pitx | 196 | define pitx |
| 168 | set $it = $arg0 | 197 | set $it = $arg0 |
| @@ -193,7 +222,7 @@ define pitx | |||
| 193 | if ($it->sp != 0) | 222 | if ($it->sp != 0) |
| 194 | printf " sp=%d", $it->sp | 223 | printf " sp=%d", $it->sp |
| 195 | end | 224 | end |
| 196 | if ($it->what == IT_CHARACTER) | 225 | if ($it->what == 0) # IT_CHARACTER |
| 197 | if ($it->len == 1 && $it->c >= ' ' && it->c < 255) | 226 | if ($it->len == 1 && $it->c >= ' ' && it->c < 255) |
| 198 | printf " ch='%c'", $it->c | 227 | printf " ch='%c'", $it->c |
| 199 | else | 228 | else |
| @@ -201,20 +230,41 @@ define pitx | |||
| 201 | end | 230 | end |
| 202 | else | 231 | else |
| 203 | printf " " | 232 | printf " " |
| 204 | output $it->what | 233 | # output $it->what |
| 234 | if ($it->what == 0) | ||
| 235 | printf "IT_CHARACTER" | ||
| 236 | end | ||
| 237 | if ($it->what == 1) | ||
| 238 | printf "IT_COMPOSITION" | ||
| 239 | end | ||
| 240 | if ($it->what == 2) | ||
| 241 | printf "IT_IMAGE" | ||
| 242 | end | ||
| 243 | if ($it->what == 3) | ||
| 244 | printf "IT_STRETCH" | ||
| 245 | end | ||
| 246 | if ($it->what == 4) | ||
| 247 | printf "IT_EOB" | ||
| 248 | end | ||
| 249 | if ($it->what == 5) | ||
| 250 | printf "IT_TRUNCATION" | ||
| 251 | end | ||
| 252 | if ($it->what == 6) | ||
| 253 | printf "IT_CONTINUATION" | ||
| 254 | end | ||
| 255 | if ($it->what < 0 || $it->what > 6) | ||
| 256 | output $it->what | ||
| 257 | end | ||
| 205 | end | 258 | end |
| 206 | if ($it->method != GET_FROM_BUFFER) | 259 | if ($it->method != 0) # GET_FROM_BUFFER |
| 207 | printf " next=" | 260 | printf " next=" |
| 208 | output $it->method | 261 | pitmethod $it->method |
| 209 | if ($it->method == GET_FROM_STRING) | 262 | if ($it->method == 2) # GET_FROM_STRING |
| 210 | printf "[%d]", $it->current.string_pos.charpos | 263 | printf "[%d]", $it->current.string_pos.charpos |
| 211 | end | 264 | end |
| 212 | if ($it->method == GET_FROM_IMAGE) | 265 | if ($it->method == 4) # GET_FROM_IMAGE |
| 213 | printf "[%d]", $it->image_id | 266 | printf "[%d]", $it->image_id |
| 214 | end | 267 | end |
| 215 | if ($it->method == GET_FROM_COMPOSITION) | ||
| 216 | printf "[%d,%d,%d]", $it->cmp_id, $it->len, $it->cmp_len | ||
| 217 | end | ||
| 218 | end | 268 | end |
| 219 | printf "\n" | 269 | printf "\n" |
| 220 | if ($it->region_beg_charpos >= 0) | 270 | if ($it->region_beg_charpos >= 0) |
| @@ -231,7 +281,7 @@ define pitx | |||
| 231 | while ($i < $it->sp && $i < 4) | 281 | while ($i < $it->sp && $i < 4) |
| 232 | set $e = $it->stack[$i] | 282 | set $e = $it->stack[$i] |
| 233 | printf "stack[%d]: ", $i | 283 | printf "stack[%d]: ", $i |
| 234 | output $e->method | 284 | pitmethod $e->method |
| 235 | printf "[%d]", $e->position.charpos | 285 | printf "[%d]", $e->position.charpos |
| 236 | printf "\n" | 286 | printf "\n" |
| 237 | set $i = $i + 1 | 287 | set $i = $i + 1 |
| @@ -395,20 +445,24 @@ end | |||
| 395 | 445 | ||
| 396 | define pgx | 446 | define pgx |
| 397 | set $g = $arg0 | 447 | set $g = $arg0 |
| 398 | if ($g->type == CHAR_GLYPH) | 448 | # CHAR_GLYPH |
| 449 | if ($g->type == 0) | ||
| 399 | if ($g->u.ch >= ' ' && $g->u.ch < 127) | 450 | if ($g->u.ch >= ' ' && $g->u.ch < 127) |
| 400 | printf "CHAR[%c]", $g->u.ch | 451 | printf "CHAR[%c]", $g->u.ch |
| 401 | else | 452 | else |
| 402 | printf "CHAR[0x%x]", $g->u.ch | 453 | printf "CHAR[0x%x]", $g->u.ch |
| 403 | end | 454 | end |
| 404 | end | 455 | end |
| 405 | if ($g->type == COMPOSITE_GLYPH) | 456 | # COMPOSITE_GLYPH |
| 457 | if ($g->type == 1) | ||
| 406 | printf "COMP[%d]", $g->u.cmp_id | 458 | printf "COMP[%d]", $g->u.cmp_id |
| 407 | end | 459 | end |
| 408 | if ($g->type == IMAGE_GLYPH) | 460 | # IMAGE_GLYPH |
| 461 | if ($g->type == 2) | ||
| 409 | printf "IMAGE[%d]", $g->u.img_id | 462 | printf "IMAGE[%d]", $g->u.img_id |
| 410 | end | 463 | end |
| 411 | if ($g->type == STRETCH_GLYPH) | 464 | # STRETCH_GLYPH |
| 465 | if ($g->type == 3) | ||
| 412 | printf "STRETCH[%d+%d]", $g->u.stretch.height, $g->u.stretch.ascent | 466 | printf "STRETCH[%d+%d]", $g->u.stretch.height, $g->u.stretch.ascent |
| 413 | end | 467 | end |
| 414 | xgettype ($g->object) | 468 | xgettype ($g->object) |
| @@ -418,7 +472,8 @@ define pgx | |||
| 418 | printf " pos=%d", $g->charpos | 472 | printf " pos=%d", $g->charpos |
| 419 | end | 473 | end |
| 420 | printf " w=%d a+d=%d+%d", $g->pixel_width, $g->ascent, $g->descent | 474 | printf " w=%d a+d=%d+%d", $g->pixel_width, $g->ascent, $g->descent |
| 421 | if ($g->face_id != DEFAULT_FACE_ID) | 475 | # If not DEFAULT_FACE_ID |
| 476 | if ($g->face_id != 0) | ||
| 422 | printf " face=%d", $g->face_id | 477 | printf " face=%d", $g->face_id |
| 423 | end | 478 | end |
| 424 | if ($g->voffset) | 479 | if ($g->voffset) |
| @@ -509,6 +564,13 @@ document pgrow | |||
| 509 | Pretty print all glyphs in row structure row. | 564 | Pretty print all glyphs in row structure row. |
| 510 | end | 565 | end |
| 511 | 566 | ||
| 567 | define pgrowit | ||
| 568 | pgrowx it->glyph_row | ||
| 569 | end | ||
| 570 | document pgrowit | ||
| 571 | Pretty print all glyphs in it->glyph_row. | ||
| 572 | end | ||
| 573 | |||
| 512 | define xtype | 574 | define xtype |
| 513 | xgettype $ | 575 | xgettype $ |
| 514 | output $type | 576 | output $type |
diff --git a/src/ChangeLog b/src/ChangeLog index 9a411f83afc..3858492a0b4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2009-12-19 Eli Zaretskii <eliz@gnu.org> | 1 | 2009-12-19 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * .gdbinit (pitx): Don't use enum names, use their values. Remove | ||
| 4 | reference to non-existing value GET_FROM_COMPOSITION. | ||
| 5 | (pgx): Don't use enum names, use their values. | ||
| 6 | (pitmethod): New helper command. | ||
| 7 | (pitx): Use it to display iteration method. | ||
| 8 | (pgrowit): New command. | ||
| 9 | |||
| 3 | * makefile.w32-in ($(BLD)/cmds.$(O)): Depend on frame.h. | 10 | * makefile.w32-in ($(BLD)/cmds.$(O)): Depend on frame.h. |
| 4 | 11 | ||
| 5 | Update dependencies in Makefile.in. | 12 | Update dependencies in Makefile.in. |