Updated 01/06/04

Sun WorkShop[tm] 6 update 2 dbx Readme


Contents

  1. Introduction
  2. About Sun WorkShop 6 update 2 dbx
  3. New Features
  4. Software Corrections
  5. Problems and Workarounds
  6. Limitations and Incompatibilities
  7. Documentation Errata

 


A. Introduction

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

For installation-related and late-breaking information about this release, see the Sun WorkShop 6 update 2 Release Notes. Information in the release notes overrides information in all readme files.

To access the release notes and the full Forte[tm] Developer/Sun WorkShop[tm] documentation set, point your Netscape[tm] Communicator 4.0 or compatible browser to the documentation index (file:/opt/SUNWspro/docs/index.html).

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

   example% more /opt/SUNWspro/READMEs/dbx

To access the HTML version of this readme, point your Netscape Communicator 4.0 or compatible 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.


B. About Sun WorkShop 6 update 2 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. dbxdbx runs in the Solaris 2.6, Solaris 7, and Solaris 8 operating environments.


C. New Features

This section describes the new and changed features for the Sun WorkShop 6 update 2 dbx. In addition, it lists the new features that were introduced in Sun WorkShop 6 and Sun WorkShop 6 update 1.

See also the What's New in Sun WorkShop 6 update 2, which describes all the new features in the Sun WorkShop 6 update 2 release, the Sun WorkShop 6 update 1 release, and the Sun WorkShop 6 release. You can access this book by pointing your browser to http://docs.sun.com. Click Search Book Titles Only and search for "What's New."

  1. Sun WorkShop 6 update 2 New Features
  2. Sun WorkShop 6 update 1 New Features
  3. Sun WorkShop 6 New Features

  1. Sun WorkShop 6 update 2 New Features

    Sun WorkShop 6 update 2 dbx includes the following new and changed features.

    1. Elimination of the 8 Mb limit in runtime checking
    2. Preliminary support for the debugging of "mismatched" core files
    3. A new mode of single-stepping
    4. Support for GDB commands in dbx
    5. Two new collector subcommands

    1. Elimination of the 8 Mb Limit in runtime checking on UltraSPARC systems

      On UltraSPARC systems, dbx now uses traps automatically during runtime checking if the program being debugged uses up all the address space within 8 megabytes of the particular load/store instruction being replaced. You no longer need to set the rtc_use_traps environment variable to enable trap handers.

    2. Preliminary support for the debugging of "mismatched" core files

      This release includes preliminary support for the debugging of "mismatched" core files (for example, core files produced on a system running a different version or patch level of the Solaris[tm] operating environment)

      Sometimes a core file is created on one system (the core-host) and you want to load the core file on another machine (the dbx-host) to debug it. However, two problems with libraries may arise when you do so:

      • The shared libraries used by the program on the core-host won't be the same libraries as those on the dbx-host. To get proper stack traces involving the libraries, you'll want to make these original libraries available on the dbx-host.
      • dbx uses system libraries in /usr/lib to help understand the implementation details of the run time linker and threads library on the system. It may also be necessary to provide these system libraries from the core-host so that dbx can understand the runtime linker data structures and the threads data structures.

      The user libraries and system libraries can change in patches as well as major Solaris upgrades, so this problem can even occur on the same host, if, for example, a patch was installed after the core file was collected, but before running dbx on the core file.

    3. dbx may display one or more of the following error messages when you load a "mismatched" core file:

      dbx: core file read error: address 0xff3dd1bc not available
      dbx: warning: could not initialize librtld_db.so.1 -- trying libDP_rtld_db.so
      dbx: cannot get thread info for 1 -- generic libthread_db.so error
      dbx: attempt to fetch registers failed - stack corrupted
      dbx: read of registers from (0xff363430) failed -- debugger service failed
      

      To eliminate the library problems and debug a "mismatched" core file with dbx, you can now do the following:

      1. Set the dbx environment variable core_lo_pathmap to on.
      2. Use the pathmap command to tell dbx where the correct libraries for the core file are located.
      3. Use the debug command to load the program and the core file.

      For example, assuming that the root partition of the core-host has been exported over NFS and can be accessed via /net/core-host/ on the dbx-host machine, you would use the following commands to load the program prog and the core file prog.core for debugging:

      (dbx) dbxenv core_lo_pathmap on
      (dbx) pathmap /usr /net/core-host/usr
      (dbx) pathmap /appstuff /net/core-host/appstuff
      (dbx) debug prog prog.core
      

      If you are not exporting the root partition of the core-host, you must copy the libraries by hand. You need not re-create the symbolic links. (For example, you need not make a link from libc.so to libc.so.1; just make sure libc.so.1 is available.)

      Things to remember:

      • The pathmap command does not recognize a pathmap for '/' so you cannot use the following command:
        pathmap / /net/core-host
        
      • The single-argument mode for the pathmap command does not work with loadobject pathnames, so use the two argument from-path to-path mode.
      • Debugging the core file is likely to work better if the dbx-host has either the same or a more recent version of Solaris than the core-host, though this is not always necessary.

      For more information about debugging "mismatched" core files, type the following command at the dbx prompt:

      help core mismatch
      
    4. A new mode of single-stepping that determines the last function call on a given line and steps into it

      The step to [func] command attempts to step into func in the current source line. If func is not given, the command attempts to step into the last function called in the source line as determined by the assembly code for the source line.

      While an attempt is made to step into the last assembly call instruction or step into a function (if given) in current source line, it is possible that the call is not taken (due to conditional branch). In such cases that the call is not taken or there is no call in the current source line, step to steps over the current source line. Special consideration on user-defined assignment operators should be taken when using step to.

    5. Support for GDB commands in dbx

      A new command, gdb, has been added to dbx to let you switch between the command sets of dbx and GDB. At any given time, dbx will handle either the dbx command set or the GDB command set, but not both. The new command has the following syntax:

      gdb on | off
      

      GDB mode has the following limitations in this release:

      • dbx does not support the following GDB commands:
        command
        define
        handle
        hbreak
        interrupt
        maintenance
        printf
        rbreak
        return
        signal
        tcatch
        until
        
      • Most options in the GDB info, set, and show commands are not supported.

      • dbx will not read the .gdbinit file when switched to GDB mode.
      • The debugging tool bar buttons in Sun WorkShop do not work properly in GDB mode.

    6. Two new collector subcommands

      The dbx collector command has two new subcommands, pause and resume. These turn off and turn on recording of profiling data.

  2. Sun WorkShop 6 update 1 New Features

    Sun WorkShop 6 update 1 dbx included the following new and changed features.

    • Fortran interval types and expressions are now supported. Simple arithmetic (add, subtract, multiply, divide, negate), equal, and not equal operations are implemented.
  3. Sun WorkShop 6 New Features

    Sun WorkShop 6 dbx included the following new and changed features.

    1. Readonly ksh variable firedhandlers
    2. Partial clearing of individual breakpoints used by inclass, inmethod, and infunction
    3. Redirection of trace output to files
    4. New dbx environment variable stack_find_source
    5. New dbx environment variable proc_exclusive_attach
    6. New dbx environment variable step_granularity
    7. New dbx environment variable mt_scalable
    8. New dbx environment variable rtc_error_stack
    9. New dbx environment variable rtc_inherit
    10. New dbx environment variable rtc_use_traps
    11. Breakpoints in C++ inlined member functions work correctly
    12. LWP related commands are now always available
    13. Third consecutive Control-C will force a process to stop
    14. Full line number information is now recorded

    1. Readonly ksh variable firedhandlers

      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.

    2. Partial clearing of individual breakpoints used by inclass, inmethod, and infunction

      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.

    3. Redirection of trace output to files

      Output of traces can be redirected to files. See "trace Command" in the Using dbx Commands section of the Sun WorkShop online help.

    4. New dbx environment variable stack_find_source

      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.

    5. New dbx environment variable proc_exclusive_attach

      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.

    6. New dbx environment variable step_granularity

      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.

    7. New dbx environment variable mt_scalable

      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.

    8. New dbx environment variable rtc_error_stack

      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.

    9. New dbx environment variable rtc_inherit

      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.

    10. New dbx environment variable rtc_use_traps

      The new dbx environment variable rtc_use_traps enables a workaround for the eight megabyte code limitation on runtime checking.

    11. Breakpoints in C++ inlined member functions work correctly

      Breakpoints in C++ inlined member functions work correctly. This includes proper evaluation of handler conditions (-if).

    12. LWP related commands are now always available

      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.

    13. Third consecutive Control-C will force a process to stop

      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.

    14. Full line number information is now recorded

      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.


D. Software Corrections

Multithreaded Program No Longer Crashes When Calling getmsg() Under Runtime Checking (4374260)

If a multithreaded program calls the getmsg() function while running under runtime checking, it no longer crashes.


E. Problems and Workarounds

This section discusses the following software bugs that could not be fixed in time for this release. For updates, check the Forte Developer Hot Product News web page (http://www.sun.com/forte/developer/hotnews.html).

  1. dbx Can't Print the Template Parameter of a Type With No Name
  2. The whocatches Command Can't Tell Exception Will Be Caught
  3. Monitoring a Local Variable May Cause Termination With a SIGKILL Signal
  4. thread -blocks Command Does Not Work on Solaris 2.6
  5. Problems Debugging Multithreaded Programs with Alternate Threads
    1. Multithreaded C++ Programs Using Alternate Threads Hang When Debugged in Solaris 8 Operating Environment
    2. Fix and Continue Does Not Work on Programs With Alternate Threads in Solaris 8 Operating Environment
    3. -thread Event Specifier Does not Work on Programs Using Alternate Threads
  6. Detaching From an Attached Process in dbx Before Closing Experiment Causes Hang
  7. Fixing, Then Reloading, Fixing, and Running Causes dbx to Dump Core
  1. dbx Can't Print the Template Parameter of a Type With No Name (4058205)

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

  2. The whocatches Command 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.

  3. Monitoring a Local Variable May Cause Termination With a 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.

  4. thread -blocks and thread -syncs Commands Do Not Work on Solaris 2.6 (4307236)

    The thread -blocks command and thread -syncs commands do not work properly in some configurations due to bugs in the Solaris operating environment. The bad configuration are the Solaris 2.6 and Solaris 7 operating environments running a 64-bit kernel when you are debugging a 32-bit application.

  5. Problems Debugging Multithreaded Programs with Alternate Threads
  6. In cases where alternate threads are being considered for performance tuning, it is recommended that the multithreaded program first be debugged using the default thread library, and that alternate threads be used afterward. In particular, note the following problems:

    1. Multithreaded C++ Programs Using Alternate Threads Hang When Debugged in Solaris 8 Operating Environment (4432577)

      Multithreaded C++ programs built with alternate threads hang when you attempt to debug them in the Solaris 8 operating environment. 32-bit multithreaded C++ programs built with the -R /usr/lib/lwp compiler option hang when run within dbx. 64-bit multithreaded C++ programs built with the -R /usr/lib/lwp/sparcv9 compiler option are likely to hang, especially when runtime checking is used.

      This symptom occurs with C++ code compiled in standard (default) mode (with the -compat=5 compiler option); it does not occur with code compiled in compatibility mode (with the -compat=4 compiler option).

    2. Fix and Continue Does Not Work on Programs With Alternate Threads in Solaris 8 Operating Environment (4432591)
    3. Fix and continue does not work on multithreaded programs using alternate threads. Using a fix command on such a program, followed by a run command causes dbx to dump core.

    4. -thread Event Specifier Does not Work on Programs Using Alternate Threads (4433655)
    5. The -thread event specification does not work with programs that use alternate threads. The thread-qualified event does not occur.

  7. Detaching From an Attached Process in dbx Before Closing Experiment Causes Hang (4456506)

    Due to a bug in dbx, if you attach dbx to a process, enable data collection (using collector enable), and then try to detach from the process before disabling data collection, dbx unloads the collector library, fails to close the experiment, fails to detach from the process, and cannot complete any more commands. You must kill dbx, which in turn kills the target process. The workaround is to explicitly disable data collection (using collector disable) before detaching dbx from the process.

  8. Fixing, Then Reloading, Fixing, and Running Causes dbx to Dump Core (4459339)

    If you use a fix command on program foo, then reload the original binary, and issue a fix command and a run command, dbx dumps core. This symptom does not occur if you load another program into dbx after fixing program foo and before loading the original binary of program foo.


F. Limitations and Incompatibilities 

Sun WorkShop 6 update 2 dbx has the following limitations:

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


G. Documentation Errata 

There is no new information at this time. 

 


Copyright 2001 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.