173 |
|
|
174 |
By printing the remaining elements of args, you can see the argument |
By printing the remaining elements of args, you can see the argument |
175 |
values. Here's how to print the first argument: |
values. Here's how to print the first argument: |
176 |
|
|
177 |
p args[1] |
p args[1] |
178 |
pr |
pr |
179 |
|
|
194 |
cd src |
cd src |
195 |
gdb emacs |
gdb emacs |
196 |
b xmenu.c:1209 |
b xmenu.c:1209 |
197 |
r -q |
r -q |
198 |
|
|
199 |
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: |
200 |
|
|
207 |
$2 = (struct frame *) 0x3f0800 |
$2 = (struct frame *) 0x3f0800 |
208 |
(gdb) p *$ |
(gdb) p *$ |
209 |
$3 = { |
$3 = { |
210 |
size = 536871989, |
size = 536871989, |
211 |
next = 0x366240, |
next = 0x366240, |
212 |
name = 809661752, |
name = 809661752, |
213 |
[...] |
[...] |
214 |
} |
} |
215 |
(gdb) p $3->name |
(gdb) p $3->name |
258 |
XVECTOR (recent_keys)->contents[recent_keys_index] = c; |
XVECTOR (recent_keys)->contents[recent_keys_index] = c; |
259 |
|
|
260 |
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 |
261 |
are printed by |
are printed by |
262 |
|
|
263 |
xvector-elts recent_keys recent_keys_index 10 |
xvector-elts recent_keys recent_keys_index 10 |
264 |
|
|
270 |
xvector |
xvector |
271 |
set $foo = $ |
set $foo = $ |
272 |
while $i < $arg2 |
while $i < $arg2 |
273 |
p $foo->contents[$arg1-($i++)] |
p $foo->contents[$arg1-($i++)] |
274 |
pr |
pr |
275 |
end |
end |
276 |
document xvector-elts |
document xvector-elts |
339 |
|
|
340 |
# Giving --cache-file=/dev/null disables caching, for debugging configure. |
# Giving --cache-file=/dev/null disables caching, for debugging configure. |
341 |
|
|
342 |
or more simply, |
or more simply, |
343 |
|
|
344 |
rm config.cache |
rm config.cache |
345 |
./configure |
./configure |