Kyle Jones <kyle_jones(a)wonderworks.com> writes:
> Karl, I'm interested in seeing f->framemeths->symbol and sym.
Well, the whole reason for the SEGV is that f is 0x0. See Subject:. :-)
gdb complains that it does not know of a "sym" in this context. I'm
trying to chase through the twisty maze of #definitions and inline
func defs to figure out how gdb would comprehend what is being called
"sym" here, but so far...
Er, hang on, I think I just got it. Or got something, anyway. The
FRAME_TYPE_DATA whose assertion is getting horked over on a null
pointer is actually the FRAME_X_XIC at the top of x_to_emacs_keysym(),
line 783, assuming I've followed the twisty maze properly.
(gdb) p event->window
$16 = 79692505
(gdb) p event->display
$17 = (Display *) 0x85074c0
(gdb) p *(event->display)
$18 = <incomplete type>
(gdb) p get_device_from_display (event->display)
$19 = (struct device *) 0x832cf10
(gdb) p x_any_window_to_frame(get_device_from_display (event->display),event->window)
$20 = (struct frame *) 0x0
I just single-stepped through that call of x_any_window_to_frame. It
just plain didn't find a frame it liked. It did check a frame on the
way through (which does have symbol 'x), but it didn't think that was
the right one.
(gdb) p x_any_window_to_frame(get_device_from_display (event->display),event->window)
Breakpoint 1, x_any_window_to_frame (d=0x832cf10, wdesc=79692505)
at frame-x.c:109
109 assert (DEVICE_X_P (d));
The program being debugged stopped while in a function called from GDB.
When the function (x_any_window_to_frame) is done executing, GDB will silently
stop (instead of continuing to evaluate the expression containing
the function call).
(gdb) n
145 return f;
(gdb)
119 frame = XCAR (tail);
(gdb)
120 f = XFRAME (frame);
(gdb)
122 if (wdesc == XtWindow (FRAME_X_SHELL_WIDGET (f)) ||
(gdb) p frame
$39 = 140188784
(gdb) p f
$40 = (struct frame *) 0x85b1c70
(gdb) pobj f->framemeths->symbol
$41 = (Lisp_Symbol *) 0x82ecd24
$42 = {lheader = {type = 3, mark = 0, c_readonly = 0, lisp_readonly = 0},
next = 0x0, name = 0x82ec59c, value = 136654664, function = 136654664,
plist = 146629516}
Symbol name: x
(gdb) n
124 wdesc == XtWindow (FRAME_X_TEXT_WIDGET (f)))
(gdb)
141 for (i = 0; i < FRAME_X_NUM_TOP_WIDGETS (f); i++)
(gdb)
143 Widget wid = FRAME_X_TOP_WIDGETS (f)[i];
(gdb)
144 if (wid && XtIsManaged (wid) && wdesc == XtWindow (wid))
(gdb)
146 }
(gdb)
259 assert (EQ (FRAME_TYPE (f), sym));
(gdb)
141 for (i = 0; i < FRAME_X_NUM_TOP_WIDGETS (f); i++)
(gdb)
150 if (x_window_is_scrollbar (f, wdesc))
(gdb)
153 }
(gdb)
155 return 0;
(gdb)
156 }
(gdb)
> Also please print Qt, Qnil, and Qx for reference.
(gdb) pobj Qt
$6 = (Lisp_Symbol *) 0x82cefcc
$7 = {lheader = {type = 3, mark = 0, c_readonly = 0, lisp_readonly = 0},
next = 0x0, name = 0x82ce7cc, value = 137162700, function = 136654664,
plist = 145957396}
Symbol name: t
(gdb) pobj Qnil
$8 = (Lisp_Symbol *) 0x82cefb4
$9 = {lheader = {type = 3, mark = 0, c_readonly = 0, lisp_readonly = 0},
next = 0x0, name = 0x82ce7bc, value = 137162676, function = 136654664,
plist = 137162676}
Symbol name: nil
(gdb) pobj Qx
$10 = (Lisp_Symbol *) 0x82ecd24
$11 = {lheader = {type = 3, mark = 0, c_readonly = 0, lisp_readonly = 0},
next = 0x0, name = 0x82ec59c, value = 136654664, function = 136654664,
plist = 146629516}
Symbol name: x
--karl