Mercurial > emacs
comparison etc/DEBUG @ 58969:eae7969f1b06
Change printing example to break on a procedure name.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Wed, 15 Dec 2004 01:27:48 +0000 |
parents | 7e6072c66e67 |
children | 1c3d052ef4bf eac554634bfa |
comparison
equal
deleted
inserted
replaced
58968:036ee6579046 | 58969:eae7969f1b06 |
---|---|
105 objects which you can examine in turn with the x... commands. | 105 objects which you can examine in turn with the x... commands. |
106 | 106 |
107 Even with a live process, these x... commands are useful for | 107 Even with a live process, these x... commands are useful for |
108 examining the fields in a buffer, window, process, frame or marker. | 108 examining the fields in a buffer, window, process, frame or marker. |
109 Here's an example using concepts explained in the node "Value History" | 109 Here's an example using concepts explained in the node "Value History" |
110 of the GDB manual to print the variable frame from this line in | 110 of the GDB manual to print values associated with the variable |
111 xmenu.c: | 111 called frame. First, use these commands: |
112 | |
113 buf.frame_or_window = frame; | |
114 | |
115 First, use these commands: | |
116 | 112 |
117 cd src | 113 cd src |
118 gdb emacs | 114 gdb emacs |
119 b xmenu.c:1296 | 115 b set_frame_buffer_list |
120 r -q | 116 r -q |
121 | 117 |
122 Then type C-x 5 2 to create a new frame, and it hits the breakpoint: | 118 Then when Emacs it hits the breakpoint: |
123 | 119 |
124 (gdb) p frame | 120 (gdb) p frame |
125 $1 = 1077872640 | 121 $1 = 139854428 |
126 (gdb) xtype | 122 (gdb) xtype |
127 Lisp_Vectorlike | 123 Lisp_Vectorlike |
128 PVEC_FRAME | 124 PVEC_FRAME |
129 (gdb) xframe | 125 (gdb) xframe |
130 $2 = (struct frame *) 0x3f0800 | 126 $2 = (struct frame *) 0x8560258 |
131 (gdb) p *$ | 127 (gdb) p *$ |
132 $3 = { | 128 $3 = { |
133 size = 536871989, | 129 size = 1073742931, |
134 next = 0x366240, | 130 next = 0x85dfe58, |
135 name = 809661752, | 131 name = 140615219, |
136 [...] | 132 [...] |
137 } | 133 } |
138 (gdb) p $3->name | 134 (gdb) p $3->name |
139 $4 = 809661752 | 135 $4 = 140615219 |
140 | 136 |
141 Now we can use `pr' to print the name of the frame: | 137 Now we can use `pr' to print the name of the frame: |
142 | 138 |
143 (gdb) pr | 139 (gdb) pr |
144 "emacs@steenrod.math.nwu.edu" | 140 "emacs@steenrod.math.nwu.edu" |