DDD Frequently Asked Questions                                  -*- text -*-
******************************

1.  How can I speed up DDD?

    The fastest DDD configuration is obtained as follows.  Enable
    source code and machine code caching.  Disable glyphs, machine
    code display, execution window.  Do not use remote debugging.
    Use DDD 1.4b or later, compiled with the `-O2' option.


2.  How can I display a multi-length array?

    The problem is that GDB does not know the actual length of the
    array; you have to supply it by hand (i.e. using the keyboard).
    You can use the DDD ``display successive array elements`` or the
    GDB ``artificial array'' mechanism.  If you have a pointer, say:
    
        int *pi;
    
    pointing to an array of 10 ints, you can see the integers by
    entering
    
        graph display pi[0..9]
    
    at the `(gdb)' prompt (or entering `pi[0..9]` in the `Dependent
    Display' dialog).
    
    As an alternative, you can use the GDB ``artificial array'' mechanism
    by entering
    
        graph display pi[0]@10
    
    This will create an array starting with pi showing the first 10
    elements.


3.  In C++, how do I see the *actual* type (derived) type of the
    object rather than the *declared* type?

    Enter `set print object on' at the `(gdb)' prompt, or enter
    `set print object on' in your `~/.gdbinit' file.


4.  Does DDD sit on top of GDB, or is it integrated with gdb source?

    DDD sits on top of a separate GDB process.  Use `ddd --trace' to
    see the interaction.


5.  If it sits on top, how can GDB upgrades be incorporated?

    By getting and installing the new GDB.  No changes to DDD are
    necessary, unless the GDB developers introduce incompatible
    changes - in which case you'll have to wait until we patch DDD.


6.  Does DDD work with DBX on other systems than Sun?

    DDD has been reported to run with Sun DBX as shipped with SunOS
    4.x (aka Solaris 1.x) and SunOS 5.x (aka Solaris 2.x).
    Unfortunately, DBX is quite different across machines since every
    vendor icorporated his own extensions.  As long as some basics
    stay the same, DDD may work more or less with other DBX versions
    as well.  If not, extending the DDD code to support other DBX
    versions should not be too difficult.  Use `ddd --trace' to see
    the interaction.


7.  I don't like the 'break point' symbol.  Can I change it?

    Yes.  See the various `*.xbm' files in the DDD source code.


8.  I compiled DDD on my machine and it fails.  I got the executable
    from an FTP site and it runs.  What is the difference? Is there
    some compilation setup I need to do, or is the executable patched?

    It is a frequently observed effect that our executables work while
    the executables of DDD users fail.  This is simply due to the fact
    that we test them throroughly.  The usual test a new DDD
    distribution has to pass is to configure, compile, and run
    out-of-the-box on half a dozen machines and configurations.
    
    We do not really know why our executables work while others fail,
    although the source code is identical.  A simple explanation may
    be that the compilation environment (C compiler, C++ compiler,
    libraries...) have slight differences (aka bugs) from site to
    site.  We have set up DDD such that it works on our site - for
    instance, some DDD parts work around compiler bugs detected on a
    specific machine.  Users compiling DDD on their local machine will
    encounter other problems, but will not know how to fix them.  That
    is, while the DDD code stays the same, the executables may vary a
    lot.


9.  I have heard that there is a magic command built into DDD.
    Is this true, and what is this magic command for?

    It's an adventurer's secret.  Use the source, Luke.


10. Is there an Athena Widgets port of DDD?

    No.  If you want DDD running with a free widget set, you should
    support the LessTif team, who are developing a free
    Motif-compliant widget set.  Check out their WWW page at
    
        http://www.hungry.com:8000/products/lesstif/

    [Note: We HAVE considered to build DDD on a free widget set.  But
    Athena is definitively not powerful enough, and alternative
    approaches like Tcl/Tk did not provide the necessary asynchronous
    interprocess communication facilities required to build an
    efficient interface.  So go and support the LessTif team instead.]


11. Will DDD compile under LessTif?

    As of LessTif 0.33, it will.  But it will not run, due to lacking
    LessTif features.  See also question 9, above.


12. DDD reports `imake' and/or `xmkmf' problems when being started.
    How come?

    To run properly, OSF/Motif requires a file called `XKeysymDB' in
    the X project root.  Since we distribute DDD binaries, the X
    project root compiled into the X libraries (and thus hard-coded in
    the DDD binary) may not be valid on the actual machine.  DDD tries
    to repair this situation by calling `xmkmf' and thus determining
    the X project root.  Usually, this is not required if DDD runs on
    the machine it was compiled on.  You may run `ddd
    --check-configuration' to find out why DDD finds it necessary to
    determine the X project root.  The code for this hack can be found
    in `xconfig.C'.


13. How can I change DDD resources (especially colors)?

    Copy the appropriate resource lines from the `Ddd' file contained
    in the DDD distribution (type `./configure -v; cd ddd; make Ddd'
    to create it from scratch) in your `~/.dddinit' file.  For
    instance, to make the background less bright as in DDD 1.2 and
    before, insert the following lines in `~/.dddinit':

        Ddd*XmText.background:          light grey
        Ddd*XmTextField.background:     light grey
        Ddd*GraphEdit.background:       light grey
        Ddd*XmList.background:          light grey

    To set up the size and the placement of the DDD main windows, use:

        Ddd*command_shell.geometry:     +0+0
        Ddd*source_view_shell.geometry: +0+220
        Ddd*data_disp_shell.geometry:   +0+670

    (or similar values - see the X(1) manual page for details on
     geometry specifications)


14. I want to use DDD interprocess communication in my own
    application.  How do I proceed?

    There is a demonstration program named `ttytest' in the DDD
    package.  Just type `make ttytest'.  It should be relatively
    easy to customize this application.

    Here are some pointers: If you want to talk with a separate
    process, use the `TTYAgent' class, as defined in `TTYAgent.C'.
    Using the `write' method, you can send arbitrary data to the
    process; you can define an `Input' handler that will be called
    each time the process sends data to you.  The header files of
    `TTYAgent' and its superclasses should contain sufficient
    information.  As all communication is handled asynchronously, you
    can realize a usual Xt-based interface using Athena widgets, Motif
    widgets, or another Xt-based toolkit.


15. I want to use the DDD graph editor in my own application.
    How do I proceed?

    There is a demonstration program named `test-graph' in the DDD
    package.  Just type `make test-graph'.  It should be relatively
    easy to customize this application.

    Here are some pointers: The `GraphEdit' widget, as defined in
    `GraphEdit.h' contains the DDD graph editor.  Variants with Athena
    panners and Motif scrollbars are found in `PannedGE.h' and
    `ScrolledGE.h', respectively.  The `GraphEdit' widget works on a
    `Graph' structure, which is defined in `Graph.h'; a graph is
    composed of nodes and edges, both forming class hierarchies whose
    top classes are defined in `GraphNode.h' and `GraphEdge.h',
    respectively.  The graph nodes in DDD are Box graph nodes, defined
    in `BoxGraphN.h'; a box is a (possibly structured) rectangular
    entity holding strings, lines, or figures.  See also the DDD paper
    `doc/ddd-paper.ps' for details on boxes and how they are composed.


16. How do I set fonts in DDD?  How do I change the font size?

    The font settings in DDD 1.4c do not work well on a variety of X
    displays.  The general scheme is to see the `Fonts' resources in
    the `Ddd' file and copy/modify the appropriate lines to your
    `.dddinit' file.

    These are the settings from DDD 1.4b:

    Ddd*fontList: \
    -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*=charset,\
    -*-lucida sans typewriter-medium-r-*-*-12-*-*-*-*-*-*-*=tt,\
    -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*=key,\
    -*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*=rm,\
    -*-helvetica-medium-o-*-*-12-*-*-*-*-*-*-*=sl,\
    -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*=bf,\
    -*-helvetica-bold-o-*-*-12-*-*-*-*-*-*-*=bs,\
    -*-helvetica-bold-r-*-*-18-*-*-*-*-*-*-*=Logo,\
    -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*=logo,\
    -*-symbol-*-*-*-*-12-*-*-*-*-*-*-*=symbol

    Ddd*XmTextField.FontList: \
    -*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-*-*=charset
    Ddd*XmText.FontList:      \
    -*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-*-*=charset


    Vinnie Shelton <shelton@icd.teradyne.com> suggests the following
    resolution-independent settings:

    Ddd*fontList: \
    -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*=charset,\
    -*-lucida sans typewriter-medium-r-*-*-*-120-*-*-*-*-iso8859-*=tt,\
    -*-helvetica-bold-r-*-*-*-120-*-*-*-*-*-*=key,\
    -*-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*=rm,\
    -*-helvetica-medium-o-*-*-*-120-*-*-*-*-*-*=sl,\
    -*-helvetica-bold-r-*-*-*-120-*-*-*-*-*-*=bf,\
    -*-helvetica-bold-o-*-*-*-120-*-*-*-*-*-*=bs,\
    -*-helvetica-bold-r-*-*-*-140-*-*-*-*-*-*=Logo,\
    -*-helvetica-bold-r-*-*-*-120-*-*-*-*-*-*=logo,\
    -*-symbol-*-*-*-*-*-120-*-*-*-*-*-*=symbol

    Ddd*XmTextField.FontList: \
    -*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-*-*=charset
    Ddd*XmText.FontList:      \
    -*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-*-*=charset


$Id: FAQ,v 1.18 1996/03/07 08:40:18 zeller Exp $
