/[emacs]/emacs/etc/DEBUG
ViewVC logotype

Diff of /emacs/etc/DEBUG

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by jhd, Mon Jan 27 19:59:07 2003 UTC revision 1.26 by lektu, Tue Feb 4 14:30:40 2003 UTC
# Line 115  First, use these commands: Line 115  First, use these commands:
115      cd src      cd src
116      gdb emacs      gdb emacs
117      b xmenu.c:1296      b xmenu.c:1296
118      r -q      r -q
119    
120  Then type C-x 5 2 to create a new frame, and it hits the breakpoint:  Then type C-x 5 2 to create a new frame, and it hits the breakpoint:
121    
# Line 128  Then type C-x 5 2 to create a new frame, Line 128  Then type C-x 5 2 to create a new frame,
128      $2 = (struct frame *) 0x3f0800      $2 = (struct frame *) 0x3f0800
129      (gdb) p *$      (gdb) p *$
130      $3 = {      $3 = {
131        size = 536871989,        size = 536871989,
132        next = 0x366240,        next = 0x366240,
133        name = 809661752,        name = 809661752,
134        [...]        [...]
135      }      }
136      (gdb) p $3->name      (gdb) p $3->name
# Line 177  this vector.  `recent_keys' is updated i Line 177  this vector.  `recent_keys' is updated i
177    XVECTOR (recent_keys)->contents[recent_keys_index] = c;    XVECTOR (recent_keys)->contents[recent_keys_index] = c;
178    
179  So we define a GDB command `xvector-elts', so the last 10 keystrokes  So we define a GDB command `xvector-elts', so the last 10 keystrokes
180  are printed by  are printed by
181    
182      xvector-elts recent_keys recent_keys_index 10      xvector-elts recent_keys recent_keys_index 10
183    
# Line 189  where you can define xvector-elts as fol Line 189  where you can define xvector-elts as fol
189      xvector      xvector
190      set $foo = $      set $foo = $
191      while $i < $arg2      while $i < $arg2
192      p $foo->contents[$arg1-($i++)]      p $foo->contents[$arg1-($i++)]
193      pr      pr
194      end      end
195      document xvector-elts      document xvector-elts
# Line 217  of function calling. Line 217  of function calling.
217    
218  By printing the remaining elements of args, you can see the argument  By printing the remaining elements of args, you can see the argument
219  values.  Here's how to print the first argument:  values.  Here's how to print the first argument:
220      
221     p args[1]     p args[1]
222     pr     pr
223    
# Line 230  conveniently.  For example: Line 230  conveniently.  For example:
230    
231  and, assuming that "xtype" says that args[0] is a symbol:  and, assuming that "xtype" says that args[0] is a symbol:
232    
233     xsymbol     xsymbol
234    
235  ** Debugging what happens while preloading and dumping Emacs  ** Debugging what happens while preloading and dumping Emacs
236    
# Line 450  and keyboard events, or LessTif menus be Line 450  and keyboard events, or LessTif menus be
450  helpful to set the `DEBUGSOURCES' and `DEBUG_FILE' environment  helpful to set the `DEBUGSOURCES' and `DEBUG_FILE' environment
451  variables, so that one can see what LessTif was doing at this point.  variables, so that one can see what LessTif was doing at this point.
452  For instance  For instance
453      
454    export DEBUGSOURCES="RowColumn.c:MenuShell.c:MenuUtil.c"    export DEBUGSOURCES="RowColumn.c:MenuShell.c:MenuUtil.c"
455    export DEBUG_FILE=/usr/tmp/LESSTIF_TRACE    export DEBUG_FILE=/usr/tmp/LESSTIF_TRACE
456    emacs &    emacs &

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26