Appendix D Creating C Components
To debug a component you must run the debug version of the Jaguar server. Then you can attach your debugger to the server executable and set breakpoints to step into your component code.
On UNIX, run the script $JAGUAR/devbin/srvstart_dev.
On Windows NT, use the Jaguar Server (dev) icon to launch the debuggable server. Alternatively, run the script %JAGUAR%/bin/serverstart_dev.bat.
In order to debug components, you must be running the debug version of the server. Follow the steps below to attach to the Jaguar server and step into your component code:
dbx $JAGUAR/devbin/jagsrv ServerName
msdev %JAGUAR%\devbin\jagsrv ServerName
void jag_dbg_stop(char *compName)
Make sure the jag_dbg_stop breakpoint is set before your client application instantiates any stub objects.
In many operating systems, all functions in a single executable must have unique names. For this reason, the generated skeleton code contains macros that rename each method with a longer name at compile time. The final name is guaranteed to be unique among installed components. You must use these longer names to set breakpoints when debugging.
To view the name mappings, look at the generated skeleton header file for your component. There will be a macro that renames each method. The final method is renamed according to this syntax:
package_component_method
where package is the package name, component is the component name and method is the method name.
For example, the component named "sendrows" in a package named "jagdb," is renamed as follows:
#define send_rows jagdb_sendrows_send_rows
Copyright © 2000 Sybase, Inc. All rights reserved. |