Chapter 16 Creating CORBA C++ Components
Debugging C++ components
To debug a component you must run the debug version of the
Jaguar server:
- On UNIX, run the script $JAGUAR/devbin/srvstart_dev.
- On Windows NT, select Jaguar Server (dev) from the
Start menu to launch the debug version of the server. Alternatively,
run the script %JAGUAR%\bin\serverstart_dev.bat.
To debug a component from Microsoft Visual C++,
you must set the component's com.sybase.jaguar.component.cpp.debug
property
under the All Properties tab to true. For more information, see "All Properties tab".
Follow these steps to attach to the Jaguar server and step
into your component code:
- Attach
the Jaguar server process with your debugger.
Alternatively, start the debugger with the Jaguar executable.
For example, on UNIX, enter: dbx $JAGUAR/devbin/jagsrv ServerName
On Windows NT, enter:msdev %JAGUAR%\devbin\jagsrv ServerName
ServerName is the name of the Jaguar
server. If you are using the preconfigured server rather than one
that you created yourself, use "Jaguar".
- Set
a breakpoint on the function jag_dbg_stop.
This function executes every time the server loads a component DLL.
The jag_dbg_stop prototype is:
void jag_dbg_stop(char *compName)
The compName parameter specifies the
name of the library or shared library that was just started. Several
components may be started before yours. In the debugger, display
the compName value when the jag_dbg_stop breakpoint
is tripped, and monitor the value to determine when your component
is started. Breakpoints on jag_dbg_stop are triggered
before the Jaguar server calls the component's create method.
Make sure the jag_dbg_stop breakpoint
is set before your client application instantiates any stub objects.
- When your component's DLL is started, you
can specify the component's C++ function
names as breakpoints and step into the method's code when it
is invoked.
Copyright © 2000 Sybase, Inc. All rights reserved.
|
|