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