Commit aa1f38cd authored by Nick Roberts's avatar Nick Roberts

Change printing example to break on a procedure name.

parent d3d89631
...@@ -107,36 +107,32 @@ objects which you can examine in turn with the x... commands. ...@@ -107,36 +107,32 @@ objects which you can examine in turn with the x... commands.
Even with a live process, these x... commands are useful for Even with a live process, these x... commands are useful for
examining the fields in a buffer, window, process, frame or marker. examining the fields in a buffer, window, process, frame or marker.
Here's an example using concepts explained in the node "Value History" Here's an example using concepts explained in the node "Value History"
of the GDB manual to print the variable frame from this line in of the GDB manual to print values associated with the variable
xmenu.c: called frame. First, use these commands:
buf.frame_or_window = frame;
First, use these commands:
cd src cd src
gdb emacs gdb emacs
b xmenu.c:1296 b set_frame_buffer_list
r -q r -q
Then type C-x 5 2 to create a new frame, and it hits the breakpoint: Then when Emacs it hits the breakpoint:
(gdb) p frame (gdb) p frame
$1 = 1077872640 $1 = 139854428
(gdb) xtype (gdb) xtype
Lisp_Vectorlike Lisp_Vectorlike
PVEC_FRAME PVEC_FRAME
(gdb) xframe (gdb) xframe
$2 = (struct frame *) 0x3f0800 $2 = (struct frame *) 0x8560258
(gdb) p *$ (gdb) p *$
$3 = { $3 = {
size = 536871989, size = 1073742931,
next = 0x366240, next = 0x85dfe58,
name = 809661752, name = 140615219,
[...] [...]
} }
(gdb) p $3->name (gdb) p $3->name
$4 = 809661752 $4 = 140615219
Now we can use `pr' to print the name of the frame: Now we can use `pr' to print the name of the frame:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment