]>
Commit | Line | Data |
---|---|---|
dd3b648e RP |
1 | GDB 4.0 -- what has changed since 3.5? |
2 | ||
3 | * New Facilities | |
4 | ||
81049e47 | 5 | Wide output is wrapped at good places to make the output more readable. |
dd3b648e RP |
6 | |
7 | Gdb now supports cross-debugging from a host machine of one type to a | |
8 | target machine of another type. Communication with the target system | |
9 | is over serial lines. The ``target'' command handles connecting to the | |
10 | remote system; the ``load'' command will download a program into the | |
81049e47 JG |
11 | remote system. Serial stubs for the m68k and i386 are provided. Gdb |
12 | also supports debugging of realtime processes running under VxWorks, | |
13 | using SunRPC Remote Procedure Calls over TCP/IP to talk to a debugger | |
14 | stub on the target system. | |
dd3b648e RP |
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 | ||
d7c2f2dd RP |
22 | There is now a GDB reference card in "doc/refcard.tex". (Make targets |
23 | refcard.dvi and refcard.ps are available to format it). | |
dd3b648e RP |
24 | |
25 | ||
26 | * Control-Variable user interface simplified | |
27 | ||
28 | All variables that control the operation of the debugger can be set | |
29 | by the ``set'' command, and displayed by the ``show'' command. | |
30 | ||
31 | For example, ``set prompt new-gdb=>'' will change your prompt to new-gdb=>. | |
32 | ``Show prompt'' produces the response: | |
33 | Gdb's prompt is new-gdb=>. | |
34 | ||
35 | What follows are the NEW set commands. The command ``help set'' will | |
36 | print a complete list of old and new set commands. ``help set FOO'' | |
adf2bb58 JG |
37 | will give a longer description of the variable FOO. ``show'' will show |
38 | all of the variable descriptions and their current settings. | |
dd3b648e | 39 | |
a1002e9a | 40 | confirm on/off: Enables warning questions for operations that are |
dd3b648e RP |
41 | hard to recover from, e.g. rerunning the program while |
42 | it is already running. Default is ON. | |
43 | ||
44 | editing on/off: Enables EMACS style command line editing | |
45 | of input. Previous lines can be recalled with | |
46 | control-P, the current line can be edited with control-B, | |
47 | you can search for commands with control-R, etc. | |
48 | Default is ON. | |
49 | ||
50 | history filename NAME: NAME is where the gdb command history | |
51 | will be stored. The default is .gdb_history, | |
52 | or the value of the environment variable | |
53 | GDBHISTFILE. | |
54 | ||
55 | history size N: The size, in commands, of the command history. The | |
56 | default is 256, or the value of the environment variable | |
57 | HISTSIZE. | |
58 | ||
90262bf9 | 59 | history save on/off: If this value is set to ON, the history file will |
dd3b648e RP |
60 | be saved after exiting gdb. If set to OFF, the |
61 | file will not be saved. The default is OFF. | |
62 | ||
63 | history expansion on/off: If this value is set to ON, then csh-like | |
64 | history expansion will be performed on | |
65 | command line input. The default is OFF. | |
66 | ||
67 | radix N: Sets the default radix for input and output. It can be set | |
68 | to 8, 10, or 16. Note that the argument to "radix" is interpreted | |
69 | in the current radix, so "set radix 10" is always a no-op. | |
70 | ||
adf2bb58 JG |
71 | height N: This integer value is the number of lines on a page. Default |
72 | is 24, the current `stty rows'' setting, or the ``li#'' | |
73 | setting from the termcap entry matching the environment | |
74 | variable TERM. | |
dd3b648e | 75 | |
adf2bb58 JG |
76 | width N: This integer value is the number of characters on a line. |
77 | Default is 80, the current `stty cols'' setting, or the ``co#'' | |
78 | setting from the termcap entry matching the environment | |
79 | variable TERM. | |
dd3b648e | 80 | |
a1002e9a JK |
81 | Note: ``set screensize'' is obsolete. Use ``set height'' and |
82 | ``set width'' instead. | |
dd3b648e | 83 | |
a1002e9a | 84 | print address on/off: Print memory addresses in various command displays, |
dd3b648e RP |
85 | such as stack traces and structure values. Gdb looks |
86 | more ``symbolic'' if you turn this off; it looks more | |
87 | ``machine level'' with it on. Default is ON. | |
88 | ||
a1002e9a | 89 | print array on/off: Prettyprint arrays. New convenient format! Default |
dd3b648e RP |
90 | is OFF. |
91 | ||
a1002e9a JK |
92 | print demangle on/off: Print C++ symbols in "source" form if on, |
93 | "raw" form if off. | |
dd3b648e | 94 | |
a1002e9a JK |
95 | print asm-demangle on/off: Same, for assembler level printouts |
96 | like instructions. | |
dd3b648e | 97 | |
a1002e9a | 98 | print vtbl on/off: Prettyprint C++ virtual function tables. Default is OFF. |
dd3b648e | 99 | |
90262bf9 JG |
100 | write on/off: GDB can now write to executable and core files (e.g. patch |
101 | a variable's value) if you turn this switch on, specify | |
102 | the file ("exec foo" or "core foo"), then modify it, e.g. | |
103 | by assigning a new value to a variable. | |
dd3b648e RP |
104 | |
105 | * Support for Epoch Environment. | |
106 | ||
107 | The epoch environment is a version of Emacs v18 with windowing. One | |
108 | new command, ``inspect'', is identical to ``print'', except that if you | |
109 | are running in the epoch environment, the value is printed in its own | |
110 | window. | |
111 | ||
112 | ||
113 | * Support for Shared Libraries | |
114 | ||
115 | GDB can now debug programs and core files that use SunOS shared libraries. | |
116 | Symbols from a shared library cannot be referenced | |
117 | before the shared library has been linked with the program (this | |
118 | happens after you type ``run'' and before the function main() is entered). | |
119 | At any time after this linking (including when examining core files | |
120 | from dynamically linked programs), gdb reads the symbols from each | |
121 | shared library when you type the ``sharedlibrary'' command. | |
122 | It can be abbreviated ``share''. | |
123 | ||
124 | sharedlibrary REGEXP: Load shared object library symbols for files | |
125 | matching a unix regular expression. No argument | |
126 | indicates to load symbols for all shared libraries. | |
127 | ||
128 | info sharedlibrary: Status of loaded shared libraries. | |
129 | ||
130 | ||
131 | * Watchpoints | |
132 | ||
133 | A watchpoint stops execution of a program whenever the value of an | |
134 | expression changes. Checking for this slows down execution | |
135 | tremendously whenever you are in the scope of the expression, but is | |
136 | quite useful for catching tough ``bit-spreader'' or pointer misuse | |
137 | problems. Some machines such as the 386 have hardware for doing this | |
138 | more quickly, and future versions of gdb will use this hardware. | |
139 | ||
140 | watch EXP: Set a watchpoint (breakpoint) for an expression. | |
141 | ||
142 | info watchpoints: Information about your watchpoints. | |
143 | ||
144 | delete N: Deletes watchpoint number N (same as breakpoints). | |
145 | disable N: Temporarily turns off watchpoint number N (same as breakpoints). | |
146 | enable N: Re-enables watchpoint number N (same as breakpoints). | |
147 | ||
148 | ||
149 | * C++ multiple inheritance | |
150 | ||
151 | When used with a GCC version 2 compiler, GDB supports multiple inheritance | |
152 | for C++ programs. | |
153 | ||
154 | * C++ exception handling | |
155 | ||
156 | Gdb now supports limited C++ exception handling. Besides the existing | |
157 | ability to breakpoint on an exception handler, gdb can breakpoint on | |
158 | the raising of an exception (before the stack is peeled back to the | |
159 | handler's context). | |
160 | ||
161 | catch FOO: If there is a FOO exception handler in the dynamic scope, | |
162 | set a breakpoint to catch exceptions which may be raised there. | |
163 | Multiple exceptions (``catch foo bar baz'') may be caught. | |
164 | ||
165 | info catch: Lists all exceptions which may be caught in the | |
166 | current stack frame. | |
167 | ||
168 | ||
169 | * Minor command changes | |
170 | ||
171 | The command ``call func (arg, arg, ...)'' now acts like the print | |
172 | command, except it does not print or save a value if the function's result | |
173 | is void. This is similar to dbx usage. | |
174 | ||
175 | The ``up'' and ``down'' commands now always print the frame they end up | |
176 | at; ``up-silently'' and `down-silently'' can be used in scripts to change | |
177 | frames without printing. | |
178 | ||
179 | * New directory command | |
180 | ||
181 | 'dir' now adds directories to the FRONT of the source search path. | |
182 | The path starts off empty. Source files that contain debug information | |
183 | about the directory in which they were compiled can be found even | |
adf2bb58 JG |
184 | with an empty path; Sun CC and GCC include this information. If GDB can't |
185 | find your source file in the current directory, type "dir .". | |
dd3b648e RP |
186 | |
187 | * Configuring GDB for compilation | |
188 | ||
adf2bb58 JG |
189 | For normal use, type ``./configure host''. See README or gdb.texinfo |
190 | for more details. | |
dd3b648e RP |
191 | |
192 | GDB now handles cross debugging. If you are remotely debugging between | |
adf2bb58 JG |
193 | two different machines, type ``./configure host -target=targ''. |
194 | Host is the machine where gdb will run; targ is the machine | |
dd3b648e | 195 | where the program that you are debugging will run. |