1 # Copyright (C) 1992-1998, 2000-2015 Free Software Foundation, Inc.
3 # This file is part of GNU Emacs.
5 # GNU Emacs is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3, or (at your option)
10 # GNU Emacs is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
18 # Force loading of symbols, enough to give us VALBITS etc.
20 # With some compilers, we need this to give us struct Lisp_Symbol etc.:
21 set $dummy = Fmake_symbol + 8
23 # Find lwlib source files too.
25 #dir /gd/gnu/lesstif-0.89.9/lib/Xm
27 # Don't enter GDB when user types C-g to quit.
28 # This has one unfortunate effect: you can't type C-c
29 # at the GDB to stop Emacs, when using X.
30 # However, C-z works just as well in that case.
33 # Make it work like SIGINT normally does.
36 # Pass on user signals
37 handle SIGUSR1 noprint pass
38 handle SIGUSR2 noprint pass
40 # Don't pass SIGALRM to Emacs. This makes problems when
44 # Use $bugfix so that the value isn't a constant.
45 # Using a constant runs into GDB bugs sometimes.
47 if (CHECK_LISP_OBJECT_TYPE)
52 set $ptr = $bugfix & VALMASK
56 if (CHECK_LISP_OBJECT_TYPE)
61 set $int = $bugfix << (USE_LSB_TAG ? 0 : INTTYPEBITS) >> INTTYPEBITS
65 if (CHECK_LISP_OBJECT_TYPE)
70 set $type = (enum Lisp_Type) (USE_LSB_TAG ? $bugfix & (1 << GCTYPEBITS) - 1 : (EMACS_UINT) $bugfix >> VALBITS)
76 set $ptr = ($ptr << GCTYPEBITS)
78 set $ptr = ((struct Lisp_Symbol *) ((char *)lispsym + $ptr))
81 # Access the name of a symbol
84 set $symname = $ptr->name
87 # Set up something to print out s-expressions.
88 # We save and restore print_output_debug_flag to prevent the w32 port
89 # from calling OutputDebugString, which causes GDB to display each
90 # character twice (yuk!).
95 Print the emacs s-expression which is $.
96 Works only when an inferior emacs is executing.
99 # Print out s-expressions
102 set $output_debug = print_output_debug_flag
103 set print_output_debug_flag = 0
104 call safe_debug_print ($tmp)
105 set print_output_debug_flag = $output_debug
108 Print the argument as an emacs s-expression
109 Works only when an inferior emacs is executing.
112 # Print value of lisp variable
115 set $output_debug = print_output_debug_flag
116 set print_output_debug_flag = 0
117 call safe_debug_print (find_symbol_value (intern ($tmp)))
118 set print_output_debug_flag = $output_debug
121 Print the value of the lisp variable given as argument.
122 Works only when an inferior emacs is executing.
125 # Print out current buffer point and boundaries
127 set $b = current_buffer
129 printf "BUF PT: %d", $b->pt
130 if ($b->pt != $b->pt_byte)
131 printf "[%d]", $b->pt_byte
133 printf " of 1..%d", $t->z
134 if ($t->z != $t->z_byte)
135 printf "[%d]", $t->z_byte
137 if ($b->begv != 1 || $b->zv != $t->z)
138 printf " NARROW=%d..%d", $b->begv, $b->zv
139 if ($b->begv != $b->begv_byte || $b->zv != $b->zv_byte)
140 printf " [%d..%d]", $b->begv_byte, $b->zv_byte
143 printf " GAP: %d", $t->gpt
144 if ($t->gpt != $t->gpt_byte)
145 printf "[%d]", $t->gpt_byte
147 printf " SZ=%d\n", $t->gap_size
150 Print current buffer's point and boundaries.
151 Prints values of point, beg, end, narrow, and gap for current buffer.
155 set $itmethod = $arg0
158 printf "GET_FROM_BUFFER"
161 printf "GET_FROM_DISPLAY_VECTOR"
164 printf "GET_FROM_STRING"
167 printf "GET_FROM_C_STRING"
170 printf "GET_FROM_IMAGE"
173 printf "GET_FROM_STRETCH"
175 if ($itmethod < 0 || $itmethod > 5)
180 Pretty print it->method given as first arg
183 # Print out iterator given as first arg
186 printf "cur=%d", $it->current.pos.charpos
187 if ($it->current.pos.charpos != $it->current.pos.bytepos)
188 printf "[%d]", $it->current.pos.bytepos
190 printf " pos=%d", $it->position.charpos
191 if ($it->position.charpos != $it->position.bytepos)
192 printf "[%d]", $it->position.bytepos
194 printf " start=%d", $it->start.pos.charpos
195 if ($it->start.pos.charpos != $it->start.pos.bytepos)
196 printf "[%d]", $it->start.pos.bytepos
198 printf " end=%d", $it->end_charpos
199 printf " stop=%d", $it->stop_charpos
200 printf " face=%d", $it->face_id
201 if ($it->multibyte_p)
204 if ($it->header_line_p)
207 if ($it->n_overlay_strings > 0)
208 printf " nov=%d", $it->n_overlay_strings
211 printf " sp=%d", $it->sp
215 if ($it->len == 1 && $it->c >= ' ' && it->c < 255)
216 printf " ch='%c'", $it->c
218 printf " ch=[%d,%d]", $it->c, $it->len
224 printf "IT_CHARACTER"
227 printf "IT_COMPOSITION"
239 printf "IT_TRUNCATION"
242 printf "IT_CONTINUATION"
244 if ($it->what < 0 || $it->what > 6)
248 if ($it->method != 0)
251 pitmethod $it->method
252 if ($it->method == 2)
254 printf "[%d]", $it->current.string_pos.charpos
256 if ($it->method == 4)
258 printf "[%d]", $it->image_id
263 printf "BIDI: base_stop=%d prev_stop=%d level=%d\n", $it->base_level_stop, $it->prev_stop, $it->bidi_it.resolved_level
265 if ($it->region_beg_charpos >= 0)
266 printf "reg=%d-%d ", $it->region_beg_charpos, $it->region_end_charpos
268 printf "vpos=%d hpos=%d", $it->vpos, $it->hpos,
269 printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y
270 printf " x=%d vx=%d-%d", $it->current_x, $it->first_visible_x, $it->last_visible_x
271 printf " w=%d", $it->pixel_width
272 printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent
273 printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent
276 while ($i < $it->sp && $i < 4)
277 set $e = $it->stack[$i]
278 printf "stack[%d]: ", $i
280 printf "[%d]", $e.position.charpos
286 Pretty print a display iterator.
287 Take one arg, an iterator object or pointer.
294 Pretty print the display iterator it.
299 printf "y=%d x=%d pwid=%d", $row->y, $row->x, $row->pixel_width
300 printf " a+d=%d+%d=%d", $row->ascent, $row->height-$row->ascent, $row->height
301 printf " phys=%d+%d=%d", $row->phys_ascent, $row->phys_height-$row->phys_ascent, $row->phys_height
302 printf " vis=%d\n", $row->visible_height
303 printf "used=(LMargin=%d,Text=%d,RMargin=%d) Hash=%d\n", $row->used[0], $row->used[1], $row->used[2], $row->hash
304 printf "start=%d end=%d", $row->start.pos.charpos, $row->end.pos.charpos
308 if ($row->displays_text_p)
311 if ($row->mode_line_p)
314 if ($row->continued_p)
317 if ($row-> truncated_on_left_p)
320 if ($row-> truncated_on_right_p)
323 if ($row->starts_in_middle_of_char_p)
326 if ($row->ends_in_middle_of_char_p)
329 if ($row->ends_in_newline_from_string_p)
332 if ($row->ends_at_zv_p)
335 if ($row->overlapped_p)
338 if ($row->overlapping_p)
344 Pretty print information about glyph_row.
345 Takes one argument, a row object or pointer.
352 Pretty print information about glyph_row in row.
358 printf "y=%d x=%d vpos=%d hpos=%d", $cp->y, $cp->x, $cp->vpos, $cp->hpos
361 Pretty print a window cursor.
366 pcursorx output_cursor
370 Pretty print the output_cursor.
375 if ($w->mini_p != Qnil)
378 printf "Window %d ", $int
380 set $tem = (struct buffer *) $ptr
382 printf "%s", ((struct Lisp_String *) $ptr)->data
385 set $tem = (struct Lisp_Marker *) $ptr
386 printf "start=%d end:", $tem->charpos
387 if ($w->window_end_valid != Qnil)
388 xgetint $w->window_end_pos
389 printf "pos=%d", $int
390 xgetint $w->window_end_vpos
391 printf " vpos=%d", $int
395 printf " vscroll=%d", $w->vscroll
396 if ($w->force_start != Qnil)
397 printf " FORCE_START"
399 if ($w->must_be_updated_p)
406 pcursorx $w->phys_cursor
407 if ($w->phys_cursor_on_p)
413 if ($w->last_cursor_off_p != $w->cursor_off_p)
414 if ($w->last_cursor_off_p)
420 if ($w->cursor_off_p)
428 Pretty print a window structure.
429 Takes one argument, a pointer to a window structure.
436 Pretty print window structure w.
461 if ($arg0 < 0 || $arg0 > 6)
466 Print textual description of bidi type given as first argument.
473 if ($g.u.ch >= ' ' && $g.u.ch < 127)
474 printf "CHAR[%c]", $g.u.ch
476 printf "CHAR[0x%x]", $g.u.ch
481 printf "COMP[%d (%d..%d)]", $g.u.cmp.id, $g.slice.cmp.from, $g.slice.cmp.to
486 if ($g.u.glyphless.method == 0)
487 printf "THIN;0x%x]", $g.u.glyphless.ch
489 if ($g.u.glyphless.method == 1)
490 printf "EMPTY;0x%x]", $g.u.glyphless.ch
492 if ($g.u.glyphless.method == 2)
493 printf "ACRO;0x%x]", $g.u.glyphless.ch
495 if ($g.u.glyphless.method == 3)
496 printf "HEX;0x%x]", $g.u.glyphless.ch
501 printf "IMAGE[%d]", $g.u.img_id
505 printf "STRETCH[%d+%d]", $g.u.stretch.height, $g.u.stretch.ascent
508 if ($type == Lisp_String)
510 printf " str=0x%x[%d]", ((struct Lisp_String *)$ptr)->data, $g.charpos
512 printf " pos=%d", $g.charpos
514 # For characters, print their resolved level and bidi type
515 if ($g.type == 0 || $g.type == 2)
516 printf " blev=%d,btyp=", $g.resolved_level
517 pbiditype $g.bidi_type
519 printf " w=%d a+d=%d+%d", $g.pixel_width, $g.ascent, $g.descent
520 # If not DEFAULT_FACE_ID
522 printf " face=%d", $g.face_id
525 printf " vof=%d", $g.voffset
533 if ($g.glyph_not_available_p)
536 if ($g.overlaps_vertically_p)
539 if ($g.avoid_cursor_p)
542 if ($g.left_box_line_p)
545 if ($g.right_box_line_p)
548 if ($g.slice.img.x || $g.slice.img.y || $g.slice.img.width || $g.slice.img.height)
549 printf " slice=%d,%d,%d,%d" ,$g.slice.img.x, $g.slice.img.y, $g.slice.img.width, $g.slice.img.height
554 Pretty print a glyph structure.
555 Takes one argument, a pointer to a glyph structure.
563 Pretty print glyph structure glyph.
571 Pretty print glyph structure glyph[I].
572 Takes one argument, a integer I.
576 set $pgidx = $pgidx + 1
580 Pretty print next glyph structure.
588 set $used = $row->used[$area]
590 set $gl0 = $row->glyphs[$area]
592 printf "%s: %d glyphs\n", ($area == 0 ? "LEFT" : $area == 2 ? "RIGHT" : "TEXT"), $used
593 while ($pgidx < $used)
594 printf "%3d %4d: ", $pgidx, $xofs
596 set $xofs = $xofs + $gl0[$pgidx]->pixel_width
597 set $pgidx = $pgidx + 1
600 set $area = $area + 1
604 Pretty print all glyphs in a row structure.
605 Takes one argument, a pointer to a row structure.
612 Pretty print all glyphs in row structure row.
619 Pretty print all glyphs in it->glyph_row.
623 printf "edges=(%d,%d),enb=%d,r2l=%d,cont=%d,trunc=(%d,%d),at_zv=%d\n", $arg0->minpos.charpos, $arg0->maxpos.charpos, $arg0->enabled_p, $arg0->reversed_p, $arg0->continued_p, $arg0->truncated_on_left_p, $arg0->truncated_on_right_p, $arg0->ends_at_zv_p
626 Print important attributes of a glyph_row structure.
627 Takes one argument, a pointer to a glyph_row structure.
633 set $glend = $mtx->rows + $mtx->nrows - 1
643 Print data about glyph rows in a glyph matrix.
644 Takes one argument, a pointer to a glyph_matrix structure.
651 if $type == Lisp_Misc
654 if $type == Lisp_Vectorlike
660 Print the type of $, assuming it is an Emacs Lisp value.
661 If the first type printed is Lisp_Vector or Lisp_Misc,
662 a second line gives the more precise type.
666 set $size = ((struct Lisp_Vector *) $arg0)->header.size
667 if ($size & PSEUDOVECTOR_FLAG)
668 output (enum pvec_type) (($size & PVEC_TYPE_MASK) >> PSEUDOVECTOR_AREA_BITS)
670 output PVEC_NORMAL_VECTOR
675 Print the subtype of vectorlike object.
676 Takes one argument, a pointer to an object.
684 Print the subtype of vectorlike object.
685 This command assumes that $ is a Lisp_Object.
689 set $size = ((struct Lisp_Vector *) $arg0)->header.size
690 if ($size & PSEUDOVECTOR_FLAG)
691 output ($size & PSEUDOVECTOR_SIZE_MASK)
693 output (($size & PSEUDOVECTOR_REST_MASK) >> PSEUDOVECTOR_SIZE_BITS)
695 output ($size & ~ARRAY_MARK_FLAG)
700 Print the size of vectorlike object.
701 Takes one argument, a pointer to an object.
710 This command assumes that $ is a Lisp_Object.
715 output (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type)
719 Assume that $ is some misc type and print its specific type.
727 Print $ as an Emacs Lisp integer. This gets the sign right.
735 Print the pointer portion of an Emacs Lisp value in $.
740 print (struct Lisp_Marker *) $ptr
743 Print $ as a marker pointer.
744 This command assumes that $ is an Emacs Lisp marker value.
749 print (struct Lisp_Overlay *) $ptr
752 Print $ as a overlay pointer.
753 This command assumes that $ is an Emacs Lisp overlay value.
758 print (struct Lisp_Free *) $ptr
761 Print $ as a misc free-cell pointer.
762 This command assumes that $ is an Emacs Lisp Misc value.
768 print (struct Lisp_Symbol *) $ptr
773 Print the name and address of the symbol $.
774 This command assumes that $ is an Emacs Lisp symbol value.
779 print (struct Lisp_String *) $ptr
784 Print the contents and address of the string $.
785 This command assumes that $ is an Emacs Lisp string value.
790 print (struct Lisp_Vector *) $ptr
791 output ($->header.size > 50) ? 0 : ($->contents[0])@($->header.size & ~ARRAY_MARK_FLAG)
795 Print the contents and address of the vector $.
796 This command assumes that $ is an Emacs Lisp vector value.
801 print (struct Lisp_Process *) $ptr
806 Print the address of the struct Lisp_process to which $ points.
807 This command assumes that $ is a Lisp_Object.
812 print (struct frame *) $ptr
814 set $ptr = (struct Lisp_String *) $ptr
819 Print $ as a frame pointer.
820 This command assumes $ is an Emacs Lisp frame value.
825 print (struct Lisp_Vector *) $ptr
826 output ($->contents[0])@($->header.size & 0xff)
829 Print $ as a compiled function pointer.
830 This command assumes that $ is an Emacs Lisp compiled value.
835 print (struct window *) $ptr
836 set $window = (struct window *) $ptr
837 printf "%dx%d+%d+%d\n", $window->total_cols, $window->total_lines, $window->left_col, $window->top_line
840 Print $ as a window pointer, assuming it is an Emacs Lisp window value.
841 Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
846 print (struct save_window_data *) $ptr
849 Print $ as a window configuration pointer.
850 This command assumes that $ is an Emacs Lisp window configuration value.
855 print (struct Lisp_Subr *) $ptr
860 Print the address of the subr which the Lisp_Object $ points to.
865 print (struct Lisp_Char_Table *) $ptr
868 printf " %d extra slots", ($->header.size & 0x1ff) - 68
872 Print the address of the char-table $, and its purpose.
873 This command assumes that $ is an Emacs Lisp char-table value.
878 print (struct Lisp_Sub_Char_Table *) $ptr
879 set $subchartab = (struct Lisp_Sub_Char_Table *) $ptr
880 printf "Depth: %d, Min char: %d (0x%x)\n", $subchartab->depth, $subchartab->min_char, $subchartab->min_char
882 document xsubchartable
883 Print the address of the sub-char-table $, its depth and min-char.
884 This command assumes that $ is an Emacs Lisp sub-char-table value.
889 print (struct Lisp_Bool_Vector *) $ptr
890 output ($->size > 256) ? 0 : ($->data[0])@(($->size + BOOL_VECTOR_BITS_PER_CHAR - 1)/ BOOL_VECTOR_BITS_PER_CHAR)
894 Print the contents and address of the bool-vector $.
895 This command assumes that $ is an Emacs Lisp bool-vector value.
900 print (struct buffer *) $ptr
902 output ((struct Lisp_String *) $ptr)->data
906 Set $ as a buffer pointer and the name of the buffer.
907 This command assumes $ is an Emacs Lisp buffer value.
912 print (struct Lisp_Hash_Table *) $ptr
915 Set $ as a hash table pointer.
916 This command assumes that $ is an Emacs Lisp hash table value.
921 print (struct Lisp_Cons *) $ptr
926 Print the contents of $ as an Emacs Lisp cons.
934 Print the contents of the next cell in a list.
935 This command assumes that the last thing you printed was a cons cell contents
936 (type struct Lisp_Cons) or a pointer to one.
941 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->car : 0)
944 Assume that $ is an Emacs Lisp pair and print its car.
950 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->u.cdr : 0)
953 Assume that $ is an Emacs Lisp pair and print its cdr.
958 set $cons = (struct Lisp_Cons *) $ptr
962 while $cons != $nil && $i < 10
966 set $cons = (struct Lisp_Cons *) $ptr
978 Print $ assuming it is a list.
983 print ((struct Lisp_Float *) $ptr)->u.data
986 Print $ assuming it is a lisp floating-point number.
991 print (struct scrollbar *) $ptr
996 Print $ as a scrollbar pointer.
1001 if $type == Lisp_Int0 || $type == Lisp_Int1
1004 if $type == Lisp_Symbol
1007 if $type == Lisp_String
1010 if $type == Lisp_Cons
1013 if $type == Lisp_Float
1016 if $type == Lisp_Misc
1017 set $misc = (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type)
1018 if $misc == Lisp_Misc_Free
1021 if $misc == Lisp_Misc_Marker
1024 if $misc == Lisp_Misc_Overlay
1027 # if $misc == Lisp_Misc_Save_Value
1031 if $type == Lisp_Vectorlike
1032 set $size = ((struct Lisp_Vector *) $ptr)->header.size
1033 if ($size & PSEUDOVECTOR_FLAG)
1034 set $vec = (enum pvec_type) (($size & PVEC_TYPE_MASK) >> PSEUDOVECTOR_AREA_BITS)
1035 if $vec == PVEC_NORMAL_VECTOR
1038 if $vec == PVEC_PROCESS
1041 if $vec == PVEC_FRAME
1044 if $vec == PVEC_COMPILED
1047 if $vec == PVEC_WINDOW
1050 if $vec == PVEC_WINDOW_CONFIGURATION
1053 if $vec == PVEC_SUBR
1056 if $vec == PVEC_CHAR_TABLE
1059 if $vec == PVEC_BOOL_VECTOR
1062 if $vec == PVEC_BUFFER
1065 if $vec == PVEC_HASH_TABLE
1074 Print $ as a lisp object of any type.
1078 set $data = (char *) $arg0->data
1079 set $strsize = ($arg0->size_byte < 0) ? ($arg0->size & ~ARRAY_MARK_FLAG) : $arg0->size_byte
1080 # GDB doesn't like zero repetition counts
1084 output ($arg0->size > 1000) ? 0 : ($data[0])@($strsize)
1091 set $sym_name = (struct Lisp_String *) $ptr
1095 Print argument as a symbol.
1099 set $tmp = (struct Lisp_Hash_Table *) (Vcoding_system_hash_table & VALMASK)
1100 set $tmp = (struct Lisp_Vector *) ($tmp->key_and_value & VALMASK)
1101 set $name = $tmp->contents[$arg0 * 2]
1104 print $tmp->contents[$arg0 * 2 + 1]
1108 Print the name and attributes of coding system that has ID (argument).
1112 set $tmp = (struct Lisp_Hash_Table *) (Vcharset_hash_table & VALMASK)
1113 set $tmp = (struct Lisp_Vector *) ($tmp->key_and_value & VALMASK)
1114 p $tmp->contents[charset_table[$arg0].hash_index * 2]
1118 Print the name of charset that has ID (argument).
1123 set $tbl = (struct Lisp_Char_Table *) $ptr
1125 xgetint $tbl->extras[0]
1126 printf " ID:%d", $int
1127 xgettype $tbl->extras[1]
1128 xgetptr $tbl->extras[1]
1129 if $type == Lisp_String
1130 set $ptr = (struct Lisp_String *) $ptr
1134 xgetptr $tbl->extras[2]
1135 set $ptr = (struct Lisp_Char_Table *) $ptr
1136 xgetptr $ptr->extras[1]
1137 set $ptr = (struct Lisp_String *) $ptr
1138 printf " Realized from:"
1146 set $size = (((struct Lisp_Vector *) $ptr)->header.size & 0x1FF)
1147 if $size == FONT_SPEC_MAX
1148 print (struct font_spec *) $ptr
1150 if $size == FONT_ENTITY_MAX
1151 print (struct font_entity *) $ptr
1153 print (struct font *) $ptr
1158 Print $ assuming it is a list font (font-spec, font-entity, or font-object).
1162 set $bt = backtrace_top ()
1163 while backtrace_p ($bt)
1164 set $fun = backtrace_function ($bt)
1166 if $type == Lisp_Symbol
1168 printf " (0x%x)\n", backtrace_args ($bt)
1171 printf "0x%x ", $ptr
1172 if $type == Lisp_Vectorlike
1174 set $size = ((struct Lisp_Vector *) $ptr)->header.size
1175 if ($size & PSEUDOVECTOR_FLAG)
1176 output (enum pvec_type) (($size & PVEC_TYPE_MASK) >> PSEUDOVECTOR_AREA_BITS)
1178 output $size & ~ARRAY_MARK_FLAG
1181 printf "Lisp type %d", $type
1185 set $bt = backtrace_next ($bt)
1189 Print a backtrace of Lisp function calls from backtrace_list.
1190 Set a breakpoint at Fsignal and call this to see from where
1191 an error was signaled.
1194 define xprintbytestr
1195 set $data = (char *) $arg0->data
1196 set $bstrsize = ($arg0->size_byte < 0) ? ($arg0->size & ~ARRAY_MARK_FLAG) : $arg0->size_byte
1199 output/u ($arg0->size > 1000) ? 0 : ($data[0])@($bvsize)
1204 document xprintbytestr
1205 Print a string of byte code.
1208 define xwhichsymbols
1209 set $output_debug = print_output_debug_flag
1210 set print_output_debug_flag = 0
1211 call safe_debug_print (which_symbols ($arg0, $arg1))
1212 set print_output_debug_flag = $output_debug
1214 document xwhichsymbols
1215 Print symbols which references a given lisp object
1216 either as its symbol value or symbol function.
1217 Call with two arguments: the lisp object and the
1218 maximum number of symbols referencing it to produce.
1222 set $bt = byte_stack_list
1224 xgetptr $bt->byte_string
1225 set $ptr = (struct Lisp_String *) $ptr
1227 printf "\n0x%x => ", $bt->byte_string
1228 xwhichsymbols $bt->byte_string 5
1233 Print a backtrace of the byte code stack.
1236 # Show Lisp backtrace after normal backtrace.
1237 define hookpost-backtrace
1238 set $bt = backtrace_top ()
1239 if backtrace_p ($bt)
1241 echo Lisp Backtrace:\n
1246 # Flush display (X only)
1251 Flush pending X window display updates to screen.
1252 Works only when an inferior emacs is executing.
1257 set print sevenbit-strings
1259 show environment DISPLAY
1260 show environment TERM
1262 # When debugging, it is handy to be able to "return" from
1263 # terminate_due_to_signal when an assertion failure is non-fatal.
1264 break terminate_due_to_signal
1266 # x_error_quitter is defined only on X. But window-system is set up
1267 # only at run time, during Emacs startup, so we need to defer setting
1268 # the breakpoint. init_sys_modes is the first function called on
1269 # every platform after init_display, where window-system is set.
1270 tbreak init_sys_modes
1273 xgetptr globals.f_Vinitial_window_system
1276 set $tem = (struct Lisp_String *) $ptr
1277 set $tem = (char *) $tem->data
1278 # If we are running in synchronous mode, we want a chance to look
1279 # around before Emacs exits. Perhaps we should put the break
1280 # somewhere else instead...
1281 if $tem[0] == 'x' && $tem[1] == '\0'
1282 break x_error_quitter