14 December 1998 Dbx 5.0 WorkShop ============================================================================= Introduction: Dbx 5.0 is part of Sun WorkShop. Dbx 5.0 runs under Solaris (TM) 2.5.1 and 2.6, and Solaris 7. Table of Contents : A. New Features B. Changes to Features C. Using dbx and 64-bit Applications D. Software Incompatibilities E. Current Software Bugs F. Fixed Software Bugs G. Documentation Errata H. Dbx and MT ____________________________________________________________________________ A. New Features The following new features have been added: * dbx now debugs 64-bit binaries * New shell variables $machtype and $datamodel * Better, faster, more functional data watchpoints ___________________________________________________________________________ B. Changes to Features * When compiling with the -xs option, dbx now reads the a.out symbol table information as needed. * To print 64-bit numbers in hex, include the "l" prefix for longs. At the prompt, type: print -flx or examine foo/lx * The name of a function template instance is changed in 5.0. If function template "template < class T > T halve(T t)" has been instantiated with int, char, long, double, then the instances should be referred to as halve, halve, halve and halve. In dbx 4.2 halve has the name halve(int). Here two examples of the changes you'll see in dbx 5.0: 1. In dbx 4.2: (dbx) whatis halve More than one identifier 'halve'. Select one of the following names: 0) Cancel 1) function template instance: `halve(long) 2) function template instance: `halve(int) 3) function template instance: `halve(double) 4) function template instance: `halve(char) 5) `a.out`halve // Template definition > > 1 long halve(long t); In dbx 5.0: (dbx) whatis halve template T halve(T t); 2. In dbx 4.2: (dbx) stop in halve(int) (2) stop in halve(int) In dbx 5.0: (dbx) stop in halve (2) stop in halve(__type_0) ___________________________________________________________________________ C. Using dbx and 64-bit Applications The Solaris operating environment does not allow a 32-bit application to debug a 64-bit application; therefore, two dbx binaries are shipped for SPARC platforms: one 32-bit dbx and one 64-bit dbx. You do not need to modify your PATH. 32-bit dbx will decide if you are on a 64-bit capable machine or operating environment, and automatically invoke the 64-bit version. The 64-bit version of dbx can debug both 64-bit and 32-bit applications. The 64-bit version of dbx debugging a 64-bit application is referred to in this README as v9/v9. The 64-bit version of dbx debugging a 32-bit application is referred to in this README as v9/v8. ___________________________________________________________________________ D. Software Incompatibilities * The C++ RTTI feature is only partially supported by dbx in this release. - You cannot directly view the typeid name of a variable in ABI1 mode. dbx issues the following error message: (dbx-22043) p typeid(y).name dbx: can't find field "name" in "typeid(y)" This is not a problem in ABI2 mode. Workaround: You can view the name by looking at the "full" typeid structure. For example: (dbx-22043) p typeid(y) typeid(y) = { ty_name = 0x2190c "X" reserved = 0 } - typeid comparisons are dissallowed in ABI2 mode. If you ask dbx to compare typeids, dbx issues an error message. For example: (dbx) print typeid(x)==typeid(y) dbx: cannot compare typeids - You cannot print the name field of the typeid; that is, you cannot do a "print typeid(x).name()". dbx will issue the following error message: dbx: type_info::name is missing in this scope (never defined or unused inline function) * Template debugging support is incomplete in this release. * dbx running on Solaris 2.6 cannot debug core files generated on Solaris 2.5.1. The following error message is displayed: dbx: corefile is from an older than 2.6 Solaris dbx: warning: core file header read failed Workaround: Debug the core file on the machine on which it was created. * If you are having problems using dbx to process executables compiled with -xs, turn off delay processing using the following command: dbxenv delay_xs off * dbx incorrectly demangles pointer to member functions for compat=4. This is not a problem for compat=5 Workaround: Recompile your program with: CC -compat=4 -Qoption ccfe -abiopt=pmfun1 This flag introduces an ABI change and should not be used in production builds. * On v9/v9 only: - Stack traces that pass through code compiled with both the -g and -O options provide inaccurate results if the arguments are NOT integral types. Printing of float parameters in such functions may display the following error message: RegSet::getd('o1'): cannot -- will return 0.0 Workaround: Use -g only. - Stack traces will not be rendered past a signal handler in a multithreaded application. Workaround: None. - When following an exec(2) command, dbx does not switch models if the new executable is of a different data model than the current process. - Use of "call" or printing function calls is not working with nested small structure as an argument or as a return value. * Using older copies of libC.so.5 or libC.so.4 may cause problems for dbx in the area of C++ exceptions. Warning messages about bad stabs and unhandled exceptions may result. Workaround: Link libC statically, remove libC.so.5 and libC.so.4 from the system prior to linking, or install the latest libC.so.5 on all systems. Patch numbers: SPARC SPARC-V9 Intel Solaris 2.5.1 106529-03 na 106530-03 Solaris 2.6 105591-05 na 104678-03 Solaris 7 106327-04 106300-05 106328-04 * Run Time Checking (RTC) - if "follow_fork_mode" is set to "parent", checking is turned off for child processes. If "follow_fork_mode" is set to "child", checking is turned off for the parent process. - FORTRAN users should compile with the -stackvar option to take full advantage of RTC. Note: some programs may not work properly with -stackvar; In such cases, try the -C compiler option, which will turn on array subscript checking without RTC. - On Solaris 2.5.1, RTC + watchpoints (stop modify) should not be used together. There is a multiplicative slowdown effect. - Use of RTC with the Sampling Collector is not allowed. The code inserted by RTC would seriously perturb any performance measurements. - If the shell script rtc_patch_area is generating only 32-bit binaries, then in order to generate v9 64-bit patch binaries, you must edit the rtc_patch_area script and change the following two lines o_opts="-xMerge" so_opts="-Kpic" to o_opts="-xMerge -xarch=v9" so_opts="-Kpic -xarch=v9" You can either edit the installed copy of rtc_patch_area, or make a copy of rtc_patch_area, make the necessary modifications, and install the copy as the first rtc_patch_area in your PATH. Once you have made these changes the shell script rtc_patch_area will generate only v9 64-bit binaries! * MT applications - Follow Fork may be unreliable. - On Solaris 2.5.1, watchpoints or "stop modify" requires the dbxenv variable "mt_watchpoints" set to 'on'. Use of watchpoints with MT may cause the program to hang. - Use of "call" or printing function calls may cause deadlock situations. * C++ Namespace support - dbx is not aware of data in a namespace when it is declared with the "extern" specifier. Workaround: Load the module in which the data item is not declared "extern". - dbx does not support templates declared in namespaces. The template will be known to dbx, just not in the namespace. * Demangler library The demangler library reserves the '$' prefix for mangled names. The f90 compiler generates names with '$' prefix. When a f90 program has no program name, and has internal subroutines within the main program, a conflict occurs. dbx may fail to permit debugging of Fortran 90 programs with the following error message: "No variant information available" This is a bug in handling symbols of the form $main.XXX. (This problem may occur with other languages if the '$' character can be allowed as the prefix of names in that language.) Workaround for f90 programs: Add a PROGRAM statement to the main program. For example: call foo contains subroutine foo end subroutine foo end The above code will cause dbx to fail: neruda 147: dbx a.out Reading a.out dbx: internal error: no variant information available dbx: warning: object initialization interrupted - no program loaded (dbx-0) quit A simple change to the following code will work: program anyname call foo contains subroutine foo end subroutine foo end ______________________________________________________________________________ E. Current Software Bugs BugId Synopsis ------- ----------------------------------------------------- 4012764 dbx no longer supports the -editor option 4058205 dbx can't print template paramter of type with no name 4126270 dbx/collector does not work with Java VM MT-program in Solaris 2.6 4140432 whocatches can't tell an exception will be caught right before 'throw' executed 4149414 fix & continue does not work with templates built with C++ Compiler 5.0 4170662 dbx runtime checking fails on large executables 4195143 abi1: multiple class stabs plus forward decl stabs for the same ones 4196533 demangler lib reserves '$' prefix for mangled names ____________________________________________________________________________ F. Fixed Software Bugs Bug/Rfe Bug ID Category Subcategory Synopsis ____________________________________________________________________________ Bug 4028662 dbx commands help -k causes an internal error in a non-C locale Bug 4051802 dbx stabs dumpstabs can now handle ELF64 objects Bug 4075662 dbx intel Intel: long double conversions in expressions broken Bug 4099667 compiler fw_egret name of the internal subroutine in stab is not same as in symbol table Bug 4099742 dbx fortran N_ALIAS stab has been corrected Bug 4023087 dbx expresions Function pointers which are C struct members are now printed with correct parentheses. Bug 4063351 dbx stabs The symbols used to represent this template class have been updated. Bug 4008940 dbx other After following a fork in a 64-bit program, dbx does not stop at breakpoints in the child process Bug 4109699 dbx c+ Inline methods display wrong source file Bug 4127171 dbx commands adb mode doesn't work - cannot load libdbxadb.so Bug 4125672 dbx other dbx dies when loading a program in quick mode Bug 4125825 compiler x86_codegen RTC memuse checking on Intel does not work Bug 4126789 dbx proc_control Memuse checking doesn't work Bug 4127967 dbx fortran cannot dlopen dbx 64-bit Fortran intrinsics library Bug 4130155 dbx sparcv9 under v9 load objects -v neglects high order address bits Bug 4133018 dbx mt segv from _mutex_unlock_asm running mt program in dbx on 5.7 SPARC Bug 4132213 dbx other dbx dies when evaluating with output_dynamic_type turned on Bug 4125640 dbx other crashes after run command Bug 4130898 dbx intel attempt to read stack failed - bad frame pointer Bug 4153669 dbx c++ unexpected output for "whatis class xxx" command Bug 4140083 dbx other miscellaneous incompatibilities resulting from "fix" Bug 4146862 compiler fw_egret F90 module name is entered into symbol table as local function Bug 4160390 dbx stabs namespace members from using- declarations are not recognized ____________________________________________________________________________ G. Documentation Errata No known errors at this time. ____________________________________________________________________________ H. Dbx and MT * Use of dbx on MT no longer requires the "sunpro.mpmt" license feature line for SPARC and the "proworks.mpmt" license feature line for Solaris (Intel Platform Edition).