2011/3/10 Michel Dänzer <daen...@debian.org> > On Don, 2011-03-10 at 12:38 +0000, Thue Janus Kristensen wrote: > > "finish" doesn't display the return value, because there is no debug > > symbols. > > Install libdrm2-dbg? :) >
Ah, thanks. The return value is indeed -1. > > > A random page on the Internet said that the return value is probably > > in eax. Doing > > > > > > > print $eax > > > > > > after "finish" on drmDropMaster on the second X server, I get the > > value "-1". > > Can you get the value of errno as well? > (gdb) finish [...] (gdb) print errno $6 = 9 > > This does indicate that the DRM_IOCTL_DROP_MASTER may be failing, which > could explain the problem. The question why it would fail. Looking at > drm_dropmaster_ioctl() in the kernel, I think the only relevant case is > > if (!file_priv->minor->master) > return -EINVAL; > > but I don't know how file_priv->minor->master could be NULL. Perhaps I should insert a debug print in the kernel source code, to verify that it is indeed that one which triggers? Regards, Thue