[openbeos] Re: Haiku image not working?

  • From: "Ryan Leavengood" <leavengood@xxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Sat, 23 Dec 2006 05:30:09 -0500

On 12/23/06, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:

Oh, that's simple:
1) you could use debug_printf() or _sPrintf() instead of printf() -
that will both be redirected to serial output as well.

Yeah I've been using debug_printf.

2) you could redirect the output from /dev/null to /dev/dprintf in the
boot script (one of the first lines after the functions)

I was redirecting to a file, but it wouldn't always be around after
stopping the virtual machine (probably some disk caching issue.) I was
wondering how to redirect to the serial output though, good to know.
FYI the different servers all seem to have different ways of
outputting debugging information. It isn't a big deal but in the
future it might be nice to clean that up and consolidate it more so
they are more consistent.

Anyway, does the app_server crash or just lock up? The latter would
hint it's a locking problem. In that case, pressing F12 and use the KDL
can help, too (to see who's waiting for which sem, and who owns it,
...) - just be prepared that benaphore style lockers make this output
harder to interprete.

I really think the problem was adding the AS_ constant in
ServerProtocol.h, at least for my later testing. I was having trouble
building so I downloaded the latest image, and putting my app_server
built against the updated ServerProtocol.h was not able to communicate
properly with the other apps because the message constants would be
off-by-one in some cases (that was my guess.) When I moved the AS_
constant down to the bottom my app_server worked with the downloaded
image.

Ryan

Other related posts: