comparison etc/DEBUG @ 49600:23a1cea22d13

Trailing whitespace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 14:56:31 +0000
parents e0ff22ddc744
children 695cf19ef79e d7ddb3e565de
comparison
equal deleted inserted replaced
49599:5ade352e8d1c 49600:23a1cea22d13
113 First, use these commands: 113 First, use these commands:
114 114
115 cd src 115 cd src
116 gdb emacs 116 gdb emacs
117 b xmenu.c:1296 117 b xmenu.c:1296
118 r -q 118 r -q
119 119
120 Then type C-x 5 2 to create a new frame, and it hits the breakpoint: 120 Then type C-x 5 2 to create a new frame, and it hits the breakpoint:
121 121
122 (gdb) p frame 122 (gdb) p frame
123 $1 = 1077872640 123 $1 = 1077872640
126 PVEC_FRAME 126 PVEC_FRAME
127 (gdb) xframe 127 (gdb) xframe
128 $2 = (struct frame *) 0x3f0800 128 $2 = (struct frame *) 0x3f0800
129 (gdb) p *$ 129 (gdb) p *$
130 $3 = { 130 $3 = {
131 size = 536871989, 131 size = 536871989,
132 next = 0x366240, 132 next = 0x366240,
133 name = 809661752, 133 name = 809661752,
134 [...] 134 [...]
135 } 135 }
136 (gdb) p $3->name 136 (gdb) p $3->name
137 $4 = 809661752 137 $4 = 809661752
138 138
175 this vector. `recent_keys' is updated in keyboard.c by the command 175 this vector. `recent_keys' is updated in keyboard.c by the command
176 176
177 XVECTOR (recent_keys)->contents[recent_keys_index] = c; 177 XVECTOR (recent_keys)->contents[recent_keys_index] = c;
178 178
179 So we define a GDB command `xvector-elts', so the last 10 keystrokes 179 So we define a GDB command `xvector-elts', so the last 10 keystrokes
180 are printed by 180 are printed by
181 181
182 xvector-elts recent_keys recent_keys_index 10 182 xvector-elts recent_keys recent_keys_index 10
183 183
184 where you can define xvector-elts as follows: 184 where you can define xvector-elts as follows:
185 185
187 set $i = 0 187 set $i = 0
188 p $arg0 188 p $arg0
189 xvector 189 xvector
190 set $foo = $ 190 set $foo = $
191 while $i < $arg2 191 while $i < $arg2
192 p $foo->contents[$arg1-($i++)] 192 p $foo->contents[$arg1-($i++)]
193 pr 193 pr
194 end 194 end
195 document xvector-elts 195 document xvector-elts
196 Prints a range of elements of a Lisp vector. 196 Prints a range of elements of a Lisp vector.
197 xvector-elts v n i 197 xvector-elts v n i
215 This will print the name of the Lisp function called by that level 215 This will print the name of the Lisp function called by that level
216 of function calling. 216 of function calling.
217 217
218 By printing the remaining elements of args, you can see the argument 218 By printing the remaining elements of args, you can see the argument
219 values. Here's how to print the first argument: 219 values. Here's how to print the first argument:
220 220
221 p args[1] 221 p args[1]
222 pr 222 pr
223 223
224 If you do not have a live process, you can use xtype and the other 224 If you do not have a live process, you can use xtype and the other
225 x... commands such as xsymbol to get such information, albeit less 225 x... commands such as xsymbol to get such information, albeit less
228 p *args 228 p *args
229 xtype 229 xtype
230 230
231 and, assuming that "xtype" says that args[0] is a symbol: 231 and, assuming that "xtype" says that args[0] is a symbol:
232 232
233 xsymbol 233 xsymbol
234 234
235 ** Debugging what happens while preloading and dumping Emacs 235 ** Debugging what happens while preloading and dumping Emacs
236 236
237 Type `gdb temacs' and start it with `r -batch -l loadup dump'. 237 Type `gdb temacs' and start it with `r -batch -l loadup dump'.
238 238
448 If you encounter bugs whereby Emacs built with LessTif grabs all mouse 448 If you encounter bugs whereby Emacs built with LessTif grabs all mouse
449 and keyboard events, or LessTif menus behave weirdly, it might be 449 and keyboard events, or LessTif menus behave weirdly, it might be
450 helpful to set the `DEBUGSOURCES' and `DEBUG_FILE' environment 450 helpful to set the `DEBUGSOURCES' and `DEBUG_FILE' environment
451 variables, so that one can see what LessTif was doing at this point. 451 variables, so that one can see what LessTif was doing at this point.
452 For instance 452 For instance
453 453
454 export DEBUGSOURCES="RowColumn.c:MenuShell.c:MenuUtil.c" 454 export DEBUGSOURCES="RowColumn.c:MenuShell.c:MenuUtil.c"
455 export DEBUG_FILE=/usr/tmp/LESSTIF_TRACE 455 export DEBUG_FILE=/usr/tmp/LESSTIF_TRACE
456 emacs & 456 emacs &
457 457
458 causes LessTif to print traces from the three named source files to a 458 causes LessTif to print traces from the three named source files to a