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