Updated 00/04/05
Sun WorkShop(TM) dbx Readme
 
   

Introduction

Sun WorkShop 6 Final Release

This document contains last minute information about the final release of Sun WorkShop 6 dbx. It describes the software corrections addressed by this release and lists the known problems, limitations, and incompatibilities.

To view the text version of this document, type the following at a command prompt:

    example% more /opt/SUNWspro/READMEs/dbx

To access the HTML version of this document, point your Netscape (TM) Communicator 4 or compatible Netscape version browser to:

   file:/opt/SUNWspro/docs/index.html

Note - If your Sun WorkShop software is not installed in the /opt directory, ask your system administrator for the equivalent path on your system.

For more information about this product, see:

  • The online help and man pages available with this release.

  • Sun WorkShop 6 Release Notes -- Describes installation-related and late-breaking information about this release. Information in the release notes overrides information in all readme files.

  • About Sun WorkShop 6 Documentation -- Describes the documentation available with this Sun WorkShop release and how to access it.

  • What's New in Sun WorkShop 6 -- Describes the new features in this release.
These documents are accessible in HTML by pointing your browser to file:/opt/SUNWspro/docs/index.html. If your Sun WorkShop software is not installed in the /opt directory, ask your system administrator for the equivalent path on your system.

 


Contents 
  1. About Sun WorkShop 6 dbx
  2. New Features
  3. Using dbx and 64-bit Applications
  4. Software Corrections 
  5. Problems and Work Arounds 
  6. Limitations and Incompatibilities 
  7. Documentation Errata 

 


A. About Sun 6 dbx 

dbx is an interactive, source-level, command-line debugging tool. You can use it to run a program in a controlled manner and to inspect the state of a stopped program. dbx gives you complete control of the dynamic execution of a program, including the collection of performance data. dbx is included in the following Sun WorkShop products:
 

  •  Sun Visual WorkShop C++
  •  Sun Performance WorkShop Fortran
  •  Sun Professional WorkShop C

 


B. New Features 

Sun WorkShop 6 dbx includes the following new features:

  •  The readonly ksh variable firedhandlers has been added. This variable can be used in conjunction with the delete and handler commands as an alternative to clear. See Variables, delete Command, and handler Command in the Using dbx Commands section of the Sun WorkShop online help.
  •  The clear command now facilitates partial clearing of individual breakpoints used by inclass, inmethod, and infunction. See clear Command in the Using dbx Commands section of the Sun WorkShop online help.
  •  Output of traces can be redirected to files. See trace Command in the Using dbx Commands section of the Sun WorkShop online help.
  •  The new dbx environment variable stack_find_source controls whether dbx automatically moves up the call stack to a frame with debuggable source when the program stops. See stack_find_source Environment Variable in the Using dbx Commands section of the Sun WorkShop online help.
  •  The new dbx environment variable proc_exclusive_attach controls whether dbx can attach to a process that is under the control of another debugger or debugging tool. See proc-exclusive_attach Environment Variable in the Using dbx Commands section of the Sun WorkShop online help.
  •  The new dbx environment variable step_granularity controls whether step and next work on statements or whole lines. See step_granularity Environment Variable in the Using dbx Commands section of the Sun WorkShop online help.
  •  The new dbx environment variable mt_scalable helps debugging multithreaded applications with many LWPs (lightweight processes) by reducing resource usage. See mt_scalable Environment Variable in the Using dbx Commands section of the Sun WorkShop online help.
  •  The new dbx environment variable rtc_error_stack determines whether stack traces show frames corresponding to RTC internal mechanisms. See rtc_error_stack Environment Variable in the Using dbx Commands section of the Sun WorkShop online help.

  •  The new dbx environment variable rtc_inherit determines whether runtime checking is enabled on child processes that are executed from the debugged program. See rtc_inherit Environment Variable in the Using dbx Commands section of the Sun WorkShop online help.

  •  The new dbx environment variable rtc_use_traps enables a workaround for the eight megabyte code limitation on runtime checking. See rtc_use_traps Environment Variable in the Using dbx Commands section of the Sun WorkShop online help.
  •  Breakpoints in C++ inlined member functions work correctly. This includes proper evaluation of handler conditions (-if).
  •  LWP related commands are now always available, not just when debugging a multithreaded application. See lwp Command and lwps Command in the Using dbx Commands section of the Sun WorkShop online help.
  •  When Control-C doesn't seem to stop a hung process, the third consecutive Control-C will force the process to stop by other means. See Interrupting a Running Process in the Using dbx Commands section of the Sun WorkShop online help.
  •  Full line number information is now recorded when you compile with -g -0. You can now use the step command and the next command to step through optimized code, although the current line will jump forward and back due to code scheduling. The values of variables print from within dbx continue to be unreliable in optimized code.

 


C. Using dbx and 64-bit Applications

The Solaris(TM) 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 decides if you are on a 64-bit capable machine or operating environment, and automatically invokes 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 Corrections

Fix and Continue Now Works With Templates Built With Sun WorkShop 5.0 C++ Compiler (4149414)

In Sun WorkShop 6 dbx, changes have been made so that Fix and Continue works with templates built with the Sun Workshop 5.0 C++ compiler.

Runtime Checking Now Works on Large Executables (4170662)

Runtime checking now works on large executables because the rtc_patch_area shell script now has a -v9 option that generates v9/64-bit loadobjects and shared libraries.

Structs Inside Anonymous Structs or Unions Are Now Handled Correctly (4173623)

dbx now recognizes structs in unnamed namespaces, classes, structs, and unions.

Runtime Checking Now Handles 64-bit Application Forking a 32-bit Application (4193034)

Runtime checking no longer encounters an error when you enable it while debugging a 64-bit application that forks a 32-bit application.

Demangler Now Correctly Handles Fortran 90 Names With $ Prefix (4196533)

The demangler in dbx now understands that a Fortran 90 name with a $ prefix is not a mangled name.

dbx No Longer Gets Segmentation Fault on Multithreaded C++ Code During Runtime Checking (4201405)

dbx no longer gets a segmentation fault when you use runtime checking on a multithreaded program running on a V9 SPARC system or compiled as 32-bit on a V8 SPARC system.

Inspecting a Reference to string_list No Longer Causes Segmentation Fault (4235246)

Setting a breakpoint in a function and then trying to inspect string_list using the print command no longer causes a segmentation fault.

Breakpoint In Another Module Now OK (4244422)

You can now set a breakpoint within another module of your program.

dbx Can Now Debug Program With More Than 300 Threads (4247770)

You can now use dbx to debug a program with more than 300 threads by setting the dbx environment environment variable mt_scalable (see mt_scalable Environment Variable in the Using dbx Commands section of the Sun WorkShop online help.

dbx Can Now Read Fortran 90 Program With Common Block Inside Module (4249967)

dbx no longer dumps core when references to a module are put into common blocks and the common blocks are defined after any functions in the module.

dbx No Longer Dumps Core When Getting a Stack Trace on a Core File (4255884)

dbx no longer dumps core when you try to get a stack trace using the where command on a core file.

dbx No Longer Dumps Core When Debugging an Application dbx Core File (4257057)

dbx no longer dumps core with an internal error (no mapping at the fault address) when you are debugging a core file generated by dbx while debugging an application.

dbx No Longer Dumps Core When Stepping Into a C++ Function (4257366)

dbx no longer dumps core when stepping into a C++ function that was compiled with the Sun WorkShop 5.0 C++ compiler with patch number 107311-01, 107311-02, 107311-03, 107311-04, or 107311-05.

Sun WorkShop Debugging No Longer Crashes When Stepping Into a Program (4258625)

Sun WorkShop Debugging no longer crashes with a segmentation fault when you set a breakpoint in a loop, and then use step into to step through the loop when execution stops.

dbx No Longer Dumps Core During a Step in an stl Application (4268826)

dbx no longer dumps core with a segmentation fault when stepping in an stl application.

print Command No Longer Generates Forward Reference or Improper Indirection Error (4257190)

The print command no longer generates a forward reference or an improper indirection error when you try to print an iterator.

Stop At No Longer Slow When Given Explicit File Name (4075624)

Using a stop at to set a breakpoint at a location is no longer slow when you give an explicit source file name.

Runtime Checking No Longer Fails on Multithreaded Programs (4259941)

dbx no longer gets a segmentation fault and dumps core when you use runtime checking on a multithreaded program.

dbx No Longer Crashes When Stepping Into a Function In Large Fortran/C Application (4255308)

dbx crashed in a large Fortran/C application when stepping into a function where the length of a character array was defined by the parameter (the array) itself. dbx was getting bad symbol table information for the parameter. This has been corrected, and the symbol table information is now accurate.

rtc_patch_area Doesn't Always Work to Get Around Runtime Checking 8 Megabyte Limit (4269980)

The rtc_patch_area utility doesn't always work to get around runtime checking's eight megabyte limit. A workaround is to divide the a.out into a smaller a.out and shared libraries.

dbx No Longer Dumps Core on C++ Vector STL Code (4273516)

dbx no longer gets a segmentation fault and dumps core when stopping in C++ vector STL code.

dbx No Longer Loses Current Line Number on Return from Signal Handler (1251114)

The step and next commands now work correctly when you single step out of a signal handler and dbx does not lose the current line number.

dbx Now Evaluates Fortran Logical Expression Correctly (4093900)

When an integer variable is passed to a subroutine, where the passing argument can be stored in an array or not, and a logical test is performed on the integer variable, dbx now evaluates the resulting logical expression correctly.

Next After Exception No Longer Makes Program Run to Completion (4090088)

When you are using the next command to step within a loop and an exception is thrown, another next command no longer causes the program to run to completion.

Multiple Class Stabs and Multiple Forward Stabs No Longer Produced (4195143, duplicate of 4255600 and 4265070)

The C++ compiler no longer produces multiple class stabs and multiple forward stabs for the same class.

Operator Precedence No Longer Differs from C++ Standard (4206072)

The operator precedence used by expression evaluation in the Sun WorkShop Debugging window no longer differs from the C++ standard.

dbx Now Recognizes Fortran Function Compiled With -g and -O (4273265)

dbx now recognizes a function in a Fortran 90 program that is compiled with the -g and -O options.

dbx Hangs on clock_gettime Function (4228403)

dbx may hang when you use the next command to step over the clock_gettime function when you are running under the Solaris 7 Operating Environment (Intel Platform Edition).

dbx No Longer Panics and Dumps Core in FORTRAN 77 Program Compiled with -O Option (4284088)

dbx no longer panics and dumps core when you stop in a subroutine in a FORTRAN 77 application compiled with the -O option on a system running V9. It displays the error message:

dbx: panic: "RecAbstractIn::RecAbstractIn"(): Assertion (s) failed. - "src/ev_in.cc":43

64-bit C++ Application No Longer Terminates With Segmentation Fault On Exit When Access Checking is On (4292176)

When you run access checking (check -access or check -all) on a C++ application compiled as 64-bit, the application no longer terminates with a segmentation fault on exit. This error did not occur if the application was compiled as 32-bit.

Quotes No Longer Disappear From Command Line Arguments (4201181)

Quotes no longer disappear from arguments entered in the Arguments text box of the Sun WorkShop Edit Run Parameters dialog box.

 


E. Problems and Workarounds

This section discusses the following software bugs that could not be fixed in time for this release. For updates, check Hot News for Sun WorkShop 6 (http://www.sun.com/workshop/users/ws.html).

Can't Print Template Parameter of Type With No Name (4058205)

dbx can't print the template parameter of a type with no name.

Whocatches Can't Tell Exception Will Be Caught (4140432)

The whocatches command cannot tell that an exception will be caught just before the exception is thrown.

Some dbx Commands Fail When Attached to a Multithreaded Process (4275900)

Some dbx commands, such as source and help, may fail when you attach dbx to a multithreaded process.

Workaround: Instead of attaching to the running process when you invoke dbx, start dbx, run the help and source commands, and then attach to the process with the attach command or the debug command.

SLINE Symbol Table Entry Has Line #0 (4290986)

The N_SLINE following the N_FUN symbol table entry has line number 0 in it. Incorrect symbol table information is provided to dbx, causing incorrect information in stack traces.

Monitoring Local Variable Causes Termination With SIGKILL Signal (4292103)

On SPARC platforms running the Solaris 2.6 or Solaris 7 Operating Environment, monitoring a local variable by setting an On Modify breakpoint (stop modify) may cause dbx to terminate with a SIGKILL signal or to hang. This problem does not occur on SPARC platforms running the Solaris 8 Operating Environment or on Intel platforms.

Segmentation Fault May Occur on Dynamic Cast (4325241)

dbx may terminate with a segmentation fault when you type in a call to dynamic_cast where the source and destination types are the same. For example, if pfoo is a pointer to foo, and you type:

(dbx) print dynamic_cast(pfoo)

 


F. Limitations and Incompatibilities 

Sun WorkShop 6 dbx has the following limitations:

  • It is not possible to attach to a running process from your .dbxrc file. A .dbxrc file should not contain commands that execute your code. However, you can put such commands in a file, and then use the dbx source command to execute the commands in that file.

  •  dbx running on a release of the Solaris Operating Environment may not be able to debug core files generated on an earlier Solaris release. The following error message is displayed:
    dbx: corefile is from an older than  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 systems, 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.

  •  On V9/V9 systems, use of the call command 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.

    libC.so.5 is available as a SUNWlibC patch, one for each version of Solaris and for each architecture, on your Forte Developer 6 CD or from http://sunsolve.sun.com. For the patch number for your version of Solaris and your system architecture, see the Sun WorkShop 6 Release Notes, accessible from file:/opt/SUNWspro/docs/index.html. If your Sun WorkShop software is not installed in the /opt directory, ask your system administrator for the equivalent path on your system.

  •  FORTRAN users should compile with the -stackvar option to take full advantage of runtime checking.

    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.

  •  Follow fork may be unreliable for multithreaded applications.

  •  Use of the call command or printing function calls may cause deadlock situations with multithreaded applications.

The following incompatibilities exist between Sun WorkShop 6 dbx and dbx 5.0:

  •  The old syntax for the trace command is no longer accepted.
  •  The dbx environment variable mt_watchpoints has been eliminated. Watchpoints are always allowed.
  •  With the Sun WorkShop 6 C++ compiler and Sun WorkShop 6 dbx on the Intel platform, a debugging problem occurs with template applications. If the template application is compiled with the -xs option or without the -c option, there may be a warning message while loading, and consequently, dbx cannot load source information.
    dbx: warning: delay_xs cancelled for module temp.sqe-vwsi1.22093.JWD8uHIwBX8qbS_
    erdGX.o, reading its stabs now
    
    Workaround: If the application is compiled with the -xs option, then recompile it without the -xs option. If the application is compiled without the -c option, then recompile it with the -c option.

 


G. Documentation Errata 

There is no new information at this time. 

 


Copyright 2000 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303, U.S.A. All rights reserved. 

Sun, Sun Microsystems, the Sun logo, docs.sun.com, and Solaris are trademarks, registered trademarks, or service marks of Sun Microsystems, inc. in the U.S. and other countries.