0. If you have any more DDD tips of the day,
   please send them to the DDD developers <ddd@gnu.org>.

1. Welcome to DDD!
   You can get help on all items by pointing at them and pressing F1.
   And don't worry, you can undo most mistakes...

2. Whenever you're stuck, try Help->What Now. This will analyze the
   current DDD state and give you some hints on what to do next.

3. Buttons with a small triangle in the upper right corner are special:
   pressing and holding mouse button 1 on them will pop up a menu
   with additional options.

4. You can interrupt GDB and the current program by clicking on
   Program->Interrupt or pressing `Esc`.

5. If you made a mistake, try Edit->Undo. This will undo the most
   recent debugger command and redisplay the previous program state.

6. There are three ways to show the value of a variable:
   - You can view its value, simply by pointing at it;
   - You can print its value in the debugger console, using Print ();
   - You can display it graphically, using Display ().

7. A quick way to manipulate variables, breakpoints, and displays
   is to press mouse button 3 on them.

8. Double-clicking on any value in the data display
   will toggle more details.

9. If your program needs special terminal capabilities such as readline
   or curses, let it run in the separate execution window
   (Program->Run in Execution Window).

10. You can save space in the data window by
    - hiding details (Show/Hide),
    - rotating structs (Rotate), and
    - clustering variables (Undisp->Cluster).

11. If you want to customize the DDD fonts, see
    Edit->Preferences->Fonts.

12. To change the text background color, write into ``~/.ddd/init`':
    `Ddd*XmText.background:` color
    `Ddd*XmTextField.background:` color
    `Ddd*XmList.background:` color

13. When using GDB, all text fields have command and argument completion
    with `Tab`, just like the shell. In a file selection box, type part of
    a filename, hit `Tab`, and voila! It's completed.

14. You can always recenter the command tool
    by selecting View->Command Tool,
    or by pressing `Alt+8`.

15. To scroll the data display, most users find a panner
    much more convenient than two scrollbars.
    Check out Edit->Preferences->Startup->Data Scrolling.

16. To limit the number of array elements in a data display, set
    Edit->GDB Settings->Limit on array elements to print.

17. If DDD cannot find a source, set the GDB source path via
    Edit->GDB Settings or enter
    ``dir sourcedir_1:sourcedir_2:...:sourcedir_n`' at the GDB prompt.

18. You can quickly set breakpoints
    by double-clicking in the breakpoint area.

19. To see the actual type of a C++ object in GDB, set
    Edit->GDB Settings->Set printing of object's derived type.

20. To display data in hexadecimal format, display it and choose
    Convert to Hex from the Display () menu,
    or enter ``graph display /x data`' at the GDB prompt.

21. To send a signal to your program,
    use Status->Signals->Send.

22. To quickly display variable values,
    double-click on the variable name.

23. After looking up an item or stepping through the program, you can use
    Edit->Undo and Edit->Redo to return to earlier locations.

24. You can repeat the last command by hitting `RETURN`.
    Use `Ctrl+B` and `Ctrl+F` to search the command history.

25. You can move breakpoints by dragging them.
    Just press and hold mouse button 1 on a breakpoint,
    move it to the new position and release mouse button 1 again.

26. To make your program ignore signals, use Status->Signals and
    unset the Pass button for the appropriate signal.

27. You can save space by disabling toolbar captions.
    See Edit->Preferences->Startup->Toolbar Appearance.

28. To quickly edit breakpoint properties,
    double-click on a breakpoint symbol.

29. To have GDB start your program automatically upon startup,
    put the following lines in your ``.gdbinit`' file:
    `break main` - or some other initial function
    `run` - possibly giving arguments here

30. To get rid of these tips of the day, unset
    Edit->Preferences->Startup->Show Tip of the Day.

31. To redirect stderr from the execution window to the debugger console,
    add ``2>/dev/tty`' to the arguments of your program.

32. To display the first n elements of a variable-length array ptr,
    enter ``graph display ptr[0]@n`' at the GDB prompt.

33. To undisplay a specific record member once and for all, select it in a
    display and click on Undisp. Confirming with Apply to All
    suppresses the member in other displays, too.

34. To display data in a smaller font, try Data->Themes->Small Values.
    The pattern describes the expressions you want to see in smaller font:
    ``*`' matches all expressions.

35. You can have each of DDD, GDB and the debugged program run on
    different machines. See the DDD ``--rhost`' option for details.

36. You can copy breakpoints by dragging them while pressing `Shift`.
    Just press and hold `Shift`+mouse button 1 on a breakpoint,
    move it to the new position and release mouse button 1 again.

37. To save and restore data displays, cut, copy and paste them via
    the Edit menu. Together with `xclipboard`, you can manage
    arbitrary collections of data displays.

38. Do you want to stop this debugging session and resume later?
    Use File->Save Session!

39. You can interact with DDD even while the debuggee is executing:
    DDD automatically interrupts program execution for a moment.
    This works whenever program execution is initiated by Run or Cont.

40. To debug a child process, put a call to ``sleep`' in the child right
    after the ``fork`' call. Run the program and attach to the child process
    using File->Attach to Process.

41. If your program prints a lot of text on standard error, try
    redirecting standard error to a file (via ``2> FILE`'), or add
    to ``~/.ddd/init`': `Ddd*lineBufferedConsole: off`.

42. If the inferior debugger does not support stderr redirection, try
    invoking DDD using ``--debugger 'NAME 2> FILE'`'.

43. Using GDB, you can define your own canned sequences of commands.
    Try Commands->Define Command.

44. To use GDB with Solaris CC, compile with ``-xs`'.
    GDB wants debugging info in the executable.

45. To use GDB with G77, compile with ``-fdebug-kludge`'. This gives
    rudimentary information on COMMON and EQUIVALENCE variables in GDB.
    See the G77 documentation for details.

46. Double-clicking on a function call will lead you to the definition of
    the function. Use Edit->Undo to return to the function call.

47. Disabled breakpoints can be used as bookmarks.
    Use Source->Edit Breakpoints to list all breakpoints;
    then, click on Lookup to jump to a breakpoint location.

48. You can assign user-defined buttons to frequently used commands.
    Try Commands->Edit Buttons.

49. In the Breakpoint and Display Editors,
    you can toggle the selection with `Ctrl`+mouse button 1.
    This allows you to select non-contiguous ranges of items.

50. To change the properties of multiple breakpoints at once,
    select them in the breakpoint editor (Source->Edit Breakpoints)
    and click on Properties.

51. Even while in the source window,
    you can enter and edit GDB commands:
    Just type the command and press `RETURN`.

52. You can record commands to be executed when a breakpoint is hit.
    In the Breakpoint Properties panel, try Record and End.

53. You can easily resume a saved DDD session
    by invoking DDD as ``ddd =session`'.

54. If the DDD source window keeps on scrolling until the end of source is
    reached, try changing the ``glyphUpdateDelay`' resource. See the
    DDD manual for details.

55. To customize display appearance, you can write your own themes.
    For details, see the manual "Writing DDD Themes".

56. For further DDD customization (e.g. colors), see the ``Ddd`'
    app-defaults file from the DDD WWW Site or the DDD source
    distribution. Copy resources to ``~/.ddd/init`' and edit as desired.

57. In GCC, ``-Wall`' does not enable all warnings. See the GCC
    documentation for other warnings you might consider useful.
    - J.H.M. Dassen <jdassen@wi.leidenuniv.nl>

58. To get a global idea of what a process or program does or is doing,
    use a system call tracer, like ``strace`', ``truss`', or ``trace`'.
    - J.H.M. Dassen <jdassen@wi.leidenuniv.nl>

59. If you suspect memory corruption caused by problematic pointers,
    try linking with Electric Fence ``efence`' or the ``dbmalloc`' library.
    See the DDD WWW page for links.
    - J.H.M. Dassen <jdassen@wi.leidenuniv.nl>

60. Prevention is better than cure. Document your assumptions using
    `` or GNU NANA. See the DDD WWW page for links.
    - J.H.M. Dassen <jdassen@wi.leidenuniv.nl>

61. The debugger isn't a substitute for good thinking. But, in some
    cases, thinking isn't a substitute for a good debugger either. The
    most effective combination is good thinking and a good debugger.
    - Steve McConnell, Code Complete

62. When you're totally stuck, try to find a helpful ear. In my experience,
    nothing helps you more in debugging than to try to explain your problem
    (what your code should do, and what it actually does) to someone else.
    - J.H.M. Dassen <jdassen@wi.leidenuniv.nl>