From: Daniel P. <phi...@in...> - 2000-12-11 14:51:53
|
On Mon, 11 Dec 2000, Jeff Dike wrote: > I'm writing an article for Linux Magazine about UML. One of the things I'd > like to talk about is how people are using UML. So, if you're currently using > it for something, are evaluating it for some purpose, or think you might > possibly be interested in using it for something in the indefinite future, I'd > like to hear about it. You know what I'm using UML for: kernel hacking. It's working out pretty well - my earlier post on l-k summarzized the development cycle advantages. Yesterday I did something pretty sophisticated with semaphores between threads and I was able to develop and debug it completely under UML. There weren't any bugs in this case, but still, I didn't have to boot a test machine to verify that. When I did boot the test machine, this code worked exactly as it did in UML. Not only that, but I can make diffs of my work against a clean UML tree and the resulting patch applies cleanly to the normal kernel tree. I'm actually surprised this works so well, and I'm reading your patch now to find out why. Of the 4,000 lines I've looked at so far, most deal with the block layer, console I/O, thread startup and other things I'm not working on. It's a safe guess that UML wouldn't be a lot of use for debugging the Linux thread mechanism itself, but so long as I stay away from such parts of the system that you've modified - and that doesn't seem to be very many - then I can keep extracting my patches directly from UML. Today I'm moving on to running Tux2 on UML. Up to now I've been using the time-honored printk/oops method of debugging Tux2, with modules to make it less painful. Under UML I should compile Tux2 directly into the kernel so I don't have to deal with the module symbol loading on every test cycle. Working with modules isn't any harder under UML than normal Linux, but it's much less convenient for debugging than non-module code. And actually I'd prefer to stick with modules if I could. So I'd like it very much if we could put our heads together and come up with a way of loading getting gdb to load the module symbols automatically. I know it's hard :-). -- Daniel |