From alsa-devel-owner@alsa.jcu.cz  Sat Feb  6 13:50:40 1999
Received: from sunu450.rz.ruhr-uni-bochum.de (sunu450.rz.ruhr-uni-bochum.de [134.147.222.33])
	by marvin.jcu.cz (8.9.1a/8.9.1) with SMTP id NAA32625
	for <alsa-devel@alsa.jcu.cz>; Sat, 6 Feb 1999 13:48:54 +0100
Received: (qmail 2476 invoked from network); 6 Feb 1999 12:48:48 -0000
Received: from dialppp-3-59.rz.ruhr-uni-bochum.de (HELO localhost) (mail@134.147.3.59)
  by mailhost.rz.ruhr-uni-bochum.de with SMTP; 6 Feb 1999 12:48:48 -0000
Received: from brinkmds by localhost with local (Exim 2.05 #1 (Debian))
	id 108u5B-0000Bc-00; Fri, 5 Feb 1999 23:50:41 +0100
Message-ID: <19990205235041.A215@ruhr-uni-bochum.de>
Date: Fri, 5 Feb 1999 23:50:41 +0100
From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
To: alsa-devel@alsa.jcu.cz, bholder@tridentmicro.com
Subject: Re: debug new driver
References: <9902039180.AA918079862@tridentmicro.com> <Pine.LNX.3.96.990204102756.8890B-100000@entry.jcu.cz>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
In-Reply-To: <Pine.LNX.3.96.990204102756.8890B-100000@entry.jcu.cz>; from Jaroslav Kysela on Thu, Feb 04, 1999 at 10:31:15AM +0100
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Thu, Feb 04, 1999 at 10:31:15AM +0100, Jaroslav Kysela wrote:
> On Wed, 3 Feb 1999 bholder@tridentmicro.com wrote:
> 
> > What are the procedures for debugging an ALSA driver? I have written a new
> > driver and have it compiled and linked. When I load the module (modprobe
> > snd-mysound) it reboots the PC. I am used to debugging sound drivers under
> > Windows using SoftICE. I have used gdb under Unix before, but am unsure how
> > to use it to debug something other than a user level program. Sorry if this
> > is FAQ.
> 
> Whole ALSA driver is debugged only with using printk outputs ;-))
> Debugger gdb can be used only for read-only debugging for kernel code and
> I think that you cannot set breakpoints.
> 
> My recommendation is debug your driver step by step (small pieces of
> the code)..

Hehe. This is where the difference between monolithic and microkernels are,
and where the Hurd steps in. [1]

I would like to see Alsa becoming available for the Hurd later this year (or
at beginning of next year), currently, I am porting a lot of Debian[2] packages
to it (we have around 100 right now).

The reason is that you can debug any code with the Hurd, by booting to a
subhurd (even a non-privileged user can do it). This way, you can attach gdb
to the file system translator, or probably even to Alsa (as soon as Gnu Mach
supports a more modular way of including Linux drivers).

About porting Alsa, this shouldn't be too hard in the first stage: We use a
lot of Linux drivers already. However, doing it right would require to write
some special interfaces, that are GNU Mach specific. Note that you can not
expect the same perfomance (read latency) as with Linux right now, but it
could be useful for development and debugging.

I know that this is not of much interest right now, but you can keep it in
mind for later. The Hurd is not vapour ware, it is real. It has rough edges,
but it is up and running (probably comparable to linux 0.99, only that we
can catch up very much faster).

Thanks,
Marcus

[1] www.gnu.org/software/hurd/hurd.html
[2] www.debian.org/

-- 
"Rhubarb is no Egyptian god."        Debian GNU/Linux        finger brinkmd@ 
Marcus Brinkmann                   http://www.debian.org    master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09

