[Return to Library] [Contents] [Previous Chapter] [Next Section] [Next Chapter] [Index] [Help]


7    Development Environment


[Return to Library] [Contents] [Previous Chapter] [Next Section] [Next Chapter] [Index] [Help]


7.1    Overview

The development environment in Digital UNIX Version 4.0 is fully ANSI C/ISO C compliant; offers the programming features of both BSD and System V UNIX and is compliant with most current standards, including POSIX, XPG4, and XPG4-UNIX; features debuggers that support C, Assembler, FORTRAN (F77 and F90), C++, Ada, and connecting to /proc; supports shared libraries, threads, versioning; and has a fully optimized C compiler that produces extremely efficient code to exploit fully the 64-bit address space of the Alpha architecture.

In addition, Digital UNIX Version 4.0 supports internationalization, standard UNIX development tools such as awk, lint, make, and prof, and provides various run-time libraries such as C++ and FORTRAN.

The following sections highlight the major functionality in the development environment. For more detailed information on the development environment, see the Programmer's Guide, the guide Programming Support Tools, Assembly Language Programmer's Guide, and Writing Software for the International Market.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.2    Compiler

The Digital UNIX Version 4.0 C compiler was designed to support 64-bit data types and is NIST-validated for compliance with the ANSI Standard for C. The C front end supports both 64-bit addressing and the interfaces to the System V shared libraries.

The GEM-based DEC C compiler, accessed optionally in previous releases through the -migrate switch, is now the default compiler; access to the older MIPS-based compiler is still available through the -oldc switch on the cc and c89 command lines.

DEC C uses Digital's backend compiler technology (GEM), which has been specifically developed and optimized for use with Alpha systems. Both compilers have full binary compatibility with each other.

In addition, the compiler:

For more information on the Digital UNIX C compiler, see the cc(1) reference page.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.3    Debuggers

Digital UNIX Version 4.0 supports the following two source code debuggers:


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.3.1    The dbx Debugger

The dbx debugger supports debugging programs written in C, FORTRAN, Assembler, Cobol, and Pascal. It supports debugging active kernels, either locally or remotely; analyzing kernel crash dumps; debugging program core dumps; shared libraries; and, through /proc, attachment to running processes and programs using multiple threads. It can also patch the on-disk copy of either user programs or the kernel. The dbx debugger also supports multiprocess debugging and allows debugging through fork and exec calls.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.3.2    The ladebug Debugger

The ladebug debugger is a source level, object-oriented symbolic debugger that has both a graphical user interface (GUI) and a command-line interface similar to the dbx command-line interface, Note that the GUI is also integrated with FUSE and can be accessed from the Common Desktop Environment (CDE).

The ladebug debugger supports the following functionality:


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.4    Profiling Tools

Digital UNIX Version 4.0 supports the following profiling toolkit:

For more information on profiling tools, see the Programmer's Guide and the appropriate reference pages.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.5    Shared Libraries

Digital UNIX Version 4.0 provides a full complement of dynamic shared libraries, compatible with System V semantics for shared library loading and symbol resolution as well as the System V API for dynamic loading (dlopen, dlclose, dlsym, and dlerror). Because they allow programs to include only information about how to load and access routines rather than the routines themselves, shared libraries increase system performance, reduce disk and memory requirements, and simplify system management.

Digital UNIX Version 4.0 supports the shared libraries described in the following two tables.

Table 7-1: Digital UNIX Version 4.0 Shared Libraries

Library /usr/shlib Description
libDXm.so Digital Motif Extensions library
libDXterm.so DECterm widget library, used by dxterm
libDtHelp.so CDE online help routines
libDtMail.so Shared library support for the dtmail CDE mail utility
libDtSvc.so CDE service routines for desktop management
libDtTerm.so Shared library support for the CDE ddterm terminal emulator utility
libDtWidget.so shared library of CDE widgets to supplement Motif widget
libICE.so Inter-Client Exchange library, which enables the building of protocols
libMrm.so Motif Resource Manager library
libSM.so The X Session Management Protocol (XSMP) provides a uniform mechanism for users to save and restore their sessions using the services of a network- based session manager. It is built on ICE and is the C interface to the protocol.
libUil.so The callable Motif UIL (User Interface Language) compiler used by applications that want to compile UIL at run time.
libX11.so Xlib library
libXETrap.so X Extension Library
libXaw.so X Athena Widgets run-time library
libXext.so X Client-side Extension library
libXi.so X Input Extension client-side library
libXIE.so X Imaging Extension client-side run-time library (V5)
libXie.so X Imaging Extension client-side run-time library (V3)
libXm.so Motif Widgets library
libXmu.so X Miscellaneous utilities run-time library
libXt.so X Intrinsics library
libXtst.so A library of routines for X clients to make use of the XTEST Extension.
libXv.so X video Extension client-side run-time library
libaio.so POSIX realtime asynchronous I/O functions
libaio_raw.so POSIX realtime asynchronous I/O functions (raw disk and tape only)
libaud.so C2 security auditing library
libbkr.so Motif Help System library
libc.so C library
libc_r.so Threadsafe libc (link to libc.so)
libcda.so CDA run-time library
libcdrom.so Rock Ridge Extensions to CDFS library
libchf.so CDA/Imaging signal handling routines
libcmalib.so CMA threads library
libcsa.so Shared library portion of the CDE dtcm calendar manager utility
libcurses.so Curses screen control library
libcxx.so NEW
libdb.so NEW
libdnet_stub.so DECnet library
libdps.so Adobe Display PostScript client-side run-time libraries
libdpstk.so Adobe Display PostScript toolkit
libdvr.so CDA run-time viewer library
libdvs.so CDA run-time layout library
libesnmp.so NEW
libexc.so Library that provides support for exception handling.
libiconv.so Internationalization codeset conversion routines
libids.so Image display services library
libids_nox.so Image display services not dependent on X
libimg.so Image processing routines
libips.so Image processing routines
libm.so Digital Portable Mathmatics Library (DPML)
libmach.so Mach library
libmxr.so Library used by mxr, the ULTRIX binary interpreter for OSF/1
libndb.so NEW
libots.so Compiler run-time support
libpacl.so NEW
libproplist.so VFS Extended File Attributes library
libpset.so NEW
libpsres.so Adobe Display PostScript resource utilities
libpthread.so Application Programming Interface for Digital UNIX's threads
libpthreads.so DECthreads library
libsecurity.so C2 security library
libsm_x.so Systems Management Graphical support library; no user-level interfaces available.
libtcl.so Base Tool Command Language (TCL) support library
libtclx.so Extended TCL support library
libtk.so Graphical TCL (TK) Extensions library
libtkx.so Graphical Extended TCL support library
libtli.so XTI library
libtt.so SunSoft Tooltalk routines
libvxvm.so LSM utility library
libmsfs.so AdvFS system call interface library
libfilsys.so File system utility library
libxnet.so NEW
libxti.so XTI library

Table 7-2: Digital UNIX Version 4.0 Shared /usr/shlibi/X11 Libraries

Library /usr/shlib/X11 Description
libXau.so X Authorization library
libXdmDecGreet.so Motif loadable greeter library
libXdmGreet.so Athena-style loadable greeter library
libXdmcp.so X Display Manager control program library
lib_adobe_dps.so Adobe Display PostScript Extension library
lib_dec_cirrus.so Device support for the Cirrus VGA graphics card
lib_dec_ffb.so Supports the sfb+ graphics accelerator for 2D and 3D drawing operations
lib_dec_sfb.so Device support for the smart frame buffer (HX)
lib_dec_smt.so Shared memory transport library
lib_dec_tx.so Device support for the TX graphic adapter
lib_dec_ws.so Low-layer operating system interface for the X server
lib_dec_xi_pcm.so Dynamically-loadable X Input Extension library that supports the dial and box
lib_dec_xi_serial_mouse.so Support library for the serial mouse
lib_dec_xv_tx.so X Video Extension support for the TX graphic option
libcfb.so Color frame buffer library
libcfb16.so 16-bit visual support for the color frame buffer
libcfb32.so 32-bit visual support for the color frame buffer
libdbe.so DOUBLE-BUFFER Extension library
libdix.so Device-independent portion of the X Server
libdixie.so With libmixie.so, supports the X Image Extensions (XIE) Extension library
libextMITMisc.so MIT-SUNDRY-NONSTANDARD Extension library
libextMultibuf.so Multi-Buffering Extension library
libextScrnSvr.so MIT-SCREEN-SAVER Extension library
libextSync.so SYNC Extension library
libextXCMisc.so XC-MISC Extension library
libextbigreq.so BIG-REQUESTS Extension library
libextkme.so Keyboard-Management-Extension
libextshape.so SHAPE Extension library
libextshm.so MIT-SHM Extension library
libextxtest.so XTEST Extension library
libextxtrap.so DEC-XTRAP Extension library
libfont.so Font access library
libfr_Speedo.so Loadable font renderer library
libfr_Type1.so Loadable font renderer library
libfr_fs.so Loadable X Server font renderer for using a font server
libmfb.so Monochrome frame buffer support
libmi.so Machine-independent portion of the X Server
libmixie.so With libdixie.so, supports the X Image Extensions (XIE)
libos.so Operating-system dependent portion of the X Server
libxinput.so X Input Extension server-side library
libxkb.so XKEYBOARD Extension library

Note

Digital UNIX Version 4.0 also provides static versions of these libraries.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.5.1    Quickstart

Digital UNIX Version 4.0 supports quickstart which allows shared libraries with unique addresses to start faster than if their addresses were in conflict. Essentially, each shared library must have a unique address placed in the /usr/shlib/so_locations file which allows applications that link against these shared libraries to start execution faster since the shared objects do not have to be relocated at run time. The ld utility can read and write an so_locations file when it creates a shared library.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.5.2    Dynamic Loader

Digital UNIX Version 4.0 uses a System V Release 4.0 compatible loader to load shared libraries dynamically. This loader provides the following enhanced features:


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.5.3    Versioning

Digital UNIX Version 4.0 supports full and partial duplication of shared libraries. The loader looks for backward compatible versions of shared libraries using a path constructed by appending the version string as a subdirectory of the normal search path. As a result, any changes to kernel interfaces or to global data definitions that would ordinarily break binary compatibility will not affect your applications, since you can maintain multiple versions of any shared library and link your application against the appropriate version of that shared library.

In Motif Version 1.2, for example, the OSF changed several of the interfaces, thereby breaking binary compatibility with applications built against Motif 1.1.3 libraries. To preserve binary compatibility, Digital UNIX Version 4.0 supports both Motif 1.1.3 and Motif 1.2.3 shared libraries in Digital UNIX Version 4.0 with our versioning functionality, so that applications that need to can access the Motif 1.1.3 shared libraries. For more information on versioning, see the Programmer's Guide.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.6    Run-Time Libraries

Digital UNIX Version 4.0 supports the following run-time libraries


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.7    Development Commands

Digital UNIX Version 4.0 supports the full array of development tools, including ar, as, btou, cb, cc, cflow, cpp, ctags, cxref, dbx, dis error, file, indent, ld, lex, lint, loader, m4, make, mig, mkstr, nm, odump, pixie, ppu, prof, ranlib, size, stdump, strings, strip, tsort, uopt, uld, utob, xstr, and yacc, as well as the source code control systems rcs and sccs.

Note that many of the development commands are specified by the System V, POSIX, XPG4 and XPG4-UNIX standards to which Digital UNIX is fully complaint. Also note that Digital UNIX supports both the OSF make command and the ULTRIX version of make, since the ULTRIX make command is POSIX 1003.2 compliant and more robust.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.8    DECthreads

DECthreads is a library of routines built on the basic Mach threads capabilities in the OSF code that support the development of multithreaded applications on Digital UNIX. DECthreads is an implementation the POSIX 1003.1c-1995 standard API and also provides a proprietary API to aid in porting applications from other Digital platforms such as OpenVMS. Note that DECthreads also provides an implementation of draft 4 of the POSIX 1003.1c (formerly known as 1003.4a) specification which will be retired in the next release. This implementation is being provided only to allow applications extra time to convert their draft standard implementation to the finalized POSIX standard interface.

DECthreads is compatible with DCE requirements for threads and is the threads library used by Digital's DCE product. In addition, DECthreads is integrated with the Digital UNIX kernel, providing SMP capabilities for multithreaded applications and realtime scheduling policies and priorities for multithreaded realtime applications.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.9    Thread Independent Services

Digital UNIX supports Thread Independent Services (TIS) routines, which are provided to enable application writers to write thread-safe code for non-threaded libraries and applications. In the presence of threads, these routines provide the indicated thread-safe functionality. In the absence of threads, these routines impose the minimum possible overhead on their caller. Note that the TIS routines are used by the C runtime library to provide support for both single and multithreaded applications.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


7.10    Memory-Mapped File Support (mmap)

Digital UNIX Version 4.0 supports the Berkeley mmap function and therefore allows an application to access data files with memory operations rather than file I/O operations.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Chapter] [Index] [Help]


7.11    Realtime

Digital UNIX Version 4.0 supports a realtime user and programming environment, developed by Digital and shipped as an optional realtime subset. The Digital UNIX Version 4.0 realtime programming environment conforms to the POSIX 1003.1b-1993 standard for realtime which allows you to develop and run portable realtime applications in a POSIX environment. The realtime interfaces are collected in the static and shared libraries /usr/ccs/lib/librt.a and /usr/shlib/librt.so, respectively.

If you enable kernel preemption, a higher-priority process can preempt a lower-priority process regardless of whether it is running in kernel mode or user mode. With this fully preemptive kernel, the Process Preemption Latency (the amount of time it takes to preempt a lower-priority process) is minimized.

In addition to a preemptive kernel, the Digital UNIX Version 4.0 realtime programming environment supports the following POSIX 1003.1b features:

For more information on the realtime programming environment, see the Guide to Realtime Programming. For information on configuring the realtime kernel, see the System Administration guide.