On Sat, 2008-09-20 at 06:18 +0200, Joshua C. wrote: > 2008/9/19 Josh Boyer <jwboyer@xxxxxxxxx>: > > On Fri, Sep 19, 2008 at 07:57:34PM +0200, Joshua C. wrote: > >>I tried `strace -o /drm.strace modprobe drm debug=1` and got the > >>output in the attached file. I tried the same with `strace -o > >>/radeon.trace modprobe radeon modeset=1` but this time there's nothing > >>in the file. How can I hook strace to the radeon driver? > > > > You can't. All you're stracing is the modprobe command, not the driver > > operation. > > > > Drivers don't operate in userspace, and don't make system calls. So strace > > just plain doesn't work. > > > > josh > > > Ok, I cannot use ssh (just one mashine). What other options do I have > to debug this thing? There should be a way to do this with just one > computer. > I read somewhere that the 2.6.26 kernel have some "new debugger" or > so. I just need to make it write down the process to a file. After > restart I can send you the log. > After the drive loads I can only hard reset the computer. And if > everything is in the ram, then I have to dump it to a file. Any other > ideas? When you're debugging graphics drivers that may crash and leave random garbage on your screen, you generally need to ssh in from a second computer. Also, for kernel modesetting, you'll have to resort to printk-debugging for the most cases and put up with a lot of rebooting. The easiest way to debug this is to clone Daves kernel tree from here http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git and then check out the drm-rawhide branch. Something like this: $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git $ git checkout -b drm-rawhide origin/drm-rawhide Or you may want to start from the drm-rawhide branch in my kernel repo here: people.freedesktop.org/~krh/linux-2.6, which have a couple of fixes that Dave hasn't pulled yet - or maybe he just didn't push them to the kernel.org repo. They're in rawhide though. You then need the kernel-devel rpm for the kernel you're running and then you should be able to build just the drm drivers from the kernel tree against your current kernel like this: $ make -C /lib/modules/$(uname -r)/build M=~/src/drm-2.6/drivers/gpu/drm assuming your kernel tree clone lives in ~/src/drm-2.6. Use $ insmod ~/src/drm-2.6/drivers/gpu/drm/drm.ko debug=1 $ insmod ~/src/drm-2.6/drivers/gpu/drm/radeon/radeon.ko modeset=1 to load the drivers with debugging and modesetting enabled. This will let you change and recompile the drivers quickly and you can now add printk statements (or use the DRM_ERROR macro) in the code to see how far it gets etc. Good luck :) Kristian -- fedora-devel-list mailing list fedora-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-devel-list