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