Chapter 16 Creating CORBA C++ Components


Debugging C++ components

To debug a component you must run the debug version of the Jaguar server:

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:

  1. 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".
  2. 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.

    Note   Make sure the jag_dbg_stop breakpoint is set before your client application instantiates any stub objects.

  3. 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.