Johns release
[deliverable/binutils-gdb.git] / gdb / WHATS.NEW
CommitLineData
dd3b648e
RP
1 GDB 4.0 -- what has changed since 3.5?
2
3 * New Facilities
4
5Gdb now paginates its output, with a ``more''-like interface. You can
6set the screen width and screen height with new ``set'' commands; they
7default to your terminal settings. Wide output is wrapped at good
8places to make the output more readable.
9
10Gdb now reads its input via the ``readline'' interface. This provides
11inline editing of commands, using familiar Emacs or VI commands (like
12``tcsh'' or the korn shell); history substitutions a la the C shell;
13and storage and recall of your command history across debugging
14sessions. The default is Emacs mode; to switch temporarily to vi mode,
15use control-meta-J or ESC control-j. You can switch permanently to vi
16mode by putting the line ``set editing-mode vi'' in the file .inputrc
17in your home directory. For full details, see the description in
18readline/inc-readline.texinfo and readline/inc-history.texinfo.
19
20Gdb now supports cross-debugging from a host machine of one type to a
21target machine of another type. Communication with the target system
22is over serial lines. The ``target'' command handles connecting to the
23remote system; the ``load'' command will download a program into the
24remote system. It also supports debugging of realtime processes
25running under VxWorks, using SunRPC Remote Procedure Calls over TCP/IP
26to talk to a debugger stub on the target system.
27
28New CPUs supported include the AMD 29000 and Intel 960.
29
30GDB now reads object files and symbol tables via a ``binary file''
31library, which allows a single copy of GDB to debug programs of multiple
32object file types such as a.out and coff.
33
34There is now a GDB reference card in "gdbrc.tex".
35
36
37 * Control-Variable user interface simplified
38
39All variables that control the operation of the debugger can be set
40by the ``set'' command, and displayed by the ``show'' command.
41
42For example, ``set prompt new-gdb=>'' will change your prompt to new-gdb=>.
43``Show prompt'' produces the response:
44Gdb's prompt is new-gdb=>.
45
46What follows are the NEW set commands. The command ``help set'' will
47print a complete list of old and new set commands. ``help set FOO''
48will give a longer description of the variable FOO.
49
50caution on/off: Enables warning questions for operations that are
51 hard to recover from, e.g. rerunning the program while
52 it is already running. Default is ON.
53
54editing on/off: Enables EMACS style command line editing
55 of input. Previous lines can be recalled with
56 control-P, the current line can be edited with control-B,
57 you can search for commands with control-R, etc.
58 Default is ON.
59
60history filename NAME: NAME is where the gdb command history
61 will be stored. The default is .gdb_history,
62 or the value of the environment variable
63 GDBHISTFILE.
64
65history size N: The size, in commands, of the command history. The
66 default is 256, or the value of the environment variable
67 HISTSIZE.
68
69history write on/off: If this value is set to ON, the history file will
70 be saved after exiting gdb. If set to OFF, the
71 file will not be saved. The default is OFF.
72
73history expansion on/off: If this value is set to ON, then csh-like
74 history expansion will be performed on
75 command line input. The default is OFF.
76
77radix N: Sets the default radix for input and output. It can be set
78 to 8, 10, or 16. Note that the argument to "radix" is interpreted
79 in the current radix, so "set radix 10" is always a no-op.
80
81screen-height N: This integer value is the number of lines on a page. Default
82 is 24, the current `stty rows'' setting, or the ``li#''
83 setting from the termcap entry matching the environment
84 variable TERM.
85
86screen-width N: This integer value is the number of characters on a line.
87 Default is 80, the current `stty cols'' setting, or the ``co#''
88 setting from the termcap entry matching the environment
89 variable TERM.
90
91Note: ``set screensize'' is obsolete. Use ``set screen-height'' and
92``set screen-width'' instead.
93
94addressprint on/off: Print memory addresses in various command displays,
95 such as stack traces and structure values. Gdb looks
96 more ``symbolic'' if you turn this off; it looks more
97 ``machine level'' with it on. Default is ON.
98
99arrayprint on/off: Prettyprint arrays. New convenient format! Default
100 is OFF.
101
102demangle on/off: Print C++ symbols in "source" form if on, "raw" form if off.
103
104asm-demangle on/off: Same, for assembler level printouts like instructions.
105
106vtblprint on/off: Prettyprint C++ virtual function tables. Default is OFF.
107
108
109 * Support for Epoch Environment.
110
111The epoch environment is a version of Emacs v18 with windowing. One
112new command, ``inspect'', is identical to ``print'', except that if you
113are running in the epoch environment, the value is printed in its own
114window.
115
116
117 * Support for Shared Libraries
118
119GDB can now debug programs and core files that use SunOS shared libraries.
120Symbols from a shared library cannot be referenced
121before the shared library has been linked with the program (this
122happens after you type ``run'' and before the function main() is entered).
123At any time after this linking (including when examining core files
124from dynamically linked programs), gdb reads the symbols from each
125shared library when you type the ``sharedlibrary'' command.
126It can be abbreviated ``share''.
127
128sharedlibrary REGEXP: Load shared object library symbols for files
129 matching a unix regular expression. No argument
130 indicates to load symbols for all shared libraries.
131
132info sharedlibrary: Status of loaded shared libraries.
133
134
135 * Watchpoints
136
137A watchpoint stops execution of a program whenever the value of an
138expression changes. Checking for this slows down execution
139tremendously whenever you are in the scope of the expression, but is
140quite useful for catching tough ``bit-spreader'' or pointer misuse
141problems. Some machines such as the 386 have hardware for doing this
142more quickly, and future versions of gdb will use this hardware.
143
144watch EXP: Set a watchpoint (breakpoint) for an expression.
145
146info watchpoints: Information about your watchpoints.
147
148delete N: Deletes watchpoint number N (same as breakpoints).
149disable N: Temporarily turns off watchpoint number N (same as breakpoints).
150enable N: Re-enables watchpoint number N (same as breakpoints).
151
152
153 * C++ multiple inheritance
154
155When used with a GCC version 2 compiler, GDB supports multiple inheritance
156for C++ programs.
157
158 * C++ exception handling
159
160Gdb now supports limited C++ exception handling. Besides the existing
161ability to breakpoint on an exception handler, gdb can breakpoint on
162the raising of an exception (before the stack is peeled back to the
163handler's context).
164
165catch FOO: If there is a FOO exception handler in the dynamic scope,
166 set a breakpoint to catch exceptions which may be raised there.
167 Multiple exceptions (``catch foo bar baz'') may be caught.
168
169info catch: Lists all exceptions which may be caught in the
170 current stack frame.
171
172
173 * Minor command changes
174
175The command ``call func (arg, arg, ...)'' now acts like the print
176command, except it does not print or save a value if the function's result
177is void. This is similar to dbx usage.
178
179The ``up'' and ``down'' commands now always print the frame they end up
180at; ``up-silently'' and `down-silently'' can be used in scripts to change
181frames without printing.
182
183 * New directory command
184
185'dir' now adds directories to the FRONT of the source search path.
186The path starts off empty. Source files that contain debug information
187about the directory in which they were compiled can be found even
188with an empty path; GCC includes this information. If GDB can't find
189your source file in the current directory, type "dir .".
190
191 * Features removed in this release
192
193``info types'' has been removed, since it printed builtin types in a
194confusing fashion, and did not do useful things with typedefs. ``ptype''
195or ``whatis'' are more useful commands for dealing with types..
196
197
198 * Configuring GDB for compilation
199
200For normal use, type ``config.gdb host''. Hosts now handled are:
201
2023b1 altos altosgas arm bigmips convex hp300bsd hp300hpux i386v i386v-g
203i386v32 i386v32-g isi littlemips m88k merlin news news1000 none np1 pn
204pyramid sun2os3 sun2os4 sun386 sun3os3 sun3os4 sun4os3 sun4os4 symmetry
205umax vax
206
207Type config.gdb +host to get a full description of each host.
208
209You can now build gdb conveniently for several architectures from the
210same sources. If config.gdb is run from a subdirectory, it configures
211the Makefile to use source files from '..'. Each subdirectory can be
212indpendently configured. An explicit source file directory can also
213be specified with the +srcdir=xxx option. Due to obscure search rules
214in the C preprocessor, if you have previously built gdb in the main
215directory, run 'make cleanconfig' in the top level directory before
216building it in a subdirectory.
217
218GDB now handles cross debugging. If you are remotely debugging between
219two different machines, type ``config.gdb host target''.
220Host is the machine where gdb will run; target is the machine
221where the program that you are debugging will run.
222
223Type config.gdb +target to get a full description of each target.
This page took 0.030875 seconds and 4 git commands to generate.