[haiku-development] Debugging in libroot and friends during startup

  • From: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Fri, 9 Dec 2016 19:32:19 +1300

Hi,

How does one get debug output during startup from things like libroot?
Particularly with launch_daemon.

I tried using dprintf(), but I'm getting undefined references, so
that's probably not usable? And using syslog(), it appears to hang.
And I don't get output when using printf().

Files I want to be able to get printf-style debugging output from are:
  src/kits/app/Roster.cpp: BRoster::_LaunchApp
  src/system/libroot/os/image.cpp: load_image

With UEFI, I'm finding that the page faults are happening in
load_image. This seems to be related to the __gRuntimeLoader pointer,
but I'd like to be able to do things like print out the address of
__gRuntimeLoader, etc.

I can't use the userland debugger, as it's still too early during startup.

Cheers,
Jessica

Other related posts: