Tuesday, February 12, 2008

Testing and Debugging the Service Manager on MacOSX

For Classic - SuperServer is easy.

export PATH

In one terminal session:
gsec -user xxx -password -xxx -database localhost:/Library/Frameworks/Firebird.framework/Resources/English.lproj/var/security2.fdb
This will start a remote connection to gsec via the service manager...
ps -eaf | grep fb
and look for the running fb_inet_server

In the other
cd /Library/Frameworks/Firebird.framework/Resources/bin
gdb ./fb_inet_server --pid=
Set the pid to the running fb_inet_server
gdb> break svc.cpp:2461
set an appropriate break point - in this case when vfork starts
gdb> continue

In the original session
gsec> display

In the gdb session the debugger should break when vfork is called in svc.cpp

Now do what you need to - to walk through the code.

If all is working properly, try doing a backup using the service manager...
gbak -v -b -user xxxx -password xxxx /Users/pbeach/databases/test.fdb /Users/pbeach/databases/test.fbk -se localhost:service_mgr

No comments: