basic questions...
basic questions...
- Subject: basic questions...
- From: Andrew Gallatin <email@hidden>
- Date: Wed, 19 Dec 2001 20:01:31 -0500 (EST)
Hi,
I'm an experienced unix (FreeBSD, Tru64) kernel programmer. I've been
assigned to port a device driver for an OS bypass network cluster
interconnect (PCI) card to Darwin/OS-X. I have a few basic questions
that I'd like to ask here rather than learn the hard way.
- Is having 2 Macs really the only way to debug kernels/drivers?
It looks like they really have ripped out crashdumps, but is it
possible to at least run ddb on the console? If so, how?
Failing that, does anybody have a canned way to cross build gdb
targeting Mach-o binaries on another type of unix host? Is it
possible to attach to the kernel on the (same) running machine to
explore data structures, etc? I work from home & the fewer boxes I
have heating up the place, the better.
- The "IOKitFundamentals" document hints that its possible for an
IOKit driver to create a Posix device file. How? Will I get the
standard open/close/ioctl/mmap (plus others) routines if I use the
IOKit mechanisms? Or do I just call cdevsw_add()? Can somebody point
me at an example IOKit driver which uses device nodes?
- How stable is the UBC under memory pressure & how much memory is it
safe for me wire down for communication? We're typically able to wire
down between 1/2 and 3/4 of physical memory on other platforms...
- Is one supposed to edit $MYDRIVER/$MYDRIVER.pbproj to add matching
information? I'd just do it, but it looks like a machine generated
file & the mac "finder" gui doesn't even let you open the directory,
so I'm assuming there's a "right way" to edit this file & am wondering
what it is. I haven't found any menu that looks right in the Project
Builder IDE. But then again, I'm used to using vi & make as my build
environment, so its quite possible I haven't looked in the right
place.
Thanks for the help,
Drew Gallatin