HP DCE/9000 Application Development Tools for HP-UX 11i Release Note

18
HP DCE/9000 Version 1.8 Application Development Tools for HP-UX 11i Release Note
Developing DCE Applications with HP DCE/9000
Applications.
To debug an HP DCE threads application with DDE, use the -dce_thread option. By
default, DDE assumes that the application is single- or kernel-threaded.
The debug and dde commands have been extended to take the -dce_thread option. For
example:debug -dce_thread averagedde -dce_thread average
See Section 3.2.1 (DDE) of the HP-UX Programming Tools Release Notes (5965-4409) and
the dde man page for more information about the -dce_thread option.
HP DCE uses the HP-UXSIGCHLD and SIGVTALRM signals internally. When debugging
HP DCE servers or clients, you must ensure that these signals, when received, are passed
along to the target process. If you are using DDE or xdb, you can modify your debugger
start-up files as follows:
~/.dderc: alias `after_debug [ del int signal SIGCHLD;del int signal SIGVTALRM]
~/.xdbrc: z 18 rs # do not stop or report SIGCHLD z 20 rs # do not stop or report
SIGVTALRM
See
Programming with Threads on HP-UX
and the discussion of -signal() in this
chapter for more information on the use of signals with HP DCE applications.
Be sure the application has an exception handler installed that can field any RPC
exceptions.
Run the server side of your application under the debugger so that exceptions raised in
server code will trap into the debugger rather than being reflected back to the client
process via RPC. This makes it easier to identify bugs in the server that might otherwise
appear to be client bugs.
See the README file and server_debug.ksh script in
/opt/dce/share/hpexamples/string_conv for information on debugging "dced-started"
servers via xdb or dde.
Using HP DCE with C++ Applications
If you want to use C++ with standard DCE to create DCE applications, there are some
practices you must avoid. Most of these relate to lack of thread-safeness of C++ operations.
The following list describes the practices you should avoid. These guidelines apply to HP C++
compiler version A.3.70 and later.
By taking these precautions, you should be able to productively use C++ to write DCE
applications.
When using unsafe constructs, be sure to use the constructs in only one thread at a time.