]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/NEWS
gdb/doc: fix incorrect use of @value
[thirdparty/binutils-gdb.git] / gdb / NEWS
CommitLineData
c906108c
SS
1 What has changed in GDB?
2 (Organized release by release)
3
13745a6c
JB
4*** Changes since GDB 17
5
f5532042
TT
6* Support for .gdb_index sections with version less than 7 has been
7 removed.
8
336235a3
SM
9* Support for Guile 2.0 has been removed. Guile 2.2 is now the minimal
10 supported Guile version.
7f5aab36 11
e5e76451
MW
12* GDB now accepts --no-escape-args as an alternative to --args on the
13 command line. GDB will not escape special shell characters within
14 arguments after --no-escape-args.
15
16* gdbserver now accepts --no-escape-args as a command line flag. When
17 this flag is used gdbserver will not escape special shell characters
18 within the inferior arguments.
19
1b28027e
AB
20* The add-inferior, clone-inferior, and MI -add-inferior commands will
21 now give a warning, and create the new inferior without a
22 connection, when the current inferior's connection, at the time the
23 command is given, is unshareable. For example, the core-file target
24 cannot be shared between inferiors, nor can the Window native
25 target. These targets could never really be shared. Attempting to
26 share them would usually lead to GDB crashing. GDB now prevents
27 this invalid sharing.
28
82338461
AB
29* When connecting to a remote server, if the server supports the new
30 qExecAndArgs packet, then GDB will copy the argument string from the
31 server and update the 'args' setting, as if 'set args ...' had been
32 used. This means that the arguments are visible from GDB using
33 'show args', and that, if using the extended-remote protocol,
34 subsequent runs of the inferior will use the same arguments as the
35 first run.
36
eaea19f9
GL
37* Support for stabs debug information has been removed.
38
39591526
GL
39* Support for the binary file format dbx has been removed.
40
0a91f1a8
AB
41* When connected to an extended-remote target GDB can now
42 automatically set the 'remote exec-file' in some cases. GDB will
43 auto set the remote exec-file only if the remote wasn't started with
44 an executable, and the user hasn't used 'set remote exec-file' to
45 set an executable. GDB will auto set the remote exec-file using the
46 current executable if the current executable has a 'target:' prefix,
47 or if the current executable is within the sysroot.
48
ccd56e22
AB
49* GDB now adds all type symbols to the .gdb_index section. The index
50 version number has not increased as a consequence of this change.
51 This fixes an issue where GDB could fail to find a type when relying
52 on the index. Any existing indexes should be regenerated.
994bc098 53* Support for Floating Point Mode Register (FPMR) in AArch64.
ccd56e22 54
c8af46a9
GKB
55* New targets
56
57GNU/Linux/MicroBlaze (gdbserver) microblazeel-*linux*
58
84dd63f3
AB
59* New commands
60
d78cb23f
TT
61set local-environment
62show local-environment
63unset local-environment
64 Analogs of the existing "environment" commands that affect GDB's own
65 environment. The local environment is used by "shell", "pipe", and
66 other commands that launch a subprocess other than an inferior.
67
84dd63f3
AB
68maintenance test-remote-args ARGS
69 Test splitting and joining of inferior arguments ARGS as they would
70 be split and joined when being passed to a remote target.
71
255a9c42
AB
72set progress-bars enabled on|off
73show progress-bars enabled
74 Allows the progress bars, used when debuginfod is downloading
75 content, to be disabled (the set command), or to see if
76 progress-bars are currently enabled or not (the show command).
77
ace1656d
AB
78* Changed commands
79
80maintenance info program-spaces
81 This command no longer displays the core file name.
82
1c760c00
AB
83info inferiors
84 If an inferior has a core file loaded, then this will be displayed
85 as an additional line under the inferior's table entry in the
86 output.
87
1518f2e0
GL
88New command class for help
89 The new command class "essential" has been added, which is a set of
90 commands that we, as developers, believe would be close to a minimal
91 set of commands for a new user of GDB.
92
8e28eef6
AB
93* Changed remote packets
94
95single-inf-arg in qSupported
96 The new single-inf-arg feature within the qSupported packet allows
97 GDB to inform the stub that it would like to send the inferior
98 arguments as a single string within the vRun packet. The stub can
99 reply with the single-inf-arg feature to indicate that it is able to
100 accept arguments as a single string.
101
82338461
AB
102* New remote packets
103
104qExecAndArgs
105 This packet returns the executable filename and argument string with
106 which the server was started. If no such information was given to
107 the server then this is reflected in the reply.
108
49e4d0cd
AB
109* Python API
110
111 ** New class gdb.Style for representing styles, a collection of
112 foreground and background gdb.Color objects, and an intensity.
113
114 ** New constants gdb.INTENSITY_NORMAL, gdb.INTENSITY_BOLD, and
115 gdb.INTENSITY_DIM for use with gdb.Style when representing
116 intensities.
117
d5214580
AB
118 ** New gdb.StyleParameterSet for creating custom style settings.
119 Use gdb.StyleParameterSet(NAME) to create 'set style NAME ...'
120 and 'show style NAME ...' parameters.
121
3c724596
AB
122 ** The gdb.write() function now takes an additional, optional,
123 'style' argument, which can be used to style the output.
124
7862554b
AB
125 ** New gdb.Corefile class which represents a loaded core file. This
126 has an attribute Corefile.filename, the file name of the loaded
127 core file, and a method Corefile.is_valid(), which returns False
128 when a Corefile object becomes invalid (e.g. when the core file
f69c1d03
AB
129 is unloaded). There is also Corefile.mapped_files() which
130 returns a list of CorefileMappedFile objects, representing files
131 that were mapped into the core file when it was created.
132
133 ** New gdb.CorefileMappedFile type representing a file that was
134 mapped when the core file was created. Has read-only attributes
135 filename (string), build_id (string), is_main_executable
136 (boolean), and regions (list of CorefileMappedFileRegion objects).
137
138 ** New gdb.CorefileMappedFileRegion type, which represents a mapped
139 region of a file (see gdb.CorefileMappedFile above). Has
140 read-only attributes start, end, and file_offset.
7862554b
AB
141
142 ** New Inferior.corefile attribute. This read only attribute
143 contains the gdb.Corefile object if a core file is loaded into
144 the inferior, otherwise, this contains None.
145
97cef9bf
TJB
146* Guile API
147
148 ** Procedures 'memory-port-read-buffer-size',
149 'set-memory-port-read-buffer-size!', 'memory-port-write-buffer-size',
150 and 'set-memory-port-write-buffer-size!' have been removed. They were
151 deprecated since GDB 10. Users who need to control the size of a
152 memory port's internal buffer can use the 'setvbuf' procedure.
153
13745a6c 154*** Changes in GDB 17
ff921dfb 155
7a8821ff
CS
156* Debugging Linux programs that use x86-64 or x86-64 with 32-bit pointer
157 size (X32) Shadow Stacks are now supported.
158
63b862be
CS
159* Support for the shadow stack pointer register on x86-64 or x86-64 with
160 32-bit pointer size (X32) GNU/Linux.
161
9882e2bc 162* Debugger Adapter Protocol changes
163
164 ** GDB now supports the "completions" request.
165
6447969d
AP
166* "set style" commands now supports numeric format for basic colors
167 from 0 to 255 and #RRGGBB format for TrueColor.
168
169* New built-in convenience variable $_colorsupport provides comma-separated
170 list of color space names supported by terminal. Each color space name is one
171 of monochrome, ansi_8color, aixterm_16color, xterm_256color or rgb_24bit.
172 It is handy for conditionally using styling colors based on terminal features.
173 For example:
174
175 (gdb) if $_regex ($_colorsupport, ".*(^|,)rgb_24bit($|,).*")
176 >set style filename background #FACADE
177 >else
178 >if $_regex ($_colorsupport, ".*(^|,)xterm_256color($|,).*")
179 >set style filename background 224
180 >else
181 >set style filename background red
182 >end
183 >end
184
a4451f7c
TBA
185* UST (static tracepoint) support from gdbserver has been removed.
186
12902259
KB
187* Linux checkpoint code has been updated to work with multiple inferiors.
188
71f193a5
AB
189* The gcore and gdb-add-index scripts now have a -v or --version
190 option, which prints the version number, and then exits. As well as
191 a -h or --help option, which prints each options and a brief
192 description.
56252b7c 193
b655a89f
PA
194* The gcore script now has a -g option that lets you specify the GDB
195 binary invoked by gcore.
196
9dbef4c2 197* On systems that support linker namespaces, the output of the command
29bff238
GL
198 "info sharedlibraries" may add one more column, NS, which identifies the
199 namespace into which the library was loaded, if more than one namespace
200 is active.
201
46373d8d 202* New built-in convenience variables $linker_namespace_count and
96662aac 203 $_linker_namespace. These show the number of active linker
6a0da68c 204 namespaces, and the namespace to which the current location belongs to.
46373d8d
GL
205 In systems that don't support linker namespaces, or if the inferior hasn't
206 started yet, these always return the integer 0.
6a0da68c 207
91eee81d
AB
208* The 'org.gnu.gdb.i386.linux' target description feature can now
209 contain three additional registers which provide access to the TLS
210 related GDT entries on i386 (and x86-64 when compiling with -m32).
211
1a8f9fea 212* Add record full support for rv64gc architectures
b9c7eed0 213
d0bc36ab
TJB
214* Debugging Linux programs that use AArch64 Guarded Control Stacks is now
215 supported.
216
6ac9f565
PA
217* New "--binary-output" command line option instructs GDB to set the
218 translation mode of its stdout/stderr to binary mode. This disables
219 Line Feed translation. MS-Windows only.
220
52bb1ca3
TG
221* The "catch syscall" command now works on riscv*-linux* targets.
222
0d70c008
TT
223* New commands
224
225maintenance check psymtabs
226 Renamed from maintenance check-psymtabs
227
228maintenance check symtabs
229 Renamed from maintenance check-symtabs
230
e5e619ac
TT
231maintenance canonicalize
232 Show the canonical form of a C++ name.
233
2047479c
CW
234set riscv numeric-register-names on|off
235show riscv numeric-register-names
236 Controls whether GDB refers to risc-v registers by their numeric names
237 (e.g 'x1') or their abi names (e.g. 'ra').
238 Defaults to 'off', matching the old behaviour (abi names).
239
a048980c
TT
240set style emoji on|off|auto
241show style emoji
242 Controls whether GDB can display emoji. The default is "auto",
243 which means emoji will be displayed in some situations when
244 the host charset is UTF-8.
245
246set style warning-prefix STRING
247set style error-prefix STRING
248 These commands control the prefix that is printed before warnings
249 and errors, respectively. This functionality is intended for use
250 with emoji display, and so the prefixes are only displayed if emoji
251 styling is enabled.
252
dbbb9cfd
GL
253info linker-namespaces
254info linker-namespaces [[N]]
255 Print information about the given linker namespace (identified as N),
256 or about all the namespaces if no argument is given.
257
b0196f0c
AB
258set remote multiple-watchpoint-addresses-packet
259show remote multiple-watchpoint-addresses-packet
260 Set/show the support for receiving multiple watchpoint addresses in
261 the 'T' stop reply packet.
262
65addfb0
AB
263* Changed commands
264
265info sharedlibrary
266 On Linux and FreeBSD, the addresses shown in the output of this
267 command are now for the full memory range allocated to the shared
268 library.
269
be437614
TBA
270info threads [-gid] [-stopped] [-running] [ID]...
271 If no threads match the given ID(s) or filter options, GDB now prints
0ea1e5df
TBA
272
273 No threads matched.
274
be437614
TBA
275 without printing the provided arguments. The newly added '-stopped'
276 option makes GDB list the stopped threads only. Similarly,
277 '-running' makes GDB list the running threads only. If both options
278 are given together, both stopped and running threads are listed.
279 These new flags can be useful to get a reduced list when there is a
280 large number of threads.
0ea1e5df 281
0f85f277
KB
282* GDB-internal Thread Local Storage (TLS) support
283
284 ** Linux targets for the x86_64, aarch64, ppc64, s390x, and riscv
285 architectures now have GDB-internal support for TLS address
286 lookup in addition to that traditionally provided by the
287 libthread_db library. This internal support works for programs
288 linked against either the GLIBC or MUSL C libraries. For
289 programs linked against MUSL, this new internal support provides
290 new debug functionality, allowing access to TLS variables, due to
291 the fact that MUSL does not implement the libthread_db library.
292 Internal TLS support is also useful in cross-debugging
293 situations, debugging statically linked binaries, and debugging
294 programs linked against GLIBC 2.33 and earlier, but which are not
295 linked against libpthread.
296
297 ** The command 'maint set force-internal-tls-address-lookup on' may
298 be used to force the internal TLS lookup mechanisms to be used.
299 Otherwise, TLS lookup via libthread_db will still be preferred,
300 when available.
301
6447969d
AP
302* Python API
303
d61186d8
TT
304 ** GDB no longer supports Python versions less than 3.4.
305
6447969d
AP
306 ** New class gdb.Color for dealing with colors.
307
308 ** New constant gdb.PARAM_COLOR represents color type of a
309 gdb.Parameter.value. Parameter's value is gdb.Color instance.
310
d21f28a0
AB
311 ** The memory_source argument (the second argument) has been removed
312 from gdb.disassembler.builtin_disassemble. This argument was
050c30f4
AB
313 never used by GDB, and was added by mistake. The unused argument
314 was never documented in the GDB manual, so users should not have
315 been using it.
d21f28a0 316
e5348a7a
AB
317 ** gdb.execute has an additional 'styling' argument. When True, then
318 output will be styled. The default for this argument is True
319 when output is going to standard output, and False when output is
320 going to a string.
321
4b68d4ac
AB
322 ** Setting the documentation string (__doc__) of a gdb.Parameter
323 sub-class to the empty string, means GDB will only display the
324 set_doc or show_doc strings in the set/show help output.
325
ef8bee09
AB
326 ** New gdb.ParameterPrefix class. This can be used to create 'set'
327 and 'show' gdb.Command prefixes, suitable for use with new
328 gdb.Parameters.
329
0b5023cc
AB
330 ** Prefix commands (gdb.Command sub-classes) that don't have an
331 invoke method will now behave like builtin prefix commands when
332 invoked without a sub-command name. This means printing the help
333 text for all sub-commands, unless the prefix command is a 'show'
334 command, in which case the value of all sub-commands is printed.
335
d8e6b67b
AB
336 ** New gdb.warning() function that takes a string and prints it as a
337 warning, with GDB's standard 'warning' prefix.
338
b652ce7b
AB
339 ** New attribute gdb.Value.is_unavailable, this checks for
340 unavailability like gdb.Value.is_optimized_out checks for
341 optimized out values.
342
6447969d
AP
343* Guile API
344
345 ** New type <gdb:color> for dealing with colors.
346
347 ** New constant PARAM_COLOR represents color type of a value
348 of a <gdb:parameter> object. Parameter's value is <gdb::color> instance.
349
a0f6a1fd
AB
350 ** Eliding the #:doc string from make-parameter now means that GDB
351 will use a default documentation string. Setting #:doc to the
352 empty string for make-parameter means GDB will only display the
353 #:set_doc or #:show_doc strings in the set/show help output.
354
0b5023cc
AB
355 ** Prefix commands (using make-command) that don't have a #:invoke
356 property will now behave like builtin prefix commands when
357 invoked without a sub-command name. This means printing the help
358 text for all sub-commands, unless the prefix command is a 'show'
359 command, in which case the value of all sub-commands is printed.
360
9b381fd1
AB
361* New remote packets
362
363binary-upload in qSupported reply
364 If the stub sends back 'binary-upload+' in it's qSupported reply,
365 then GDB will, where possible, make use of the 'x' packet. If the
366 stub doesn't report this feature supported, then GDB will not use
367 the 'x' packet.
368
2c91540a
AB
369vFile:lstat
370 Return information about files on the remote system. Like
371 vFile:stat but if the filename is a symbolic link, return
372 information about the link itself, the file the link refers to.
373
1dd0c745
TBA
374* Changed remote packets
375
376qXfer:threads:read
377 The XML that is sent as a response can now include an "id_str"
378 attribute for a thread element. The attribute indicates what GDB
379 should print as the target ID of the thread, for example in the
380 "info threads" command or when switching to the thread.
381
c29a37f7
AB
382vFile:stat
383 Previously, gdbserver incorrectly implemented this packet using
384 lstat rather than stat. This has now been corrected. The
385 documentation has also been clarified.
386
b0196f0c
AB
387T
388 The signal stop packet can now include multiple 'watch', 'rwatch',
389 and 'awatch' stop reason entries. GDB will select between all of
390 the possible watchpoint addresses that are returned when presenting
391 the stop to the user.
392
393multi-wp-addr in qSupported
394 The qSupported packet allows GDB to inform the stub it supports
395 receiving multiple watchpoint stop reasons in a single 'T' stop
396 reply packet. This improves support for targets with ambiguous
397 hardware watchpoint address reporting (e.g. AArch64). GDB will
398 always accept multiple watchpoint addresses regardless of whether
399 the stub claims to support this feature or not.
400
11bd5aef
AB
401* MI changes
402
403** The =library-unloaded event now includes the 'ranges' field, which
404 has the same meaning as for the =library-loaded event.
405
406** The =library-unloaded event now includes the 'still-in-use' field.
407 This field is 'true' when a library is unloaded (removed from the
408 inferior's list of loaded libraries), but the mapping within the
409 inferior's address space is retained, as the library was mapped
410 multiple times, and the same mapping was being reused. In all
411 other cases, this field will have the value 'false'.
412
f35bb15b
GL
413* Support for stabs debugging format and the a.out/dbx object format is
414 deprecated, and will be removed in GDB 18.
415
809c1abc
GL
416* Configure changes
417
418--enable-binary-file-formats=[FORMAT,...]
419--enable-binary-file-formats=all
420 A user can now decide to only compile support for certain file formats.
421 The available formats at this point are: dbx, coff, xcoff, elf, mach-o
422 and mips. Some targets require specific file formats to be available,
423 and in such cases, the configure script will warn the user and add
424 support anyway. By default, all formats will be compiled in, to
425 continue the behavior from before adding the switch.
426
c4375bc5
GL
427* A new configure option was added, allowing support for the compile
428 subsystem to be disabled at configure time, in the form of
429 --disable-gdb-compile.
430
4b42385c
GL
431* A new configure option was added, allowing support for DWARF debug
432 information to be disabled at configure time. The flag is
433 --disable-gdb-dwarf-support.
434
5cbfbe42
GL
435* A new configure option was added, allowing support for mdebug/ecoff
436 debug information to be disabled at configure time. The flag to do
437 that is --disable-gdb-mdebug-support.
438
fb2b6256
YE
439* The Alpha target now supports target descriptions.
440
ff921dfb 441*** Changes in GDB 16
bdc10cde 442
7b55df8e
SL
443* Support for Nios II targets has been removed as this architecture
444 has been EOL'ed by Intel.
445
27e82ad6
CS
446* GDB now supports watchpoints for tagged data pointers (see
447 https://en.wikipedia.org/wiki/Tagged_pointer) on amd64, such as the
448 one used by the Linear Address Masking (LAM) feature provided by
449 Intel.
450
fc143432
SC
451* Debugging support for Intel MPX has been removed. This includes the
452 removal of
453 ** MPX register support
454 ** the commands "show/set mpx bound" (deprecated since GDB 15)
455 ** i386 and amd64 implementation of the hooks report_signal_info and
456 get_siginfo_type.
457
13b3a89b
FW
458* GDB now supports printing of asynchronous events from the Intel Processor
459 Trace during 'record instruction-history', 'record function-call-history'
460 and all stepping commands. This can be controlled with the new
461 "set record btrace pt event-tracing" command.
462
3bf62223
FW
463* GDB now supports printing of ptwrite payloads from the Intel Processor
464 Trace during 'record instruction-history', 'record function-call-history'
465 and all stepping commands. The payload is also accessible in Python as a
466 RecordAuxiliary object. Printing is customizable via a ptwrite filter
467 function in Python. By default, the raw ptwrite payload is printed for
468 each ptwrite that is encountered.
469
c6b48675
AB
470* For breakpoints that are created in the 'pending' state, any
471 'thread' or 'task' keywords are parsed at the time the breakpoint is
472 created, rather than at the time the breakpoint becomes non-pending.
473
6cce0251
AB
474* Thread-specific breakpoints are only inserted into the program space
475 in which the thread of interest is running. In most cases program
476 spaces are unique for each inferior, so this means that
477 thread-specific breakpoints will usually only be inserted for the
478 inferior containing the thread of interest. The breakpoint will
479 be hit no less than before.
480
be23e442
TV
481* For ARM targets, the offset of the pc in the jmp_buf has been fixed to match
482 glibc 2.20 and later. This should only matter when not using libc probes.
483 This may cause breakage when using an incompatible libc, like uclibc or
484 newlib, or an older glibc.
485
b782c65b
GR
486* MTE (Memory Tagging Extension) debugging is now supported on AArch64 baremetal
487 targets.
488
ac56938e
SM
489* Remove support (native and remote) for QNX Neutrino (triplet
490 `i[3456]86-*-nto*`).
491
08919701
GL
492* In a record session, when a forward emulation reaches the end of the reverse
493 history, the warning message has been changed to indicate that the end of the
494 history has been reached. It also specifies that the forward execution can
495 continue, and the recording will also continue.
496
04ce6b03
TT
497* The Ada 'Object_Size attribute is now supported.
498
7ffa83b3
HL
499* Support for process record/replay and reverse debugging on loongarch*-linux*
500 targets has been added.
501
fb2ded33
KS
502* New bash script gstack uses GDB to print stack traces of running processes.
503
b6900dc7
AB
504* Python API
505
506 ** Added gdb.record.clear. Clears the trace data of the current recording.
507 This forces re-decoding of the trace for successive commands.
508
76367d23
TT
509 ** Added the new event source gdb.tui_enabled.
510
5cabc809
AB
511 ** New module gdb.missing_objfile that facilitates dealing with
512 missing objfiles when opening a core-file.
513
514 ** New function gdb.missing_objfile.register_handler that can
515 register an instance of a sub-class of
516 gdb.missing_debug.MissingObjfileHandler as a handler for missing
517 objfiles.
518
519 ** New class gdb.missing_objfile.MissingObjfileHandler which can be
520 sub-classed to create handlers for missing objfiles.
521
5209b83f
AB
522 ** The 'signed' argument to gdb.Architecture.integer_type() will no
523 longer accept non-bool types.
524
ad39b4aa
AB
525 ** The gdb.MICommand.installed property can only be set to True or
526 False.
527
8518ce5f
AB
528 ** The 'qualified' argument to gdb.Breakpoint constructor will no
529 longer accept non-bool types.
530
9ba5ef4b
TT
531 ** Added the gdb.Symbol.is_artificial attribute.
532
5166ed9c
JV
533 ** Added gdb.Block.subblocks. Returns a list of blocks contained in that
534 block.
535
30243af8
JV
536 ** Added gdb.Symbol.domain. Contains the domain of the symbol.
537
13dad2fe
JV
538 ** Added gdb.Architecture.void_type. Returns a gdb.Type representing "void"
539 type for that architecture.
540
b6900dc7
AB
541* Debugger Adapter Protocol changes
542
543 ** The "scopes" request will now return a scope holding global
544 variables from the stack frame's compilation unit.
545
546 ** The "scopes" request will return a "returnValue" scope holding
547 the return value from the latest "stepOut" command, when
548 appropriate.
549
6b9efd5c
TT
550 ** The "launch" and "attach" requests were rewritten in accordance
551 with some clarifications to the spec. Now they can be sent at
552 any time after the "initialized" event, but will not take effect
553 (or send a response) until after the "configurationDone" request
554 has been sent.
555
9ba5ef4b
TT
556 ** The "variables" request will not return artificial symbols.
557
56260065
AB
558* New commands
559
29e316d8
TT
560show jit-reader-directory
561 Show the name of the directory that "jit-reader-load" uses for
562 relative file names.
563
887ae0cf
TT
564set style line-number foreground COLOR
565set style line-number background COLOR
566set style line-number intensity VALUE
567 Control the styling of line numbers printed by GDB.
568
9e69a2e1
TT
569set style command foreground COLOR
570set style command background COLOR
571set style command intensity VALUE
572 Control the styling of GDB commands when displayed by GDB.
573
27e69fa7
TT
574set style title foreground COLOR
575set style title background COLOR
576set style title intensity VALUE
577 This style now applies to the header line of lists, for example the
578 first line of the output of "info breakpoints". Previous uses of
579 this style have been replaced with the new "command" style.
580
218ee166
TT
581set warn-language-frame-mismatch [on|off]
582show warn-language-frame-mismatch
583 Control the warning that is emitted when specifying a language that
584 does not match the current frame's language.
585
56260065
AB
586maintenance info inline-frames [ADDRESS]
587 New command which displays GDB's inline-frame information for the
588 current address, or for ADDRESS if specified. The output identifies
589 inlined frames which start at the specified address.
590
be85cdf4
AB
591maintenance info blocks [ADDRESS]
592 New command which displays information about all of the blocks at
593 ADDRESS, or at the current address if ADDRESS is not given. Blocks
594 are listed starting at the inner global block out to the most inner
595 block.
596
b49f56d0
GL
597maintenance frame-unwinder disable [-all | -name NAME | [-class] CLASS]
598maintenance frame-unwinder enable [-all | -name NAME | [-class] CLASS]
599 Enable or disable frame unwinders. This is only meant to be used when
600 testing unwinders themselves, and you want to ensure that a fallback
601 algorithm won't obscure a regression. GDB is not expected to behave
602 well if you try to execute the inferior with unwinders disabled.
603
5cabc809
AB
604info missing-objfile-handlers
605 List all the registered missing-objfile handlers.
606
607enable missing-objfile-handler LOCUS HANDLER
608disable missing-objfile-handler LOCUS HANDLER
609 Enable or disable a missing-objfile handler with a name matching the
610 regular expression HANDLER, in LOCUS.
611
612 LOCUS can be 'global' to operate on global missing-objfile handler,
613 'progspace' to operate on handlers within the current program space,
614 or can be a regular expression which is matched against the filename
615 of the primary executable in each program space.
616
d552429e
AB
617* Changed commands
618
619remove-symbol-file
620 This command now supports file-name completion.
621
622remove-symbol-file -a ADDRESS
623 The ADDRESS expression can now be a full expression consisting of
624 multiple terms, e.g. 'function + 0x1000' (without quotes),
625 previously only a single term could be given.
626
03ad29c8
AB
627target core
628target exec
629target tfile
630target ctf
e454ae41
AB
631compile file
632maint print c-tdesc
633save gdb-index
634 These commands now require their filename argument to be quoted if
635 it contains white space or quote characters. If the argument
636 contains no such special characters then quoting is not required.
637
94aedcf7
TJB
638maintenance print remote-registers
639 Add an "Expedited" column to the output of the command. It indicates
640 which registers were included in the last stop reply packet received by
641 GDB.
642
add18b78 643maintenance info frame-unwinders
ce36ef63
GL
644 Add a CLASS column to the output. This class is a somewhat arbitrary
645 grouping of unwinders, based on which area of GDB adds the unwinder.
b49f56d0
GL
646 Also add an ENABLED column, that will show if the unwinder is enabled
647 or not.
648
649maintenance set dwarf unwinders (on|off)
650 This command has been removed because the same functionality can be
651 achieved with maint frame-unwinder (enable|disable) DEBUGINFO.
652
653maintenance show dwarf unwinders
654 This command has been removed since the functionality can be achieved
655 by checking the last column of maint info frame-unwinders.
ce36ef63 656
b0c6153c
AB
657show configuration
658 Now includes the version of GNU Readline library that GDB is using.
659
83fbcee1
AB
660* New remote packets
661
662vFile:stat
663 Return information about files on the remote system. Like
664 vFile:fstat but takes a filename rather than an open file
665 descriptor.
666
e16e6389
TBA
667x addr,length
668 Given ADDR and LENGTH, fetch LENGTH units from the memory at address
669 ADDR and send the fetched data in binary format. This packet is
670 equivalent to 'm', except that the data in the response are in
671 binary format.
672
bdc10cde 673*** Changes in GDB 15
bfc57664 674
7650ea38
SC
675* The MPX commands "show/set mpx bound" have been deprecated, as Intel
676 listed MPX as removed in 2019.
677
f74dc267
LS
678* Building GDB and GDBserver now requires a C++17 compiler.
679 For example, GCC 9 or later.
680
93845901 681* GDB index now contains information about the main function. This speeds up
8b9c08ed
MBB
682 startup when it is being used for some large binaries.
683
9b595a26
TT
684* On hosts where threading is available, DWARF reading is now done in
685 the background, resulting in faster startup. This can be controlled
686 using "maint set dwarf synchronous".
687
f3a8a979
AB
688* Changed commands
689
690disassemble
691 Attempting to use both the 'r' and 'b' flags with the disassemble
692 command will now give an error. Previously the 'b' flag would
693 always override the 'r' flag.
694
431a6b09
PA
695gcore
696generate-core-file
697 GDB now generates sparse core files, on systems that support it.
698
528b729b
GL
699maintenance info line-table
700 Add an EPILOGUE-BEGIN column to the output of the command. It indicates
add18b78 701 if the line is considered the start of the epilogue, and thus a point at
528b729b
GL
702 which the frame can be considered destroyed.
703
7879fba3
AB
704set unwindonsignal on|off
705show unwindonsignal
706 These commands are now aliases for the new set/show unwind-on-signal.
707
7a59cf95
AB
708target record-full
709 This command now gives an error if any unexpected arguments are
710 found after the command.
711
e61c7092
GL
712list .
713 When using the command "list ." in a location that has no debug information
714 or no file loaded, GDB now says that there is no debug information to print
715 lines. This makes it more obvious that there is no information, as opposed
716 to implying there is no inferior loaded.
717
8d081332 718* New commands
8f6c452b
AB
719
720info missing-debug-handler
721 List all the registered missing debug handlers.
722
723enable missing-debug-handler LOCUS HANDLER
724disable missing-debug-handler LOCUS HANDLER
725 Enable or disable a missing debug handler with a name matching the
726 regular expression HANDLER, in LOCUS.
727
728 LOCUS can be 'global' to operate on global missing debug handler,
729 'progspace' to operate on handlers within the current program space,
730 or can be a regular expression which is matched against the filename
731 of the primary executable in each program space.
732
8d081332
AB
733maintenance info linux-lwps
734 List all LWPs under control of the linux-nat target.
735
736set remote thread-options-packet
737show remote thread-options-packet
738 Set/show the use of the thread options packet.
739
29f7ef92
AB
740set direct-call-timeout SECONDS
741show direct-call-timeout
742set indirect-call-timeout SECONDS
743show indirect-call-timeout
744 These new settings can be used to limit how long GDB will wait for
745 an inferior function call to complete. The direct timeout is used
746 for inferior function calls from e.g. 'call' and 'print' commands,
747 while the indirect timeout is used for inferior function calls from
748 within a conditional breakpoint expression.
749
750 The default for the direct timeout is unlimited, while the default
751 for the indirect timeout is 30 seconds.
752
753 These timeouts will only have an effect for targets that are
754 operating in async mode. For non-async targets the timeouts are
755 ignored, GDB will wait indefinitely for an inferior function to
756 complete, unless interrupted by the user using Ctrl-C.
757
fe67b242
AB
758set unwind-on-timeout on|off
759show unwind-on-timeout
760 These commands control whether GDB should unwind the stack when a
761 timeout occurs during an inferior function call. The default is
762 off, in which case the inferior will remain in the frame where the
763 timeout occurred. When on, GDB will unwind the stack removing the
764 dummy frame that was added for the inferior call, and restoring the
765 inferior state to how it was before the inferior call started.
766
7879fba3
AB
767set unwind-on-signal on|off
768show unwind-on-signal
769 These new commands replaces the existing set/show unwindonsignal. The
770 old command is maintained as an alias.
771
3bf9e166
AB
772* New features in the GDB remote stub, GDBserver
773
774 ** The --remote-debug and --event-loop-debug command line options
775 have been removed.
776
777 ** The --debug command line option now takes an optional comma
778 separated list of components to emit debug for. The currently
779 supported components are: all, threads, event-loop, and remote.
780 If no components are given then threads is assumed.
781
8fd5a605
AB
782 ** The 'monitor set remote-debug' and 'monitor set event-loop-debug'
783 command have been removed.
784
785 ** The 'monitor set debug 0|1' command has been extended to take a
786 component name, e.g.: 'monitor set debug COMPONENT off|on'.
787 Possible component names are: all, threads, event-loop, and
788 remote.
789
4825fd2d
JV
790* Python API
791
792 ** New function gdb.notify_mi(NAME, DATA), that emits custom
793 GDB/MI async notification.
794
ef8cf909
AB
795 ** New read/write attribute gdb.Value.bytes that contains a bytes
796 object holding the contents of this value.
797
8f6c452b
AB
798 ** New module gdb.missing_debug that facilitates dealing with
799 objfiles that are missing any debug information.
800
801 ** New function gdb.missing_debug.register_handler that can register
802 an instance of a sub-class of gdb.missing_debug.MissingDebugInfo
803 as a handler for objfiles that are missing debug information.
804
805 ** New class gdb.missing_debug.MissingDebugInfo which can be
806 sub-classed to create handlers for objfiles with missing debug
807 information.
808
e187e7c9
TT
809 ** Stop events now have a "details" attribute that holds a
810 dictionary that carries the same information as an MI "*stopped"
811 event.
812
3a12e74e
TT
813 ** New function gdb.interrupt(), that interrupts GDB as if the user
814 typed control-c.
815
76118e16
AB
816 ** New gdb.InferiorThread.ptid_string attribute. This read-only
817 attribute contains the string that appears in the 'Target Id'
818 column of the 'info threads' command output.
819
2f47f48f
AB
820 ** It is no longer possible to create new gdb.Progspace object using
821 'gdb.Progspace()', this will result in a TypeError. Progspace
822 objects can still be obtained through calling other API
823 functions, for example 'gdb.current_progspace()'.
824
13cd9bce
AB
825 ** User defined attributes can be added to a gdb.Inferior object,
826 these will be stored in the object's new Inferior.__dict__
827 attribute.
828
1d586eda
AB
829 ** User defined attributes can be added to a gdb.InferiorThread
830 object, these will be stored in the object's new
831 InferiorThread.__dict__ attribute.
832
7065f073
TT
833 ** New constants gdb.SYMBOL_TYPE_DOMAIN, gdb.SYMBOL_FUNCTION_DOMAIN,
834 and gdb.SEARCH_*_DOMAIN corresponding to all the existing symbol
835 domains. Symbol lookup can now search in multiple domains at
836 once, and can also narrowly search for just a type or function.
837
9a099bc2
TT
838* Debugger Adapter Protocol changes
839
840 ** GDB now emits the "process" event.
841
1c79c8da
TT
842 ** GDB now supports the "cancel" request.
843
eb6476e2
TT
844 ** The "attach" request now supports specifying the program.
845
dfc4bd46
TT
846 ** New command "set debug dap-log-level" controls DAP logging.
847
848 ** The "set debug dap-log-file" command is now documented. This
849 command was available in GDB 14 but not documented.
850
7065f073
TT
851* Guile API
852
853 ** New constants SYMBOL_TYPE_DOMAIN, SYMBOL_FUNCTION_DOMAIN, and
854 SEARCH_*_DOMAIN corresponding to all the existing symbol domains.
855 Symbol lookup can now search in multiple domains at once, and can
856 also narrowly search for just a type or function.
857
b11df22a
PA
858* New remote packets
859
860New stop reason: clone
861 Indicates that a clone system call was executed.
862
863QThreadOptions
864 Enable/disable optional event reporting, on a per-thread basis.
865 Currently supported options are GDB_THREAD_OPTION_CLONE, to enable
866 clone event reporting, and GDB_THREAD_OPTION_EXIT to enable thread
867 exit event reporting.
868
869QThreadOptions in qSupported
870 The qSupported packet allows GDB to inform the stub it supports the
871 QThreadOptions packet, and the qSupported response can contain the
872 set of thread options the remote stub supports.
873
0e6747d2
GR
874qIsAddressTagged
875 This new packet allows GDB to query the stub about a given address to check
876 if it is tagged or not. Many memory tagging-related GDB commands need to
877 perform this check before they read/write the allocation tag related to an
878 address. Currently, however, this is done through a 'vFile' request to read
879 the file /proc/<PID>/smaps and check if the address is in a region reported
880 as memory tagged. Since not all targets have a notion of what the smaps
881 file is about, this new packet provides a more generic way to perform such
882 a check.
883
bfc57664 884*** Changes in GDB 14
4ff87a30 885
cacc7bd7
LM
886* GDB now supports the AArch64 Scalable Matrix Extension 2 (SME2), which
887 includes a new 512 bit lookup table register named ZT0.
888
6762e153
LM
889* GDB now supports the AArch64 Scalable Matrix Extension (SME), which includes
890 a new matrix register named ZA, a new thread register TPIDR2 and a new vector
891 length register SVG (streaming vector granule). GDB also supports tracking
892 ZA state across signal frames.
893
894 Some features are still under development or are dependent on ABI specs that
895 are still in alpha stage. For example, manual function calls with ZA state
896 don't have any special handling, and tracking of SVG changes based on
897 DWARF information is still not implemented, but there are plans to do so in
898 the future.
899
4ebfd53d
TT
900* GDB now recognizes the NO_COLOR environment variable and disables
901 styling according to the spec. See https://no-color.org/.
902 Styling can be re-enabled with "set style enabled on".
903
acdf6071
LM
904* The AArch64 'org.gnu.gdb.aarch64.pauth' Pointer Authentication feature string
905 has been deprecated in favor of the 'org.gnu.gdb.aarch64.pauth_v2' feature
906 string.
907
303a881f
TT
908* GDB now has some support for integer types larger than 64 bits.
909
2eb26135
AVK
910* Removed targets and native configurations
911
912 GDB no longer supports AIX 4.x, AIX 5.x and AIX 6.x. The minimum supported
913 AIX version is now AIX 7.1.
914
ff52c073
CS
915* Multi-target feature configuration
916
917 GDB now supports the individual configuration of remote targets' feature
918 sets. Based on the current selection of a target, the commands 'set remote
919 <name>-packet (on|off|auto)' and 'show remote <name>-packet' can be used to
920 configure a target's feature packet and to display its configuration,
921 respectively.
922
fe4c3ca0
CS
923 The individual packet sizes can be configured and shown using the commands
924 ** 'set remote memory-read-packet-size (number of bytes|fixed|limit)'
925 ** 'set remote memory-write-packet-size (number of bytes|fixed|limit)'
926 ** 'show remote memory-read-packet-size'
927 ** 'show remote memory-write-packet-size'.
928
929 The configuration of the packet itself, as well as the size of a memory-read
930 or memory-write packet applies to the currently selected target (if
931 available). If no target is selected, it applies to future remote
ff52c073
CS
932 connections. Similarly, the show commands print the configuration of the
933 currently selected target. If no remote target is selected, the default
934 configuration for future connections is shown.
935
de7d7cb5
TT
936* GDB has initial built-in support for the Debugger Adapter Protocol.
937 This support requires that GDB be built with Python scripting
938 enabled.
939
980dbf36
AB
940* For the break command, multiple uses of the 'thread' or 'task'
941 keywords will now give an error instead of just using the thread or
942 task id from the last instance of the keyword. E.g.:
943 break foo thread 1 thread 2
944 will now give an error rather than using 'thread 2'.
945
946* For the watch command, multiple uses of the 'task' keyword will now
947 give an error instead of just using the task id from the last
948 instance of the keyword. E.g.:
949 watch my_var task 1 task 2
950 will now give an error rather than using 'task 2'. The 'thread'
951 keyword already gave an error when used multiple times with the
952 watch command, this remains unchanged.
953
a0c07915
AB
954* The 'set print elements' setting now helps when printing large arrays.
955 If an array would otherwise exceed max-value-size, but 'print elements'
956 is set such that the size of elements to print is less than or equal
957 to 'max-value-size', GDB will now still print the array, however only
958 'max-value-size' worth of data will be added into the value history.
959
0a9ccb9d
AB
960* For both the break and watch commands, it is now invalid to use both
961 the 'thread' and 'task' keywords within the same command. For
add18b78 962 example the following commands will now give an error:
0a9ccb9d
AB
963 break foo thread 1 task 1
964 watch var thread 2 task 3
965
901682e4
AB
966* The printf command now accepts a '%V' output format which will
967 format an expression just as the 'print' command would. Print
8f6606b6 968 options can be placed within '[...]' after the '%V' to modify how
901682e4
AB
969 the value is printed. E.g:
970 printf "%V", some_array
971 printf "%V[-array-indexes on]", some_array
972 will print the array without, or with array indexes included, just
973 as the array would be printed by the 'print' command. This
974 functionality is also available for dprintf when dprintf-style is
975 'gdb'.
976
13f5f57e
AB
977* When the printf command requires a string to be fetched from the
978 inferior, GDB now uses the existing 'max-value-size' setting to the
979 limit the memory allocated within GDB. The default 'max-value-size'
980 is 64k. To print longer strings you should increase
981 'max-value-size'.
982
22f6f797
TT
983* The Ada 2022 Enum_Rep and Enum_Val attributes are now supported.
984
b3a27d2f
TT
985* The Ada 2022 target name symbol ('@') is now supported by the Ada
986 expression parser.
987
3e3a1874 988* The 'list' command now accepts '.' as an argument, which tells GDB to
12f567bc
GL
989 print the location around the point of execution within the current frame.
990 If the inferior hasn't started yet, the command will print around the
991 beginning of the 'main' function.
3e3a1874 992
f52625f1
BL
993* Using the 'list' command with no arguments in a situation where the
994 command would attempt to list past the end of the file now warns the
995 user that the end of file has been reached, refers the user to the
996 newly added '.' argument
997
b080fe54
AB
998* Breakpoints can now be inferior-specific. This is similar to the
999 existing thread-specific breakpoint support. Breakpoint conditions
1000 can include the 'inferior' keyword followed by an inferior id (as
1001 displayed in the 'info inferiors' output). It is invalid to use the
1002 'inferior' keyword with either the 'thread' or 'task' keywords when
1003 creating a breakpoint.
1004
9a896be3
AB
1005* New convenience function "$_shell", to execute a shell command and
1006 return the result. This lets you run shell commands in expressions.
1007 Some examples:
1008
1009 (gdb) p $_shell("true")
1010 $1 = 0
1011 (gdb) p $_shell("false")
1012 $2 = 1
1013 (gdb) break func if $_shell("some command") == 0
1014
740ce350
TJB
1015* Configure changes
1016
1017--additional-debug-dirs=PATHs
1018
1019 Provide a colon-separated list of additional directories to search for
1020 separate debug info. These directories are added to the default value of
1021 the 'debug-file-directory' GDB parameter.
1022
e24d337e
BL
1023* New commands
1024
3cdc2d7e
MS
1025set debug breakpoint on|off
1026 show debug breakpoint
1027 Print additional debug messages about breakpoint insertion and removal.
1028
e24d337e
BL
1029maintenance print record-instruction [ N ]
1030 Print the recorded information for a given instruction. If N is not given
1031 prints how GDB would undo the last instruction executed. If N is negative,
1032 prints how GDB would undo the N-th previous instruction, and if N is
1033 positive, it prints how GDB will redo the N-th following instruction.
1034
be016879
TV
1035maintenance info frame-unwinders
1036 List the frame unwinders currently in effect, starting with the highest
1037 priority.
1038
f0c3dcc1
TT
1039maintenance wait-for-index-cache
1040 Wait until all pending writes to the index cache have completed.
1041
0d5adb56
TV
1042set always-read-ctf on|off
1043show always-read-ctf
1044 When off, CTF is only read if DWARF is not present. When on, CTF is
1045 read regardless of whether DWARF is present. Off by default.
1046
03d83cd5
RB
1047info main
1048 Get main symbol to identify entry point into program.
1049
0f6a6994
MG
1050set tui mouse-events [on|off]
1051show tui mouse-events
1052 When on (default), mouse clicks control the TUI and can be accessed by
1053 Python extensions. When off, mouse clicks are handled by the terminal,
1054 enabling terminal-native text selection.
1055
37f54063
BL
1056* MI changes
1057
9a896be3
AB
1058** MI version 1 has been removed.
1059
37f54063
BL
1060** mi now reports 'no-history' as a stop reason when hitting the end of the
1061 reverse execution history.
1062
2fd9a436
AB
1063** When creating a thread-specific breakpoint using the '-p' option,
1064 the -break-insert command would report the 'thread' field twice in
1065 the reply. The content of both fields was always identical. This
1066 has now been fixed; the 'thread' field will be reported just once
1067 for thread-specific breakpoints, or not at all for breakpoints
1068 without a thread restriction. The same is also true for the 'task'
1069 field of an Ada task-specific breakpoint.
1070
00cdd79a
AB
1071** It is no longer possible to create a thread-specific breakpoint for
1072 a thread that doesn't exist using '-break-insert -p ID'. Creating
1073 breakpoints for non-existent threads is not allowed when using the
1074 CLI, that the MI allowed it was a long standing bug, which has now
1075 been fixed.
1076
51f8dafb
GR
1077** The '--simple-values' argument to the '-stack-list-arguments',
1078 '-stack-list-locals', '-stack-list-variables', and '-var-list-children'
1079 commands now takes reference types into account: that is, a value is now
1080 considered simple if it is neither an array, structure, or union, nor a
1081 reference to an array, structure, or union. (Previously all references were
1082 considered simple.) Support for this feature can be verified by using the
1083 '-list-features' command, which should contain "simple-values-ref-types".
1084
b080fe54
AB
1085** The -break-insert command now accepts a '-g thread-group-id' option
1086 to allow for the creation of inferior-specific breakpoints.
1087
1088** The bkpt tuple, which appears in breakpoint-created notifications,
1089 and in the result of the -break-insert command can now include an
1090 optional 'inferior' field for both the main breakpoint, and each
1091 location, when the breakpoint is inferior-specific.
1092
6bf5f25b
AB
1093* Python API
1094
28ab5960
SF
1095 ** gdb.ThreadExitedEvent added. Emits a ThreadEvent.
1096
6bf5f25b
AB
1097 ** The gdb.unwinder.Unwinder.name attribute is now read-only.
1098
1099 ** The name argument passed to gdb.unwinder.Unwinder.__init__ must
1100 now be of type 'str' otherwise a TypeError will be raised.
1101
1102 ** The gdb.unwinder.Unwinder.enabled attribute can now only accept
1103 values of type 'bool'. Changing this attribute will now
1104 invalidate GDB's frame-cache, which means GDB will need to
1105 rebuild its frame-cache when next required - either with, or
1106 without the particular unwinder, depending on how 'enabled' was
1107 changed.
1108
86b35b71 1109 ** New methods added to the gdb.PendingFrame class. These methods
ac51afb5 1110 have the same behavior as the corresponding methods on
86b35b71
AB
1111 gdb.Frame. The new methods are:
1112
1113 - gdb.PendingFrame.name: Return the name for the frame's
1114 function, or None.
1115 - gdb.PendingFrame.is_valid: Return True if the pending frame
1116 object is valid.
1117 - gdb.PendingFrame.pc: Return the $pc register value for this
1118 frame.
1119 - gdb.PendingFrame.language: Return a string containing the
1120 language for this frame, or None.
1121 - gdb.PendingFrame.find_sal: Return a gdb.Symtab_and_line
1122 object for the current location within the pending frame, or
1123 None.
1124 - gdb.PendingFrame.block: Return a gdb.Block for the current
1125 pending frame, or None.
1126 - gdb.PendingFrame.function: Return a gdb.Symbol for the
1127 current pending frame, or None.
1128
64826d05
AB
1129 ** The frame-id passed to gdb.PendingFrame.create_unwind_info can
1130 now use either an integer or a gdb.Value object for each of its
1131 'sp', 'pc', and 'special' attributes.
1132
3712e78c
AB
1133 ** A new class gdb.unwinder.FrameId has been added. Instances of
1134 this class are constructed with 'sp' (stack-pointer) and 'pc'
1135 (program-counter) values, and can be used as the frame-id when
1136 calling gdb.PendingFrame.create_unwind_info.
1137
0af2f233
AB
1138 ** It is now no longer possible to sub-class the
1139 gdb.disassembler.DisassemblerResult type.
1140
4de4e485
AB
1141 ** The Disassembler API from the gdb.disassembler module has been
1142 extended to include styling support:
1143
1144 - The DisassemblerResult class can now be initialized with a list
1145 of parts. Each part represents part of the disassembled
1146 instruction along with the associated style information. This
1147 list of parts can be accessed with the new
1148 DisassemblerResult.parts property.
1149
1150 - New constants gdb.disassembler.STYLE_* representing all the
1151 different styles part of an instruction might have.
1152
1153 - New methods DisassembleInfo.text_part and
1154 DisassembleInfo.address_part which are used to create the new
1155 styled parts of a disassembled instruction.
1156
1157 - Changes are backwards compatible, the older API can still be
1158 used to disassemble instructions without styling.
1159
c97d123d
TT
1160 ** New function gdb.execute_mi(COMMAND, [ARG]...), that invokes a
1161 GDB/MI command and returns the output as a Python dictionary.
1162
560c121c
TT
1163 ** New function gdb.block_signals(). This returns a context manager
1164 that blocks any signals that GDB needs to handle itself.
1165
1166 ** New class gdb.Thread. This is a subclass of threading.Thread
1167 that calls gdb.block_signals in its "start" method.
1168
125862f0
TT
1169 ** gdb.parse_and_eval now has a new "global_context" parameter.
1170 This can be used to request that the parse only examine global
1171 symbols.
1172
31531132
TT
1173 ** gdb.Inferior now has a new "arguments" attribute. This holds the
1174 command-line arguments to the inferior, if known.
1175
1176 ** gdb.Inferior now has a new "main_name" attribute. This holds the
1177 name of the inferior's "main", if known.
1178
1179 ** gdb.Inferior now has new methods "clear_env", "set_env", and
1180 "unset_env". These can be used to modify the inferior's
1181 environment before it is started.
1182
ed801569
TT
1183 ** gdb.Value now has the 'assign' method.
1184
59668c9d
TT
1185 ** gdb.Value now has the 'to_array' method. This converts an
1186 array-like Value to an array.
1187
27b2eff1
TT
1188 ** gdb.Progspace now has the new method "objfile_for_address". This
1189 returns the gdb.Objfile, if any, that covers a given address.
1190
b080fe54
AB
1191 ** gdb.Breakpoint now has an "inferior" attribute. If the
1192 Breakpoint object is inferior specific then this attribute holds
1193 the inferior-id (an integer). If the Breakpoint object is not
1194 inferior specific, then this field contains None. This field can
1195 be written too.
1196
59668c9d
TT
1197 ** gdb.Type now has the "is_array_like" and "is_string_like"
1198 methods. These reflect GDB's internal idea of whether a type
1199 might be array- or string-like, even if they do not have the
1200 corresponding type code.
1201
fb282576
TT
1202 ** gdb.ValuePrinter is a new class that can be used as the base
1203 class for the result of applying a pretty-printer. As a base
1204 class, it signals to gdb that the printer may implement new
1205 pretty-printer methods.
1206
5ce85461
AB
1207 ** New attribute Progspace.symbol_file. This attribute holds the
1208 gdb.Objfile that corresponds to Progspace.filename (when
1209 Progspace.filename is not None), otherwise, this attribute is
1210 itself None.
1211
4e02aca0
AB
1212 ** New attribute Progspace.executable_filename. This attribute
1213 holds a string containing a file name set by the "exec-file" or
1214 "file" commands, or None if no executable file is set. This
1215 isn't the exact string passed by the user to these commands; the
1216 file name will have been partially resolved to an absolute file
1217 name.
1218
42f297ad
AB
1219 ** A new executable_changed event registry is available. This event
1220 emits ExecutableChangedEvent objects, which have 'progspace' (a
1221 gdb.Progspace) and 'reload' (a Boolean) attributes. This event
1222 is emitted when gdb.Progspace.executable_filename changes.
1223
59912fb2
AB
1224 ** New event registries gdb.events.new_progspace and
1225 gdb.events.free_progspace, these emit NewProgspaceEvent and
1226 FreeProgspaceEvent event types respectively. Both of these event
1227 types have a single 'progspace' attribute, which is the
1228 gdb.Progspace that is either being added to GDB, or removed from
1229 GDB.
1230
ee81567c
TT
1231 ** gdb.LazyString now implements the __str__ method.
1232
4ead09a2
TT
1233 ** New method gdb.Frame.static_link that returns the outer frame
1234 of a nested function frame.
1235
4ff87a30 1236*** Changes in GDB 13
ba09d2a8 1237
560f8d05
TT
1238* MI version 1 is deprecated, and will be removed in GDB 14.
1239
68cffbbd
LM
1240* GDB now supports dumping memory tag data for AArch64 MTE. It also supports
1241 reading memory tag data for AArch64 MTE from core files generated by
1242 the gcore command or the Linux kernel.
1243
1244 When a process uses memory-mapped pages protected by memory tags (for
1245 example, AArch64 MTE), this additional information will be recorded in
1246 the core file in the event of a crash or if GDB generates a core file
1247 from the current process state. GDB will show this additional information
1248 automatically, or through one of the memory-tag subcommands.
1249
7ac958f2
PA
1250* Scheduler-locking and new threads
1251
1252 When scheduler-locking is in effect, only the current thread may run
1253 when the inferior is resumed. However, previously, new threads
1254 created by the resumed thread would still be able to run free. Now,
1255 they are held stopped.
1256
fbcda577
PA
1257* "info breakpoints" now displays enabled breakpoint locations of
1258 disabled breakpoints as in the "y-" state. For example:
1259
1260 (gdb) info breakpoints
1261 Num Type Disp Enb Address What
1262 1 breakpoint keep n <MULTIPLE>
1263 1.1 y- 0x00000000000011b6 in ...
1264 1.2 y- 0x00000000000011c2 in ...
1265 1.3 n 0x00000000000011ce in ...
1266
ed8f05ba
JB
1267* Support for Thread Local Storage (TLS) variables on FreeBSD arm and
1268 aarch64 architectures.
1269
065a00b3
JB
1270* GDB now supports hardware watchpoints on FreeBSD/Aarch64.
1271
edae3fd6
SM
1272* Remove support for building against Python 2, it is now only possible to
1273 build GDB against Python 3.
1274
49a82d50
TT
1275* DBX mode has been removed.
1276
cc96ae7f
LS
1277* GDB now honours the DWARF prologue_end line-table entry flag the compiler can
1278 emit to indicate where a breakpoint should be placed to break in a function
1279 past its prologue.
1280
89555e4e
MR
1281* Completion now also offers "NUMBER" for "set" commands that accept
1282 a numeric argument and the "unlimited" keyword. For example:
1283
1284 (gdb) set width <TAB>
1285 NUMBER unlimited
1286
1287 and consequently:
1288
1289 (gdb) complete set width
1290 set width NUMBER
1291 set width unlimited
1292
4cbe4ca5
AB
1293* Disassembler styling using libopcodes. GDB now supports
1294 disassembler styling using libopcodes. This is only available for
1295 some targets (currently x86 and RISC-V). For unsupported targets
1296 Python Pygments is still used. For supported targets, libopcodes
1297 styling is used by default.
1298
d08bae3d
TT
1299* The Windows native target now supports target async.
1300
2cac01e3
FS
1301* gdb now supports zstd compressed debug sections (ELFCOMPRESS_ZSTD) for ELF.
1302
d4ce49b7
AB
1303* The format of 'disassemble /r' and 'record instruction-history /r'
1304 has changed. The instruction bytes could now be grouped together,
1305 and displayed in the endianness of the instruction. This is the
1306 same layout as used by GNU objdump when disassembling.
1307
1308 There is now 'disassemble /b' and 'record instruction-history /b'
1309 which will always display the instructions bytes one at a time in
1310 memory order, that is, the byte at the lowest address first.
1311
1312 For both /r and /b GDB is now better at using whitespace in order to
1313 align the disassembled instruction text.
1314
92c1d07d
PA
1315* The TUI no longer styles the source and assembly code highlighted by
1316 the current position indicator by default. You can however
1317 re-enable styling using the new "set style tui-current-position"
1318 command.
1319
cbda14de
AB
1320* New convenience variable $_inferior_thread_count contains the number
1321 of live threads in the current inferior.
1322
78805ff8
PW
1323* When a breakpoint with multiple code locations is hit, GDB now prints
1324 the code location using the syntax <breakpoint_number>.<location_number>
1325 such as in:
1326 Thread 1 "zeoes" hit Breakpoint 2.3, some_func () at zeoes.c:8
1327
1328* When a breakpoint is hit, GDB now sets the convenience variables $_hit_bpnum
1329 and $_hit_locno to the hit breakpoint number and code location number.
1330 This allows to disable the last hit breakpoint using
1331 (gdb) disable $_hit_bpnum
1332 or disable only the specific breakpoint code location using
1333 (gdb) disable $_hit_bpnum.$_hit_locno
1334 These commands can be used inside the command list of a breakpoint to
1335 automatically disable the just encountered breakpoint (or the just
1336 encountered specific breakpoint code location).
1337 When a breakpoint has only one location, $_hit_locno is set to 1 so that
1338 (gdb) disable $_hit_bpnum.$_hit_locno
1339 and
1340 (gdb) disable $_hit_bpnum
1341 are both disabling the breakpoint.
1342
6109f7a3
LS
1343* New commands
1344
1345maintenance set ignore-prologue-end-flag on|off
1346maintenance show ignore-prologue-end-flag
1347 This setting, which is off by default, controls whether GDB ignores the
1348 PROLOGUE-END flag from the line-table when skipping prologue. This can be
1349 used to force GDB to use prologue analyzers if the line-table is constructed
1350 from erroneous debug information.
1351
153b3c11
EL
1352set print nibbles [on|off]
1353show print nibbles
1354 This controls whether the 'print/t' command will display binary values
1355 in groups of four bits, known as "nibbles". The default is 'off'.
1356
4cbe4ca5
AB
1357maintenance set libopcodes-styling on|off
1358maintenance show libopcodes-styling
1359 These can be used to force off libopcodes based styling, the Python
1360 Pygments styling will then be used instead.
1361
1362set style disassembler comment
1363show style disassembler comment
1364set style disassembler immediate
1365show style disassembler immediate
1366set style disassembler mnemonic
1367show style disassembler mnemonic
1368set style disassembler register
1369show style disassembler register
1370set style disassembler address
1371show style disassembler address
1372set style disassembler symbol
1373show style disassembler symbol
1374 For targets that support libopcodes based styling, these settings
1375 control how various aspects of the disassembler output are styled.
1376 The 'disassembler address' and 'disassembler symbol' styles are
1377 aliases for the 'address' and 'function' styles respectively.
1378
70175292
AB
1379maintenance print frame-id [ LEVEL ]
1380 Print GDB's internal frame-id for the frame at LEVEL. If LEVEL is
1381 not given, then print the frame-id for the currently selected frame.
1382
e4014689
AB
1383set debug infcall on|off
1384show debug infcall
1385 Print additional debug messages about inferior function calls.
1386
e26d0dab
SM
1387set debug solib on|off
1388show debug solib
1389 Print additional debug messages about shared library handling.
1390
92c1d07d
PA
1391set style tui-current-position [on|off]
1392 Whether to style the source and assembly code highlighted by the
1393 TUI's current position indicator. The default is off.
1394
76b58849
AB
1395set print characters LIMIT
1396show print characters
1397 This new setting is like 'set print elements', but controls how many
1398 characters of a string are printed. This functionality used to be
1399 covered by 'set print elements', but it can be controlled separately
1400 now. LIMIT can be set to a numerical value to request that particular
1401 character count, to 'unlimited' to print all characters of a string,
1402 or to 'elements', which is also the default, to follow the setting of
1403 'set print elements' as it used to be.
1404
1405print -characters LIMIT
1406 This new option to the 'print' command has the same effect as a temporary
1407 use of 'set print characters'.
1408
cc96ae7f
LS
1409* Changed commands
1410
effcf7b1
PW
1411document user-defined
1412 It is now possible to document user-defined aliases.
1413 When a user-defined alias is documented, the help and apropos commands
1414 use the provided documentation instead of the documentation of the
1415 aliased command.
1416 Documenting a user-defined alias is particularly useful when the alias
1417 is a set of nested 'with' commands to avoid showing the help of
1418 the with command for an alias that will in fact launch the
1419 last command given in the nested commands.
1420
cc96ae7f
LS
1421maintenance info line-table
1422 Add a PROLOGUE-END column to the output which indicates that an
1423 entry corresponds to an address where a breakpoint should be placed
1424 to be at the first instruction past a function's prologue.
1425
e26d0dab
SM
1426* Removed commands
1427
1428set debug aix-solib on|off
1429show debug aix-solib
1430set debug solib-frv on|off
1431show debug solib-frv
1432 Removed in favor of "set/show debug solib".
1433
5d80df4a
AB
1434maintenance info program-spaces
1435 This command now includes a 'Core File' column which indicates the
1436 name of the core file associated with each program space.
1437
02e85f7a
TY
1438* New targets
1439
1440GNU/Linux/LoongArch (gdbserver) loongarch*-*-linux*
1441
02cd1b4e
JL
1442GNU/Linux/CSKY (gdbserver) csky*-*linux*
1443
18b4d073
SM
1444AMDGPU amdgcn-*-*
1445
78805ff8
PW
1446* MI changes
1447
1448 ** The async record stating the stopped reason 'breakpoint-hit' now
1449 contains an optional field locno giving the code location number
1450 when the breakpoint has multiple code locations.
1451
25209e2c
AB
1452* Python API
1453
691ade38
TT
1454 ** GDB will now reformat the doc string for gdb.Command and
1455 gdb.Parameter sub-classes to remove unnecessary leading
1456 whitespace from each line before using the string as the help
1457 output.
1458
25209e2c
AB
1459 ** New function gdb.format_address(ADDRESS, PROGSPACE, ARCHITECTURE),
1460 that formats ADDRESS as 'address <symbol+offset>', where symbol is
1461 looked up in PROGSPACE, and ARCHITECTURE is used to format address.
1462 This is the same format that GDB uses when printing address, symbol,
1463 and offset information from the disassembler.
1464
80fa4b2a
TT
1465 ** New function gdb.current_language that returns the name of the
1466 current language. Unlike gdb.parameter('language'), this will
1467 never return 'auto'.
1468
1469 ** New method gdb.Frame.language that returns the name of the
1470 frame's language.
1471
15e15b2d
AB
1472 ** New Python API for wrapping GDB's disassembler:
1473
1474 - gdb.disassembler.register_disassembler(DISASSEMBLER, ARCH).
1475 DISASSEMBLER is a sub-class of gdb.disassembler.Disassembler.
1476 ARCH is either None or a string containing a bfd architecture
1477 name. DISASSEMBLER is registered as a disassembler for
1478 architecture ARCH, or for all architectures if ARCH is None.
1479 The previous disassembler registered for ARCH is returned, this
1480 can be None if no previous disassembler was registered.
1481
1482 - gdb.disassembler.Disassembler is the class from which all
1483 disassemblers should inherit. Its constructor takes a string,
1484 a name for the disassembler, which is currently only used in
1485 some debug output. Sub-classes should override the __call__
1486 method to perform disassembly, invoking __call__ on this base
1487 class will raise an exception.
1488
1489 - gdb.disassembler.DisassembleInfo is the class used to describe
1490 a single disassembly request from GDB. An instance of this
1491 class is passed to the __call__ method of
1492 gdb.disassembler.Disassembler and has the following read-only
1493 attributes: 'address', and 'architecture', as well as the
1494 following method: 'read_memory'.
1495
1496 - gdb.disassembler.builtin_disassemble(INFO, MEMORY_SOURCE),
1497 calls GDB's builtin disassembler on INFO, which is a
1498 gdb.disassembler.DisassembleInfo object. MEMORY_SOURCE is
1499 optional, its default value is None. If MEMORY_SOURCE is not
1500 None then it must be an object that has a 'read_memory' method.
1501
1502 - gdb.disassembler.DisassemblerResult is a class that can be used
1503 to wrap the result of a call to a Disassembler. It has
1504 read-only attributes 'length' and 'string'.
1505
99298c95
TT
1506 ** gdb.Objfile now has an attribute named "is_file". This is True
1507 if the objfile comes from a file, and False otherwise.
1508
c4a3dbaf
TT
1509 ** New function gdb.print_options that returns a dictionary of the
1510 prevailing print options, in the form accepted by
1511 gdb.Value.format_string.
1512
1513 ** gdb.Value.format_string now uses the format provided by 'print',
1514 if it is called during a 'print' or other similar operation.
1515
72be9d6b
TT
1516 ** gdb.Value.format_string now accepts the 'summary' keyword. This
1517 can be used to request a shorter representation of a value, the
1518 way that 'set print frame-arguments scalars' does.
1519
e5213e2c
SF
1520 ** New Python type gdb.BreakpointLocation.
1521 The new attribute 'locations' of gdb.Breakpoint returns a list of
1522 gdb.BreakpointLocation objects specifying the locations where the
1523 breakpoint is inserted into the debuggee.
1524
7abc6ec0
AB
1525 ** The gdb.register_window_type method now restricts the set of
1526 acceptable window names. The first character of a window's name
1527 must start with a character in the set [a-zA-Z], every subsequent
1528 character of a window's name must be in the set [-_.a-zA-Z0-9].
1529
02e85f7a
TY
1530* New features in the GDB remote stub, GDBserver
1531
1532 ** GDBserver is now supported on LoongArch GNU/Linux.
994bc098 1533
02cd1b4e 1534 ** GDBserver is now supported on CSKY GNU/Linux.
02e85f7a 1535
e24500cb
TY
1536* LoongArch floating-point support
1537
1538GDB now supports floating-point on LoongArch GNU/Linux.
1539
18b4d073
SM
1540* AMD GPU ROCm debugging support
1541
1542GDB now supports debugging programs offloaded to AMD GPUs using the ROCm
1543platform.
1544
ba09d2a8 1545*** Changes in GDB 12
ccd14903 1546
cfeab26e
TT
1547* DBX mode is deprecated, and will be removed in GDB 13
1548
807310c5
AB
1549* GDB 12 is the last release of GDB that will support building against
1550 Python 2. From GDB 13, it will only be possible to build GDB itself
1551 with Python 3 support.
1552
bcb9251f
TT
1553* The disable-randomization setting now works on Windows.
1554
64a97606
KS
1555* Improved C++ template support
1556
1557 GDB now treats functions/types involving C++ templates like it does function
1558 overloads. Users may omit parameter lists to set breakpoints on families of
1559 template functions, including types/functions composed of multiple template types:
1560
1561 (gdb) break template_func(template_1, int)
1562
1563 The above will set breakpoints at every function `template_func' where
1564 the first function parameter is any template type named `template_1' and
1565 the second function parameter is `int'.
1566
1567 TAB completion also gains similar improvements.
1568
1ead4b8e
JB
1569* The FreeBSD native target now supports async mode.
1570
261b0748
LM
1571* Configure changes
1572
1573--enable-threading
1574
1575 Enable or disable multithreaded symbol loading. This is enabled
1576 by default, but passing --disable-threading or --enable-threading=no
1577 to configure will disable it.
1578
1579 Disabling this can cause a performance penalty when there are a lot of
1580 symbols to load, but is useful for debugging purposes.
1581
fde1a9a3
AB
1582* New commands
1583
6aa4f97c
AB
1584maint set backtrace-on-fatal-signal on|off
1585maint show backtrace-on-fatal-signal
1586 This setting is 'on' by default. When 'on' GDB will print a limited
1587 backtrace to stderr in the situation where GDB terminates with a
1588 fatal signal. This only supported on some platforms where the
1589 backtrace and backtrace_symbols_fd functions are available.
1590
fde1a9a3
AB
1591set source open on|off
1592show source open
1593 This setting, which is on by default, controls whether GDB will try
1594 to open source code files. Switching this off will stop GDB trying
1595 to open and read source code files, which can be useful if the files
1596 are located over a slow network connection.
1597
acbf4a58
TT
1598set varsize-limit
1599show varsize-limit
1600 These are now deprecated aliases for "set max-value-size" and
1601 "show max-value-size".
1602
bc75fb44
TT
1603task apply [all | TASK-IDS...] [FLAG]... COMMAND
1604 Like "thread apply", but applies COMMAND to Ada tasks.
1605
8a18382f
TT
1606watch [...] task ID
1607 Watchpoints can now be restricted to a specific Ada task.
1608
91f2597b
AB
1609maint set internal-error backtrace on|off
1610maint show internal-error backtrace
1611maint set internal-warning backtrace on|off
1612maint show internal-warning backtrace
1613 GDB can now print a backtrace of itself when it encounters either an
1614 internal-error, or an internal-warning. This is on by default for
1615 internal-error and off by default for internal-warning.
1616
6ff96754
TV
1617set logging on|off
1618 Deprecated and replaced by "set logging enabled on|off".
1619
1620set logging enabled on|off
1621show logging enabled
1622 These commands set or show whether logging is enabled or disabled.
1623
fa8f0a0f
EL
1624exit
1625 You can now exit GDB by using the new command "exit", in addition to
1626 the existing "quit" command.
1627
5b0a3d62
AB
1628set debug threads on|off
1629show debug threads
1630 Print additional debug messages about thread creation and deletion.
1631
8864ef42
AB
1632set debug linux-nat on|off
1633show debug linux-nat
1634 These new commands replaced the old 'set debug lin-lwp' and 'show
1635 debug lin-lwp' respectively. Turning this setting on prints debug
1636 messages relating to GDB's handling of native Linux inferiors.
1637
39370778
AB
1638maint flush source-cache
1639 Flush the contents of the source code cache.
1640
643b1268
AB
1641maint set gnu-source-highlight enabled on|off
1642maint show gnu-source-highlight enabled
1643 Whether GDB should use the GNU Source Highlight library for adding
1644 styling to source code. When off, the library will not be used, even
1645 when available. When GNU Source Highlight isn't used, or can't add
1646 styling to a particular source file, then the Python Pygments
1647 library will be used instead.
1648
61fb7376
TBA
1649set suppress-cli-notifications (on|off)
1650show suppress-cli-notifications
1651 This controls whether printing the notifications is suppressed for CLI.
1652 CLI notifications occur when you change the selected context
1653 (i.e., the current inferior, thread and/or the frame), or when
1654 the program being debugged stops (e.g., because of hitting a
1655 breakpoint, completing source-stepping, an interrupt, etc.).
1656
e867795e
AB
1657set style disassembler enabled on|off
1658show style disassembler enabled
1659 If GDB is compiled with Python support, and the Python Pygments
1660 package is available, then, when this setting is on, disassembler
1661 output will have styling applied.
1662
315e4ebb
TT
1663set ada source-charset
1664show ada source-charset
1665 Set the character set encoding that is assumed for Ada symbols. Valid
1666 values for this follow the values that can be passed to the GNAT
1667 compiler via the '-gnati' option. The default is ISO-8859-1.
1668
51c2a9e2
AB
1669tui layout
1670tui focus
1671tui refresh
1672tui window height
1673 These are the new names for the old 'layout', 'focus', 'refresh',
1674 and 'winheight' tui commands respectively. The old names still
1675 exist as aliases to these new commands.
1676
160444ec
AB
1677tui window width
1678winwidth
1679 The new command 'tui window width', and the alias 'winwidth' allow
1680 the width of a tui window to be adjusted when windows are laid out
1681 in horizontal mode.
1682
7421ccda
AB
1683set debug tui on|off
1684show debug tui
1685 Control the display of debug output about GDB's tui.
1686
e5b176f2
AB
1687* Changed commands
1688
56262a93
TT
1689print
1690 Printing of floating-point values with base-modifying formats like
1691 /x has been changed to display the underlying bytes of the value in
1692 the desired base. This was GDB's documented behavior, but was never
1693 implemented correctly.
1694
e5b176f2
AB
1695maint packet
1696 This command can now print a reply, if the reply includes
1697 non-printable characters. Any non-printable characters are printed
1698 as escaped hex, e.g. \x?? where '??' is replaces with the value of
1699 the non-printable character.
1700
003aae07
LS
1701clone-inferior
1702 The clone-inferior command now ensures that the TTY, CMD and ARGS
1703 settings are copied from the original inferior to the new one.
1704 All modifications to the environment variables done using the 'set
1705 environment' or 'unset environment' commands are also copied to the new
1706 inferior.
1707
8864ef42
AB
1708set debug lin-lwp on|off
1709show debug lin-lwp
1710 These commands have been removed from GDB. The new command 'set
1711 debug linux-nat' and 'show debug linux-nat' should be used
1712 instead.
1713
f62843d7
AB
1714info win
1715 This command now includes information about the width of the tui
1716 windows in its output.
1717
51c2a9e2
AB
1718layout
1719focus
1720refresh
1721winheight
1722 These commands are now aliases for the 'tui layout', 'tui focus',
1723 'tui refresh', and 'tui window height' commands respectively.
1724
63fc2437
TT
1725* GDB's Ada parser now supports an extension for specifying the exact
1726 byte contents of a floating-point literal. This can be useful for
1727 setting floating-point registers to a precise value without loss of
1728 precision. The syntax is an extension of the based literal syntax.
1729 Use, e.g., "16lf#0123abcd#" -- the number of "l"s controls the width
1730 of the floating-point type, and the "f" is the marker for floating
1731 point.
1732
d43bd54d
US
1733* MI changes
1734
1735 ** The '-add-inferior' with no option flags now inherits the
ac51afb5 1736 connection of the current inferior, this restores the behavior of
d43bd54d
US
1737 GDB as it was prior to GDB 10.
1738
6fd90137
AB
1739 ** The '-add-inferior' command now accepts a '--no-connection'
1740 option, which causes the new inferior to start without a
1741 connection.
1742
9db0d853
SM
1743 ** The default version of the MI interpreter is now 4 (-i=mi4).
1744
1745 ** The "script" field in breakpoint output (which is syntactically
1746 incorrect in MI 3 and below) has changed in MI 4 to become a list.
1747 This affects the following commands and events:
1748
1749 - -break-insert
1750 - -break-info
1751 - =breakpoint-created
1752 - =breakpoint-modified
1753
1754 The -fix-breakpoint-script-output command can be used to enable
1755 this behavior with previous MI versions.
1756
d203a064
TY
1757* New targets
1758
575b4c29
PA
1759GNU/Linux/LoongArch loongarch*-*-linux*
1760
1761* Removed targets
1762
1763S+core score-*-*
d203a064 1764
540bf37b
AB
1765* Python API
1766
1767 ** New function gdb.add_history(), which takes a gdb.Value object
1768 and adds the value it represents to GDB's history list. An
1769 integer, the index of the new item in the history list, is
1770 returned.
1771
30a87e90
AB
1772 ** New function gdb.history_count(), which returns the number of
1773 values in GDB's value history.
1774
b1f0f284
AB
1775 ** New gdb.events.gdb_exiting event. This event is called with a
1776 gdb.GdbExitingEvent object which has the read-only attribute
1777 'exit_code', which contains the value of the GDB exit code. This
1778 event is triggered once GDB decides it is going to exit, but
1779 before GDB starts to clean up its internal state.
1780
8b87fbe6
AB
1781 ** New function gdb.architecture_names(), which returns a list
1782 containing all of the possible Architecture.name() values. Each
1783 entry is a string.
1784
d3771fe2
TT
1785 ** New function gdb.Architecture.integer_type(), which returns an
1786 integer type given a size and a signed-ness.
1787
0e3b7c25 1788 ** New gdb.TargetConnection object type that represents a connection
24b2de7b
AB
1789 (as displayed by the 'info connections' command). A sub-class,
1790 gdb.RemoteTargetConnection, is used to represent 'remote' and
1791 'extended-remote' connections.
0e3b7c25
AB
1792
1793 ** The gdb.Inferior type now has a 'connection' property which is an
1794 instance of gdb.TargetConnection, the connection used by this
1795 inferior. This can be None if the inferior has no connection.
1796
1797 ** New 'gdb.events.connection_removed' event registry, which emits a
1798 'gdb.ConnectionEvent' when a connection is removed from GDB.
1799 This event has a 'connection' property, a gdb.TargetConnection
1800 object for the connection being removed.
1801
1802 ** New gdb.connections() function that returns a list of all
1803 currently active connections.
1804
24b2de7b
AB
1805 ** New gdb.RemoteTargetConnection.send_packet(PACKET) method. This
1806 is equivalent to the existing 'maint packet' CLI command; it
1807 allows a user specified packet to be sent to the remote target.
1808
61671e97
AB
1809 ** New function gdb.host_charset(), returns a string, which is the
1810 name of the current host charset.
1811
b583c328
TT
1812 ** New gdb.set_parameter(NAME, VALUE). This sets the gdb parameter
1813 NAME to VALUE.
1814
1815 ** New gdb.with_parameter(NAME, VALUE). This returns a context
1816 manager that temporarily sets the gdb parameter NAME to VALUE,
1817 then resets it when the context is exited.
1818
0642912e
AB
1819 ** The gdb.Value.format_string method now takes a 'styling'
1820 argument, which is a boolean. When true, the returned string can
1821 include escape sequences to apply styling. The styling will only
1822 be present if styling is otherwise turned on in GDB (see 'help
1823 set styling'). When false, which is the default if the argument
1824 is not given, then no styling is applied to the returned string.
1825
659971cb
AB
1826 ** New read-only attribute gdb.InferiorThread.details, which is
1827 either a string, containing additional, target specific thread
1828 state information, or None, if there is no such additional
1829 information.
1830
ee6a3d9e
AB
1831 ** New read-only attribute gdb.Type.is_scalar, which is True for
1832 scalar types, and False for all other types.
1833
551b380f
AB
1834 ** New read-only attribute gdb.Type.is_signed. This attribute
1835 should only be read when Type.is_scalar is True, and will be True
1836 for signed types, and False for all other types. Attempting to
1837 read this attribute for non-scalar types will raise a ValueError.
1838
740b42ce
AB
1839 ** It is now possible to add GDB/MI commands implemented in Python.
1840
cb22a7c3
SH
1841* New features in the GDB remote stub, GDBserver
1842
1843 ** GDBserver is now supported on OpenRISC GNU/Linux.
1844
1845* New native configurations
1846
1847GNU/Linux/OpenRISC or1k*-*-linux*
1848
ccd14903 1849*** Changes in GDB 11
ed6a896c 1850
ae61ef2c
SV
1851* The 'set disassembler-options' command now supports specifying options
1852 for the ARC target.
1853
ce192338
LM
1854* GDB now supports general memory tagging functionality if the underlying
1855 architecture supports the proper primitives and hooks. Currently this is
1856 enabled only for AArch64 MTE.
1857
1858 This includes:
1859
1860 - Additional information when the inferior crashes with a SIGSEGV caused by
1861 a memory tag violation.
1862
1863 - A new modifier 'm' for the "x" command, which displays allocation tags for a
1864 particular memory range.
1865
1866 - Display of memory tag mismatches by "print", for addresses and
1867 pointers, if memory tagging is supported by the architecture.
1868
0fb8bb02
JB
1869* Building GDB now requires GMP (The GNU Multiple Precision Arithmetic
1870 Library).
1871
6791b117
PA
1872* MI changes
1873
1874 ** '-break-insert --qualified' and '-dprintf-insert --qualified'
1875
1876 The MI -break-insert and -dprintf-insert commands now support a
1877 new "--qualified" option that makes GDB interpret a specified
1878 function name as a complete fully-qualified name. This is the
1879 equivalent of the CLI's "break -qualified" and "dprintf
1880 -qualified".
1881
10e578d7
TBA
1882 ** '-break-insert --force-condition' and '-dprintf-insert --force-condition'
1883
1884 The MI -break-insert and -dprintf-insert commands now support a
1885 '--force-condition' flag to forcibly define a condition even when
1886 the condition is invalid at all locations of the breakpoint. This
1887 is equivalent to the '-force-condition' flag of the CLI's "break"
1888 command.
1889
79aabb73
TBA
1890 ** '-break-condition --force'
1891
1892 The MI -break-condition command now supports a '--force' flag to
1893 forcibly define a condition even when the condition is invalid at
1894 all locations of the selected breakpoint. This is equivalent to
1895 the '-force' flag of the CLI's "cond" command.
1896
1fb1ce02 1897 ** '-file-list-exec-source-files [--group-by-objfile]
ea97136b 1898 [--basename | --dirname]
1fb1ce02 1899 [--] [REGEXP]'
0e350a05
AB
1900
1901 The existing -file-list-exec-source-files command now takes an
1902 optional REGEXP which is used to filter the source files that are
1903 included in the results.
1904
1905 By default REGEXP is matched against the full filename of the
1906 source file. When one of --basename or --dirname is given then
1907 REGEXP is only matched against the specified part of the full
1908 source filename.
1909
1fb1ce02
AB
1910 When the optional --group-by-objfile flag is used the output
1911 format is changed, the results are now a list of object files
1912 (executable and libraries) with the source files that are
1913 associated with each object file.
1914
0e350a05
AB
1915 The results from -file-list-exec-source-files now include a
1916 'debug-fully-read' field which takes the value 'true' or 'false'.
1917 A 'true' value indicates the source file is from a compilation
1918 unit that has had its debug information fully read in by GDB, a
1919 value of 'false' indicates GDB has only performed a partial scan
1920 of the debug information so far.
1921
d3483b43
JT
1922* GDB now supports core file debugging for x86_64 Cygwin programs.
1923
64aaad63
AB
1924* GDB will now look for the .gdbinit file in a config directory before
1925 looking for ~/.gdbinit. The file is searched for in the following
1926 locations: $XDG_CONFIG_HOME/gdb/gdbinit, $HOME/.config/gdb/gdbinit,
1927 $HOME/.gdbinit. On Apple hosts the search order is instead:
1928 $HOME/Library/Preferences/gdb/gdbinit, $HOME/.gdbinit.
1929
fa123c32
JB
1930* GDB now supports fixed point types which are described in DWARF
1931 as base types with a fixed-point encoding. Additionally, support
1932 for the DW_AT_GNU_numerator and DW_AT_GNU_denominator has also
1933 been added.
1934
1935 For Ada, this allows support for fixed point types without requiring
1936 the use of the GNAT encoding (based on information added to the type's
1937 name following a GNAT-specific format).
1938
92e4e97a
AB
1939* GDB will now load and process commands from ~/.config/gdb/gdbearlyinit
1940 or ~/.gdbearlyinit if these files are present. These files are
1941 processed earlier than any of the other initialization files and
1942 can affect parts of GDB's startup that previously had already been
1943 completed before the initialization files were read, for example
1944 styling of the initial GDB greeting.
1945
1946* GDB now has two new options "--early-init-command" and
1947 "--early-init-eval-command" with corresponding short options "-eix"
1948 and "-eiex" that allow options (that would normally appear in a
1949 gdbearlyinit file) to be passed on the command line.
1950
96f842cb
AB
1951* For RISC-V targets, the target feature "org.gnu.gdb.riscv.vector" is
1952 now understood by GDB, and can be used to describe the vector
1953 registers of a target. The precise requirements of this register
1954 feature are documented in the GDB manual.
1955
ae66a8f1
SP
1956* For ARM targets, the "org.gnu.gdb.arm.m-profile-mve" feature is now
1957 supported by GDB and describes a new VPR register from the ARM MVE
1958 (Helium) extension. See the GDB manual for more information.
1959
90b044ef
PA
1960* TUI improvements
1961
1962 ** TUI windows now support mouse actions. The mouse wheel scrolls
1963 the appropriate window.
1964
1965 ** Key combinations that do not have a specific action on the
1966 focused window are passed to GDB. For example, you now can use
1967 Ctrl-Left/Ctrl-Right to move between words in the command window
1968 regardless of which window is in focus. Previously you would
1969 need to focus on the command window for such key combinations to
1970 work.
1971
8d378f27
SM
1972* New commands
1973
1974set debug event-loop
1975show debug event-loop
1976 Control the display of debug output about GDB's event loop.
1977
ce192338
LM
1978set print memory-tag-violations
1979show print memory-tag-violations
1980 Control whether to display additional information about memory tag violations
1981 when printing pointers and addresses. Architecture support for memory
1982 tagging is required for this option to have an effect.
1983
50a5f187
AB
1984maintenance flush symbol-cache
1985maintenance flush register-cache
1986 These new commands are equivalent to the already existing commands
1987 'maintenance flush-symbol-cache' and 'flushregs' respectively.
1988
ee9812a0
AB
1989maintenance flush dcache
1990 A new command to flush the dcache.
1991
02a79309
AB
1992maintenance info target-sections
1993 Print GDB's internal target sections table.
1994
ff770835
SM
1995maintenance info jit
1996 Print the JIT code objects in the inferior known to GDB.
1997
ce192338
LM
1998memory-tag show-logical-tag POINTER
1999 Print the logical tag for POINTER.
2000memory-tag with-logical-tag POINTER TAG
2001 Print POINTER with logical tag TAG.
2002memory-tag show-allocation-tag ADDRESS
2003 Print the allocation tag for ADDRESS.
2004memory-tag set-allocation-tag ADDRESS LENGTH TAGS
2005 Set the allocation tag for [ADDRESS, ADDRESS + LENGTH) to TAGS.
2006memory-tag check POINTER
2007 Validate that POINTER's logical tag matches the allocation tag.
2008
5809fbf2
TT
2009set startup-quietly on|off
2010show startup-quietly
2011 When 'on', this causes GDB to act as if "-silent" were passed on the
2012 command line. This command needs to be added to an early
2013 initialization file (e.g. ~/.config/gdb/gdbearlyinit) in order to
2014 affect GDB.
2015
fbb46296
LS
2016set print type hex on|off
2017show print type hex
2018 When 'on', the 'ptype' command uses hexadecimal notation to print sizes
2019 and offsets of struct members. When 'off', decimal notation is used.
2020
edeaceda
AB
2021set python ignore-environment on|off
2022show python ignore-environment
2023 When 'on', this causes GDB's builtin Python to ignore any
8eb82ba1 2024 environment variables that would otherwise affect how Python
edeaceda
AB
2025 behaves. This command needs to be added to an early initialization
2026 file (e.g. ~/.config/gdb/gdbearlyinit) in order to affect GDB.
2027
2028set python dont-write-bytecode auto|on|off
2029show python dont-write-bytecode
2030 When 'on', this causes GDB's builtin Python to not write any
2031 byte-code (.pyc files) to disk. This command needs to be added to
2032 an early initialization file (e.g. ~/.config/gdb/gdbearlyinit) in
2033 order to affect GDB. When 'off' byte-code will always be written.
2034 When set to 'auto' (the default) Python will check the
8eb82ba1 2035 PYTHONDONTWRITEBYTECODE environment variable.
edeaceda 2036
733d554a
TBA
2037* Changed commands
2038
2039break [PROBE_MODIFIER] [LOCATION] [thread THREADNUM]
2040 [-force-condition] [if CONDITION]
2041 This command would previously refuse setting a breakpoint if the
2042 CONDITION expression is invalid at a location. It now accepts and
2043 defines the breakpoint if there is at least one location at which
2044 the CONDITION is valid. The locations for which the CONDITION is
2045 invalid, are automatically disabled. If CONDITION is invalid at all
2046 of the locations, setting the breakpoint is still rejected. However,
2047 the '-force-condition' flag can be used in this case for forcing GDB to
2048 define the breakpoint, making all the current locations automatically
2049 disabled. This may be useful if the user knows the condition will
2050 become meaningful at a future location, e.g. due to a shared library
2051 load.
2052
2053condition [-force] N COND
2054 The behavior of this command is changed the same way for the 'break'
2055 command as explained above. The '-force' flag can be used to force
2056 GDB into defining the condition even when COND is invalid for all the
2057 current locations of breakpoint N.
2058
50a5f187
AB
2059flushregs
2060maintenance flush-symbol-cache
2061 These commands are deprecated in favor of the new commands
2062 'maintenance flush register-cache' and 'maintenance flush
2063 symbol-cache' respectively.
2064
9d2d8a16
AB
2065set style version foreground COLOR
2066set style version background COLOR
2067set style version intensity VALUE
2068 Control the styling of GDB's version number text.
2069
2e3773ff
LS
2070inferior [ID]
2071 When the ID parameter is omitted, then this command prints information
2072 about the current inferior. When the ID parameter is present, the
2073 behavior of the command is unchanged and have the inferior ID become
2074 the current inferior.
2075
bf3386f0
AB
2076maintenance info sections
2077 The ALLOBJ keyword has been replaced with an -all-objects command
2078 line flag. It is now possible to filter which sections are printed
2079 even when -all-objects is passed.
2080
fbb46296
LS
2081ptype[/FLAGS] TYPE | EXPRESSION
2082 The 'ptype' command has two new flags. When '/x' is set, hexadecimal
2083 notation is used when printing sizes and offsets of struct members.
2084 When '/d' is set, decimal notation is used when printing sizes and
2085 offsets of struct members. Default behavior is given by 'show print
2086 type hex'.
2087
bd742128
AB
2088info sources
2089 The info sources command output has been restructured. The results
2090 are now based around a list of objfiles (executable and libraries),
2091 and for each objfile the source files that are part of that objfile
2092 are listed.
2093
18b8df43
AM
2094* Removed targets and native configurations
2095
2096ARM Symbian arm*-*-symbianelf*
2097
ce192338
LM
2098* New remote packets
2099
2100qMemTags
2101 Request the remote to send allocation tags for a particular memory range.
2102QMemTags
2103 Request the remote to store the specified allocation tags to the requested
2104 memory range.
2105
97cef6b7
GB
2106* Guile API
2107
2108 ** Improved support for rvalue reference values:
2109 TYPE_CODE_RVALUE_REF is now exported as part of the API and the
2110 value-referenced-value procedure now handles rvalue reference
2111 values.
2112
ee35ce82
GB
2113 ** New procedures for obtaining value variants:
2114 value-reference-value, value-rvalue-reference-value and
2115 value-const-value.
9d4fc61d 2116
ad42014b
GB
2117 ** Temporary breakpoints can now be created with make-breakpoint and
2118 tested for using breakpoint-temporary?.
2119
55789354
TBA
2120* Python API
2121
2122 ** Inferior objects now contain a read-only 'connection_num' attribute that
2123 gives the connection number as seen in 'info connections' and
2124 'info inferiors'.
2125
d52b8007
AB
2126 ** New method gdb.Frame.level() which returns the stack level of the
2127 frame object.
2128
2129 ** New method gdb.PendingFrame.level() which returns the stack level
2130 of the frame object.
2131
6b95f5ad
AB
2132 ** When hitting a catchpoint, the Python API will now emit a
2133 gdb.BreakpointEvent rather than a gdb.StopEvent. The
2134 gdb.Breakpoint attached to the event will have type BP_CATCHPOINT.
2135
90b044ef
PA
2136 ** Python TUI windows can now receive mouse click events. If the
2137 Window object implements the click method, it is called for each
2138 mouse click event in this window.
2139
ed6a896c 2140*** Changes in GDB 10
4decd62b 2141
995d3a19
SV
2142* There are new feature names for ARC targets: "org.gnu.gdb.arc.core"
2143 and "org.gnu.gdb.arc.aux". The old names are still supported but
2144 must be considered obsolete. They will be deprecated after some
2145 grace period.
2146
5b4a1a8d
PW
2147* Help and apropos commands will now show the documentation of a
2148 command only once, even if that command has one or more aliases.
2149 These commands now show the command name, then all of its aliases,
2150 and finally the description of the command.
2151
2152* 'help aliases' now shows only the user defined aliases. GDB predefined
2153 aliases are shown together with their aliased command.
2154
0d79cdc4
AM
2155* GDB now supports debuginfod, an HTTP server for distributing ELF/DWARF
2156 debugging information as well as source code.
2157
2158 When built with debuginfod, GDB can automatically query debuginfod
2159 servers for the separate debug files and source code of the executable
2160 being debugged.
2161
2162 To build GDB with debuginfod, pass --with-debuginfod to configure (this
2163 requires libdebuginfod, the debuginfod client library).
2164
2165 debuginfod is distributed with elfutils, starting with version 0.178.
2166
2167 You can get the latest version from https://sourceware.org/elfutils.
2168
7cf663a9
PA
2169* Multi-target debugging support
2170
2171 GDB now supports debugging multiple target connections
2172 simultaneously. For example, you can now have each inferior
2173 connected to different remote servers running in different machines,
2174 or have one inferior debugging a local native process, an inferior
2175 debugging a core dump, etc.
2176
2177 This support is experimental and comes with some limitations -- you
2178 can only resume multiple targets simultaneously if all targets
2179 support non-stop mode, and all remote stubs or servers must support
2180 the same set of remote protocol features exactly. See also "info
2181 connections" and "add-inferior -no-connection" below, and "maint set
2182 target-non-stop" in the user manual.
2183
bf84f706
MR
2184* New features in the GDB remote stub, GDBserver
2185
ada508b6
SV
2186 ** GDBserver is now supported on ARC GNU/Linux.
2187
bf84f706
MR
2188 ** GDBserver is now supported on RISC-V GNU/Linux.
2189
6a17d503
SM
2190 ** GDBserver no longer supports these host triplets:
2191
2192 i[34567]86-*-lynxos*
2193 powerpc-*-lynxos*
2194 i[34567]86-*-nto*
2195 bfin-*-*linux*
2196 crisv32-*-linux*
2197 cris-*-linux*
2198 m32r*-*-linux*
2199 tilegx-*-linux*
2200 arm*-*-mingw32ce*
2201 i[34567]86-*-mingw32ce*
2202
3f602821
EZ
2203* Debugging MS-Windows processes now sets $_exitsignal when the
2204 inferior is terminated by a signal, instead of setting $_exitcode.
2205
8fb75323
CB
2206* Multithreaded symbol loading has now been enabled by default on systems
2207 that support it (see entry for GDB 9, below), providing faster
2208 performance for programs with many symbols.
2209
7928d571
HD
2210* The $_siginfo convenience variable now also works on Windows targets,
2211 and will display the EXCEPTION_RECORD of the last handled exception.
2212
7c043ba6 2213* TUI windows can now be arranged horizontally.
63e163f2
AB
2214
2215* The command history filename can now be set to the empty string
2216 either using 'set history filename' or by setting 'GDBHISTFILE=' in
2217 the environment. The effect of setting this filename to the empty
2218 string is that GDB will not try to load any previous command
2219 history.
46f9f931
HD
2220
2221* On Windows targets, it is now possible to debug 32-bit programs with a
2222 64-bit GDB.
7c043ba6 2223
e47e48f6
PW
2224* New commands
2225
2226set exec-file-mismatch -- Set exec-file-mismatch handling (ask|warn|off).
2227show exec-file-mismatch -- Show exec-file-mismatch handling (ask|warn|off).
98c59b52
PA
2228 Set or show the option 'exec-file-mismatch'. When GDB attaches to a
2229 running process, this new option indicates whether to detect
2230 a mismatch between the current executable file loaded by GDB and the
2231 executable file used to start the process. If 'ask', the default,
2232 display a warning and ask the user whether to load the process
2233 executable file; if 'warn', just display a warning; if 'off', don't
2234 attempt to detect a mismatch.
e47e48f6 2235
ee325b61
TT
2236tui new-layout NAME WINDOW WEIGHT [WINDOW WEIGHT]...
2237 Define a new TUI layout, specifying its name and the windows that
2238 will be displayed.
2239
caa7fd04
AB
2240maintenance print xml-tdesc [FILE]
2241 Prints the current target description as an XML document. If the
2242 optional FILE is provided (which is an XML target description) then
2243 the target description is read from FILE into GDB, and then
2244 reprinted.
2245
b089853a
KB
2246maintenance print core-file-backed-mappings
2247 Prints file-backed mappings loaded from a core file's note section.
2248 Output is expected to be similar to that of "info proc mappings".
2249
a5c641b5
AB
2250set debug fortran-array-slicing on|off
2251show debug fortran-array-slicing
2252 Print debugging when taking slices of Fortran arrays.
2253
2254set fortran repack-array-slices on|off
2255show fortran repack-array-slices
2256 When taking slices from Fortran arrays and strings, if the slice is
2257 non-contiguous within the original value then, when this option is
2258 on, the new value will be repacked into a single contiguous value.
2259 When this option is off, then the value returned will consist of a
2260 descriptor that describes the slice within the memory of the
2261 original parent value.
2262
5b860c93
PW
2263* Changed commands
2264
2265alias [-a] [--] ALIAS = COMMAND [DEFAULT-ARGS...]
2266 The alias command can now specify default args for an alias.
2267 GDB automatically prepends the alias default args to the argument list
2268 provided explicitly by the user.
2269 For example, to have a backtrace with full details, you can define
2270 an alias 'bt_ALL' as
2271 'alias bt_ALL = backtrace -entry-values both -frame-arg all
2272 -past-main -past-entry -full'.
2273 Alias default arguments can also use a set of nested 'with' commands,
2274 e.g. 'alias pp10 = with print pretty -- with print elem 10 -- print'
2275 defines the alias pp10 that will pretty print a maximum of 10 elements
2276 of the given expression (if the expression is an array).
2277
bf84f706
MR
2278* New targets
2279
2280GNU/Linux/RISC-V (gdbserver) riscv*-*-linux*
39791af2 2281BPF bpf-unknown-none
3dab9e15 2282Z80 z80-unknown-*
bf84f706 2283
01b1af32
TT
2284* Python API
2285
2286 ** gdb.register_window_type can be used to implement new TUI windows
2287 in Python.
2288
1acda803
TT
2289 ** Dynamic types can now be queried. gdb.Type has a new attribute,
2290 "dynamic", and gdb.Type.sizeof can be None for a dynamic type. A
2291 field of a dynamic type may have None for its "bitpos" attribute
2292 as well.
2293
2b2fbab8
TT
2294 ** Commands written in Python can be in the "TUI" help class by
2295 registering with the new constant gdb.COMMAND_TUI.
2296
87dbc774
AB
2297 ** New method gdb.PendingFrame.architecture () to retrieve the
2298 architecture of the pending frame.
2299
0f767f94
AB
2300 ** New gdb.Architecture.registers method that returns a
2301 gdb.RegisterDescriptorIterator object, an iterator that returns
2302 gdb.RegisterDescriptor objects. The new RegisterDescriptor is a
2303 way to query the registers available for an architecture.
2304
64cb3757
AB
2305 ** New gdb.Architecture.register_groups method that returns a
2306 gdb.RegisterGroupIterator object, an iterator that returns
2307 gdb.RegisterGroup objects. The new RegisterGroup is a way to
2308 discover the available register groups.
2309
68cf161c
LC
2310* Guile API
2311
ae5369e7 2312 ** GDB can now be built with GNU Guile 3.0 and 2.2 in addition to 2.0.
68cf161c
LC
2313
2314 ** Procedures 'memory-port-read-buffer-size',
2315 'set-memory-port-read-buffer-size!', 'memory-port-write-buffer-size',
2316 and 'set-memory-port-write-buffer-size!' are deprecated. When
2317 using Guile 2.2 and later, users who need to control the size of
2318 a memory port's internal buffer can use the 'setvbuf' procedure.
2319
4decd62b 2320*** Changes in GDB 9
9335e75a 2321
1a3da2cd
AB
2322* 'thread-exited' event is now available in the annotations interface.
2323
7734102d
EZ
2324* New built-in convenience variables $_gdb_major and $_gdb_minor
2325 provide the GDB version. They are handy for conditionally using
2326 features available only in or since specific GDB versions, in
2327 scripts that should work error-free with many different versions,
2328 such as in system-wide init files.
2329
aed61d02
PW
2330* New built-in convenience functions $_gdb_setting, $_gdb_setting_str,
2331 $_gdb_maint_setting and $_gdb_maint_setting_str provide access to values
2332 of the GDB settings and the GDB maintenance settings. They are handy
2333 for changing the logic of user defined commands depending on the
2334 current GDB settings.
2335
81a24d04
JB
2336* GDB now supports Thread Local Storage (TLS) variables on several
2337 FreeBSD architectures (amd64, i386, powerpc, riscv). Other
2338 architectures require kernel changes. TLS is not yet supported for
2339 amd64 and i386 process core dumps.
2340
3d31bc39
AH
2341* Support for Pointer Authentication (PAC) on AArch64 Linux. Return
2342 addresses that required unmasking are shown in the backtrace with the
2343 postfix [PAC].
d851aa71 2344
eb41253a 2345* Two new convenience functions $_cimag and $_creal that extract the
8bdc1658
AB
2346 imaginary and real parts respectively from complex numbers.
2347
52ce35e2
TT
2348* New built-in convenience variables $_shell_exitcode and $_shell_exitsignal
2349 provide the exitcode or exit status of the shell commands launched by
2350 GDB commands such as "shell", "pipe" and "make".
2351
bf498525
PW
2352* The command define-prefix can now define user defined prefix commands.
2353 User defined commands can now be defined using these user defined prefix
2354 commands.
2355
2356* Command names can now use the . character.
2357
e3ec872f
YS
2358* The RX port now supports XML target descriptions.
2359
4993045d
PW
2360* GDB now shows the Ada task names at more places, e.g. in task switching
2361 messages.
2362
6a062a93
CB
2363* GDB can now be compiled with Python 3 on Windows.
2364
37f6a7f4
TT
2365* New convenience variable $_ada_exception holds the address of the
2366 Ada exception being thrown. This is set by Ada-related catchpoints.
2367
179aed7f
AB
2368* GDB can now place breakpoints on nested functions and subroutines in
2369 Fortran code. The '::' operator can be used between parent and
2370 child scopes when placing breakpoints, for example:
2371
2372 (gdb) break outer_function::inner_function
2373
2374 The 'outer_function::' prefix is only needed if 'inner_function' is
2375 not visible in the current scope.
2376
ed2a2229
CB
2377* In addition to the system-wide gdbinit file, if configured with
2378 --with-system-gdbinit-dir, GDB will now also load files in that directory
2379 as system gdbinit files, unless the -nx or -n flag is provided. Files
2380 with extensions .gdb, .py and .scm are supported as long as GDB was
2381 compiled with support for that language.
2382
e49b22ff
CB
2383* GDB now supports multithreaded symbol loading for higher performance.
2384 This feature is still in testing, so it is disabled by default. You
2385 can turn it on using 'maint set worker-threads unlimited'.
2386
52093e1b
MB
2387* Python API
2388
2389 ** The gdb.Value type has a new method 'format_string' which returns a
2390 string representing the value. The formatting is controlled by the
2391 optional keyword arguments: 'raw', 'pretty_arrays', 'pretty_structs',
2392 'array_indexes', 'symbols', 'unions', 'deref_refs', 'actual_objects',
2393 'static_members', 'max_elements', 'repeat_threshold', and 'format'.
2394
e1f2e1a2
CB
2395 ** gdb.Type has a new property 'objfile' which returns the objfile the
2396 type was defined in.
2397
bc4268a5
PW
2398 ** The frame information printed by the python frame filtering code
2399 is now consistent with what the 'backtrace' command prints when
2400 there are no filters, or when the 'backtrace' '-no-filters' option
2401 is given.
2402
2906593f
CB
2403 ** The new function gdb.lookup_static_symbol can be used to look up
2404 symbols with static linkage.
2405
086baaf1
AB
2406 ** The new function gdb.lookup_static_symbols can be used to look up
2407 all static symbols with static linkage.
2408
c620ed88
CB
2409 ** gdb.Objfile has new methods 'lookup_global_symbol' and
2410 'lookup_static_symbol' to lookup a symbol from this objfile only.
2411
0b27c27d
CB
2412 ** gdb.Block now supports the dictionary syntax for accessing symbols in
2413 this block (e.g. block['local_variable']).
2414
136afab8
PW
2415* New commands
2416
e2c52041
PW
2417| [COMMAND] | SHELL_COMMAND
2418| -d DELIM COMMAND DELIM SHELL_COMMAND
2419pipe [COMMAND] | SHELL_COMMAND
2420pipe -d DELIM COMMAND DELIM SHELL_COMMAND
2421 Executes COMMAND and sends its output to SHELL_COMMAND.
2422 With no COMMAND, repeat the last executed command
2423 and send its output to SHELL_COMMAND.
2424
bf498525
PW
2425define-prefix COMMAND
2426 Define or mark a command as a user-defined prefix command.
994bc098 2427
fdbc9870
PA
2428with SETTING [VALUE] [-- COMMAND]
2429w SETTING [VALUE] [-- COMMAND]
2430 Temporarily set SETTING, run COMMAND, and restore SETTING.
2431 Usage: with SETTING -- COMMAND
2432 With no COMMAND, repeats the last executed command.
2433 SETTING is any GDB setting you can change with the "set"
2434 subcommands. For example, 'with language c -- print someobj'
2435 temporarily switches to the C language in order to print someobj.
2436 Settings can be combined: 'w lang c -- w print elements unlimited --
2437 usercmd' switches to the C language and runs usercmd with no limit
2438 of array elements to print.
2439
2440maint with SETTING [VALUE] [-- COMMAND]
2441 Like "with", but works with "maintenance set" settings.
2442
136afab8
PW
2443set may-call-functions [on|off]
2444show may-call-functions
2445 This controls whether GDB will attempt to call functions in
2446 the program, such as with expressions in the print command. It
2447 defaults to on. Calling functions in the program being debugged
2448 can have undesired side effects. It is now possible to forbid
2449 such function calls. If function calls are forbidden, GDB will throw
2450 an error when a command (such as print expression) calls a function
2451 in the program.
2452
000439d5
TT
2453set print finish [on|off]
2454show print finish
2455 This controls whether the `finish' command will display the value
2456 that is returned by the current function. When `off', the value is
2457 still entered into the value history, but it is not printed. The
2458 default is `on'.
2459
1bd0c6e4
AB
2460set print max-depth
2461show print max-depth
2462 Allows deeply nested structures to be simplified when printing by
2463 replacing deeply nested parts (beyond the max-depth) with ellipses.
2464 The default max-depth is 20, but this can be set to unlimited to get
2465 the old behavior back.
2466
d8edc8b7
PW
2467set print raw-values [on|off]
2468show print raw-values
2469 By default, GDB applies the enabled pretty printers when printing a
2470 value. This allows to ignore the enabled pretty printers for a series
2471 of commands. The default is 'off'.
2472
b7060614
AH
2473set logging debugredirect [on|off]
2474 By default, GDB debug output will go to both the terminal and the logfile.
2475 Set if you want debug output to go only to the log file.
2476
e664d728
PW
2477set style title foreground COLOR
2478set style title background COLOR
2479set style title intensity VALUE
2480 Control the styling of titles.
2481
2482set style highlight foreground COLOR
2483set style highlight background COLOR
2484set style highlight intensity VALUE
2485 Control the styling of highlightings.
2486
22138db6
TT
2487maint set worker-threads
2488maint show worker-threads
2489 Control the number of worker threads that can be used by GDB. The
e49b22ff 2490 default is 0. "unlimited" lets GDB choose a number that is
22138db6
TT
2491 reasonable. Currently worker threads are only used when demangling
2492 the names of linker symbols.
2493
a2a7af0c
TT
2494set style tui-border foreground COLOR
2495set style tui-border background COLOR
2496 Control the styling of TUI borders.
2497
2498set style tui-active-border foreground COLOR
2499set style tui-active-border background COLOR
2500 Control the styling of the active TUI border.
2501
c6ac8931
PA
2502maint set test-settings KIND
2503maint show test-settings KIND
dca0f6c0
PA
2504 A set of commands used by the testsuite for exercising the settings
2505 infrastructure.
2506
45e42163
TT
2507maint set tui-resize-message [on|off]
2508maint show tui-resize-message
2509 Control whether GDB prints a message each time the terminal is
2510 resized when in TUI mode. This is primarily useful for testing the
2511 TUI.
2512
bc4268a5
PW
2513set print frame-info [short-location|location|location-and-address
2514 |source-and-location|source-line|auto]
2515show print frame-info
2516 This controls what frame information is printed by the commands printing
ac51afb5 2517 a frame. This setting will e.g. influence the behavior of 'backtrace',
bc4268a5
PW
2518 'frame', 'stepi'. The python frame filtering also respect this setting.
2519 The 'backtrace' '-frame-info' option can override this global setting.
2520
d1da6b01
TT
2521set tui compact-source
2522show tui compact-source
2523
2524 Enable the "compact" display mode for the TUI source window. The
2525 compact display uses only as much space as is needed for the line
2526 numbers in the current file, and only a single space to separate the
2527 line numbers from the source.
2528
59c35742
AB
2529info modules [-q] [REGEXP]
2530 Return a list of Fortran modules matching REGEXP, or all modules if
2531 no REGEXP is given.
2532
165f8965
AB
2533info module functions [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP]
2534 Return a list of functions within all modules, grouped by module.
2535 The list of functions can be restricted with the optional regular
2536 expressions. MODULE_REGEXP matches against the module name,
2537 TYPE_REGEXP matches against the function type signature, and REGEXP
2538 matches against the function name.
2539
2540info module variables [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP]
2541 Return a list of variables within all modules, grouped by module.
2542 The list of variables can be restricted with the optional regular
2543 expressions. MODULE_REGEXP matches against the module name,
2544 TYPE_REGEXP matches against the variable type, and REGEXP matches
2545 against the variable name.
2546
6cc8564b
LM
2547set debug remote-packet-max-chars
2548show debug remote-packet-max-chars
2549 Controls the number of characters to output in a remote packet when using
2550 "set debug remote".
2551 The default is 512 bytes.
2552
65c574f6
PA
2553info connections
2554 Lists the target connections currently in use.
2555
e664d728
PW
2556* Changed commands
2557
2558help
2559 The "help" command uses the title style to enhance the
add18b78 2560 readability of its output by styling the classes and
e664d728
PW
2561 command names.
2562
2563apropos [-v] REGEXP
2564 Similarly to "help", the "apropos" command also uses the
2565 title style for the command names. "apropos" accepts now
2566 a flag "-v" (verbose) to show the full documentation
2567 of matching commands and to use the highlight style to mark
2568 the documentation parts matching REGEXP.
2569
1f6f6e21
PW
2570printf
2571eval
2572 The GDB printf and eval commands can now print C-style and Ada-style
2573 string convenience variables without calling functions in the program.
2574 This allows to do formatted printing of strings without having
2575 a running inferior, or when debugging a core dump.
2576
ae60f04e
PW
2577info sources [-dirname | -basename] [--] [REGEXP]
2578 This command has now optional arguments to only print the files
2579 whose names match REGEXP. The arguments -dirname and -basename
2580 allow to restrict matching respectively to the dirname and basename
2581 parts of the files.
2582
e664d728
PW
2583show style
2584 The "show style" and its subcommands are now styling
2585 a style name in their output using its own style, to help
2586 the user visualize the different styles.
2587
bc4268a5
PW
2588set print frame-arguments
2589 The new value 'presence' indicates to only indicate the presence of
2590 arguments using ..., instead of printing argument names and values.
2591
2daf894e
PA
2592set print raw-frame-arguments
2593show print raw-frame-arguments
2594
2595 These commands replace the similarly-named "set/show print raw
2596 frame-arguments" commands (now with a dash instead of a space). The
2597 old commands are now deprecated and may be removed in a future
2598 release.
e664d728 2599
65c574f6
PA
2600add-inferior [-no-connection]
2601 The add-inferior command now supports a "-no-connection" flag that
2602 makes the new inferior start with no target connection associated.
2603 By default, the new inferior inherits the target connection of the
2604 current inferior. See also "info connections".
2605
2606info inferior
2607 This command's output now includes a new "Connection" column
2608 indicating which target connection an inferior is bound to. See
2609 "info connections" above.
2610
3345721a
PA
2611maint test-options require-delimiter
2612maint test-options unknown-is-error
2613maint test-options unknown-is-operand
2614maint show test-options-completion-result
2615 Commands used by the testsuite to validate the command options
2616 framework.
2617
78e8cb91
TT
2618focus, winheight, +, -, >, <
2619 These commands are now case-sensitive.
2620
3345721a
PA
2621* New command options, command completion
2622
2623 GDB now has a standard infrastructure to support dash-style command
2624 options ('-OPT'). One benefit is that commands that use it can
2625 easily support completion of command line arguments. Try "CMD
2626 -[TAB]" or "help CMD" to find options supported by a command. Over
2627 time, we intend to migrate most commands to this infrastructure. A
2628 number of commands got support for new command options in this
2629 release:
2630
2631 ** The "print" and "compile print" commands now support a number of
2632 options that allow overriding relevant global print settings as
2633 set by "set print" subcommands:
2634
2635 -address [on|off]
2636 -array [on|off]
2637 -array-indexes [on|off]
2638 -elements NUMBER|unlimited
2639 -null-stop [on|off]
2640 -object [on|off]
2641 -pretty [on|off]
d8edc8b7 2642 -raw-values [on|off]
3345721a
PA
2643 -repeats NUMBER|unlimited
2644 -static-members [on|off]
2645 -symbol [on|off]
2646 -union [on|off]
2647 -vtbl [on|off]
2648
2649 Note that because the "print"/"compile print" commands accept
2650 arbitrary expressions which may look like options (including
2651 abbreviations), if you specify any command option, then you must
2652 use a double dash ("--") to mark the end of argument processing.
2653
2654 ** The "backtrace" command now supports a number of options that
2655 allow overriding relevant global print settings as set by "set
2656 backtrace" and "set print" subcommands:
2657
2658 -entry-values no|only|preferred|if-needed|both|compact|default
2659 -frame-arguments all|scalars|none
2660 -raw-frame-arguments [on|off]
bc4268a5
PW
2661 -frame-info auto|source-line|location|source-and-location
2662 |location-and-address|short-location
3345721a
PA
2663 -past-main [on|off]
2664 -past-entry [on|off]
2665
2666 In addition, the full/no-filters/hide qualifiers are now also
2667 exposed as command options too:
2668
2669 -full
2670 -no-filters
2671 -hide
2672
2673 ** The "frame apply", "tfaas" and "faas" commands similarly now
2674 support the following options:
2675
2676 -past-main [on|off]
2677 -past-entry [on|off]
2678
ae60f04e
PW
2679 ** The new "info sources" options -dirname and -basename options
2680 are using the standard '-OPT' infrastructure.
2681
3345721a
PA
2682 All options above can also be abbreviated. The argument of boolean
2683 (on/off) options can be 0/1 too, and also the argument is assumed
2684 "on" if omitted. This allows writing compact command invocations,
2685 like for example:
2686
d8edc8b7 2687 (gdb) p -ra -p -o 0 -- *myptr
3345721a
PA
2688
2689 The above is equivalent to:
2690
d8edc8b7 2691 (gdb) print -raw-values -pretty -object off -- *myptr
3345721a 2692
a8eab7c6
AB
2693 ** The "info types" command now supports the '-q' flag to disable
2694 printing of some header information in a similar fashion to "info
2695 variables" and "info functions".
2696
4acfdd20
AB
2697 ** The "info variables", "info functions", and "whereis" commands
2698 now take a '-n' flag that excludes non-debug symbols (symbols
2699 from the symbol table, not from the debug info such as DWARF)
2700 from the results.
2701
3345721a
PA
2702* Completion improvements
2703
2704 ** GDB can now complete the options of the "thread apply all" and
2705 "taas" commands, and their "-ascending" option can now be
2706 abbreviated.
2707
60cfcb20
AB
2708 ** GDB can now complete the options of the "info threads", "info
2709 functions", "info variables", "info locals", and "info args"
2710 commands.
54d66006 2711
3345721a
PA
2712 ** GDB can now complete the options of the "compile file" and
2713 "compile code" commands. The "compile file" command now
2714 completes on filenames.
2715
2716 ** GDB can now complete the backtrace command's
2717 "full/no-filters/hide" qualifiers.
2718
2719* In settings, you can now abbreviate "unlimited".
2720
2721 E.g., "set print elements u" is now equivalent to "set print
2722 elements unlimited".
2723
26648588
JV
2724* New MI commands
2725
2726-complete
2727 This lists all the possible completions for the rest of the line, if it
2728 were to be given as a command itself. This is intended for use by MI
2729 frontends in cases when separate CLI and MI channels cannot be used.
2730
30056ea0
AB
2731-catch-throw, -catch-rethrow, and -catch-catch
2732 These can be used to catch C++ exceptions in a similar fashion to
2733 the CLI commands 'catch throw', 'catch rethrow', and 'catch catch'.
2734
7dc42066
AB
2735-symbol-info-functions, -symbol-info-types, and -symbol-info-variables
2736 These commands are the MI equivalent of the CLI commands 'info
2737 functions', 'info types', and 'info variables' respectively.
2738
db5960b4
AB
2739-symbol-info-modules, this is the MI equivalent of the CLI 'info
2740 modules' command.
2741
293b38d6
AB
2742-symbol-info-module-functions and -symbol-info-module-variables.
2743 These commands are the MI equivalent of the CLI commands 'info
2744 module functions' and 'info module variables'.
2745
aa7ca1bb
AH
2746* Other MI changes
2747
5a3a0d63
JB
2748 ** The default version of the MI interpreter is now 3 (-i=mi3).
2749
2750 ** The output of information about multi-location breakpoints (which is
2751 syntactically incorrect in MI 2) has changed in MI 3. This affects
2752 the following commands and events:
2753
2754 - -break-insert
2755 - -break-info
2756 - =breakpoint-created
2757 - =breakpoint-modified
2758
2759 The -fix-multi-location-breakpoint-output command can be used to enable
2760 this behavior with previous MI versions.
2761
aa7ca1bb
AH
2762 ** Backtraces and frames include a new optional field addr_flags which is
2763 given after the addr field. On AArch64 this contains PAC if the address
2764 has been masked in the frame. On all other targets the field is not
2765 present.
2766
b7060614
AH
2767* Testsuite
2768
2769 The testsuite now creates the files gdb.cmd (containing the arguments
2770 used to launch GDB) and gdb.in (containing all the commands sent to
2771 GDB) in the output directory for each test script. Multiple invocations
2772 are appended with .1, .2, .3 etc.
2773
c6bdbeb7
AH
2774* Building GDB and GDBserver now requires GNU make >= 3.82.
2775
2776 Using another implementation of the make program or an earlier version of
2777 GNU make to build GDB or GDBserver is not supported.
2778
86c6b807
TT
2779* Building GDB now requires GNU readline >= 7.0.
2780
2781 GDB now bundles GNU readline 8.0, but if you choose to use
2782 --with-system-readline, only readline >= 7.0 can be used.
2783
11061048
TT
2784* The TUI SingleKey keymap is now named "SingleKey". This can be used
2785 from .inputrc to bind keys in this keymap. This feature is only
2786 available when gdb is built against GNU readline 8.0 or later.
2787
abf516c6
UW
2788* Removed targets and native configurations
2789
2790 GDB no longer supports debugging the Cell Broadband Engine. This includes
2791 both debugging standalone Cell/B.E. SPU applications and integrated debugging
2792 of Cell/B.E. applications that use both the PPU and SPU architectures.
2793
ddd44b70
DD
2794* New Simulators
2795
2796TI PRU pru-*-elf
2797
dae8b3eb
RO
2798* Removed targets and native configurations
2799
2800Solaris 10 i?86-*-solaris2.10, x86_64-*-solaris2.10,
2801 sparc*-*-solaris2.10
2802
9335e75a 2803*** Changes in GDB 8.3
4e5b2f89 2804
8d619c01
EBM
2805* GDB and GDBserver now support access to additional registers on
2806 PowerPC GNU/Linux targets: PPR, DSCR, TAR, EBB/PMU registers, and
2807 HTM registers.
2808
078a0207
KS
2809* GDB now has experimental support for the compilation and injection of
2810 C++ source code into the inferior. This beta release does not include
2811 support for several language features, such as templates, constructors,
2812 and operators.
2813
2814 This feature requires GCC 7.1 or higher built with libcp1.so
2815 (the C++ plug-in).
2816
c7ab0aef
SDJ
2817* GDB and GDBserver now support IPv6 connections. IPv6 addresses
2818 can be passed using the '[ADDRESS]:PORT' notation, or the regular
2819 'ADDRESS:PORT' method.
2820
7d11235d
SM
2821* DWARF index cache: GDB can now automatically save indices of DWARF
2822 symbols on disk to speed up further loading of the same binaries.
2823
e8bf1ce4
JB
2824* Ada task switching is now supported on aarch64-elf targets when
2825 debugging a program using the Ravenscar Profile. For more information,
2826 see the "Tasking Support when using the Ravenscar Profile" section
2827 in the GDB user manual.
2828
b0f492b9
GB
2829* GDB in batch mode now exits with status 1 if the last command to be
2830 executed failed.
2831
b5ffee31
AB
2832* The RISC-V target now supports target descriptions.
2833
e9076973
JB
2834* System call catchpoints now support system call aliases on FreeBSD.
2835 When the ABI of a system call changes in FreeBSD, this is
2836 implemented by leaving a compatibility system call using the old ABI
2837 at the existing number and allocating a new system call number for
2838 the new ABI. For example, FreeBSD 12 altered the layout of 'struct
2839 kevent' used by the 'kevent' system call. As a result, FreeBSD 12
2840 kernels ship with both 'kevent' and 'freebsd11_kevent' system calls.
2841 The 'freebsd11_kevent' system call is assigned an alias of 'kevent'
2842 so that a system call catchpoint for the 'kevent' system call will
2843 catch invocations of both the 'kevent' and 'freebsd11_kevent'
2844 binaries. This ensures that 'kevent' system calls are caught for
2845 binaries using either the old or new ABIs.
2846
140a4bc0
TT
2847* Terminal styling is now available for the CLI and the TUI. GNU
2848 Source Highlight can additionally be used to provide styling of
2849 source code snippets. See the "set style" commands, below, for more
2850 information.
2851
041be526
SM
2852* Removed support for old demangling styles arm, edg, gnu, hp and
2853 lucid.
2854
a14c4daa
PW
2855* New commands
2856
078a0207
KS
2857set debug compile-cplus-types
2858show debug compile-cplus-types
2859 Control the display of debug output about type conversion in the
82f06518 2860 C++ compile feature. Commands have no effect while compiling
078a0207
KS
2861 for other languages.
2862
3e68067f
SM
2863set debug skip
2864show debug skip
2865 Control whether debug output about files/functions skipping is
2866 displayed.
2867
a14c4daa
PW
2868frame apply [all | COUNT | -COUNT | level LEVEL...] [FLAG]... COMMAND
2869 Apply a command to some frames.
2870 FLAG arguments allow to control what output to produce and how to handle
2871 errors raised when applying COMMAND to a frame.
2872
2873taas COMMAND
2874 Apply a command to all threads (ignoring errors and empty output).
2875 Shortcut for 'thread apply all -s COMMAND'.
2876
2877faas COMMAND
2878 Apply a command to all frames (ignoring errors and empty output).
2879 Shortcut for 'frame apply all -s COMMAND'.
2880
2881tfaas COMMAND
2882 Apply a command to all frames of all threads (ignoring errors and empty
2883 output).
2884 Shortcut for 'thread apply all -s frame apply all -s COMMAND'.
2885
3c3bb058
AB
2886maint set dwarf unwinders (on|off)
2887maint show dwarf unwinders
2888 Control whether DWARF unwinders can be used.
2889
8b113111
JB
2890info proc files
2891 Display a list of open files for a process.
2892
a14c4daa
PW
2893* Changed commands
2894
669e09f6
PW
2895Changes to the "frame", "select-frame", and "info frame" CLI commands.
2896 These commands all now take a frame specification which
2897 is either a frame level, or one of the keywords 'level', 'address',
2898 'function', or 'view' followed by a parameter. Selecting a frame by
2899 address, or viewing a frame outside the current backtrace now
2900 requires the use of a keyword. Selecting a frame by level is
2901 unchanged. The MI comment "-stack-select-frame" is unchanged.
2902
c1168a2f
JD
2903target remote FILENAME
2904target extended-remote FILENAME
2905 If FILENAME is a Unix domain socket, GDB will attempt to connect
2906 to this socket instead of opening FILENAME as a character device.
2907
e0a7911f
PW
2908info args [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2909info functions [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2910info locals [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2911info variables [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2912 These commands can now print only the searched entities
2913 matching the provided regexp(s), giving a condition
2914 on the entity names or entity types. The flag -q disables
add18b78 2915 printing headers or information messages.
e0a7911f 2916
604c4ca9
PW
2917info functions
2918info types
2919info variables
2920rbreak
2921 These commands now determine the syntax for the shown entities
2922 according to the language chosen by `set language'. In particular,
2923 `set language auto' means to automatically choose the language of
2924 the shown entities.
2925
a14c4daa
PW
2926thread apply [all | COUNT | -COUNT] [FLAG]... COMMAND
2927 The 'thread apply' command accepts new FLAG arguments.
2928 FLAG arguments allow to control what output to produce and how to handle
2929 errors raised when applying COMMAND to a thread.
2930
7806cea7
TT
2931set tui tab-width NCHARS
2932show tui tab-width NCHARS
2933 "set tui tab-width" replaces the "tabset" command, which has been deprecated.
2934
140a4bc0
TT
2935set style enabled [on|off]
2936show style enabled
2937 Enable or disable terminal styling. Styling is enabled by default
7557a514 2938 on most hosts, but disabled by default when in batch mode.
140a4bc0 2939
d085f989
TT
2940set style sources [on|off]
2941show style sources
2942 Enable or disable source code styling. Source code styling is
2943 enabled by default, but only takes effect if styling in general is
2944 enabled, and if GDB was linked with GNU Source Highlight.
2945
140a4bc0
TT
2946set style filename foreground COLOR
2947set style filename background COLOR
2948set style filename intensity VALUE
2949 Control the styling of file names.
2950
2951set style function foreground COLOR
2952set style function background COLOR
2953set style function intensity VALUE
2954 Control the styling of function names.
2955
2956set style variable foreground COLOR
2957set style variable background COLOR
2958set style variable intensity VALUE
2959 Control the styling of variable names.
2960
2961set style address foreground COLOR
2962set style address background COLOR
2963set style address intensity VALUE
2964 Control the styling of addresses.
2965
26fb3983
JV
2966* MI changes
2967
2968 ** The '-data-disassemble' MI command now accepts an '-a' option to
2969 disassemble the whole function surrounding the given program
2970 counter value or function name. Support for this feature can be
2971 verified by using the "-list-features" command, which should
2972 contain "data-disassemble-a-option".
2973
6d52907e
JV
2974 ** Command responses and notifications that include a frame now include
2975 the frame's architecture in a new "arch" attribute.
2976
52a187f8
JW
2977* New native configurations
2978
2979GNU/Linux/RISC-V riscv*-*-linux*
74792ff7 2980FreeBSD/riscv riscv*-*-freebsd*
52a187f8
JW
2981
2982* New targets
2983
2984GNU/Linux/RISC-V riscv*-*-linux*
416a69af
HAQ
2985CSKY ELF csky*-*-elf
2986CSKY GNU/LINUX csky*-*-linux
ed65e20b 2987FreeBSD/riscv riscv*-*-freebsd*
197df35e
JB
2988NXP S12Z s12z-*-elf
2989GNU/Linux/OpenRISC or1k*-*-linux*
52a187f8 2990
742a7df5
EZ
2991* Removed targets
2992
2993GDB no longer supports native debugging on versions of MS-Windows
2994before Windows XP.
2995
a40bf0c2
SM
2996* Python API
2997
2c3fc25d
KB
2998 ** GDB no longer supports Python versions less than 2.6.
2999
a40bf0c2
SM
3000 ** The gdb.Inferior type has a new 'progspace' property, which is the program
3001 space associated to that inferior.
3002
0ae1a321
SM
3003 ** The gdb.Progspace type has a new 'objfiles' method, which returns the list
3004 of objfiles associated to that program space.
3005
51e78fc5
TT
3006 ** gdb.SYMBOL_LOC_COMMON_BLOCK, gdb.SYMBOL_MODULE_DOMAIN, and
3007 gdb.SYMBOL_COMMON_BLOCK_DOMAIN were added to reflect changes to
3008 the gdb core.
3009
3010 ** gdb.SYMBOL_VARIABLES_DOMAIN, gdb.SYMBOL_FUNCTIONS_DOMAIN, and
3011 gdb.SYMBOL_TYPES_DOMAIN are now deprecated. These were never
3012 correct and did not work properly.
3013
af54ade9
KB
3014 ** The gdb.Value type has a new constructor, which is used to construct a
3015 gdb.Value from a Python buffer object and a gdb.Type.
3016
f35d5ade
TT
3017* Configure changes
3018
3019--enable-ubsan
3020
eff98030
TT
3021 Enable or disable the undefined behavior sanitizer. This is
3022 disabled by default, but passing --enable-ubsan=yes or
3023 --enable-ubsan=auto to configure will enable it. Enabling this can
3024 cause a performance penalty. The undefined behavior sanitizer was
3025 first introduced in GCC 4.9.
f35d5ade 3026
4e5b2f89 3027*** Changes in GDB 8.2
cd385f94 3028
471b9d15
MR
3029* The 'set disassembler-options' command now supports specifying options
3030 for the MIPS target.
3031
d4d429d5
PT
3032* The 'symbol-file' command now accepts an '-o' option to add a relative
3033 offset to all sections.
3034
291f9a96
PT
3035* Similarly, the 'add-symbol-file' command also accepts an '-o' option to add
3036 a relative offset to all sections, but it allows to override the load
3037 address of individual sections using '-s'.
3038
ed6dfe51
PT
3039* The 'add-symbol-file' command no longer requires the second argument
3040 (address of the text section).
3041
4b2dfa9d
MR
3042* The endianness used with the 'set endian auto' mode in the absence of
3043 an executable selected for debugging is now the last endianness chosen
3044 either by one of the 'set endian big' and 'set endian little' commands
3045 or by inferring from the last executable used, rather than the startup
3046 default.
3047
eb6af809
TT
3048* The pager now allows a "c" response, meaning to disable the pager
3049 for the rest of the current command.
3050
b744723f
AA
3051* The commands 'info variables/functions/types' now show the source line
3052 numbers of symbol definitions when available.
3053
2d97a5d9
JB
3054* 'info proc' now works on running processes on FreeBSD systems and core
3055 files created on FreeBSD systems.
3056
007e1530
TT
3057* C expressions can now use _Alignof, and C++ expressions can now use
3058 alignof.
3059
1461bdac
AH
3060* Support for SVE on AArch64 Linux. Note that GDB does not detect changes to
3061 the vector length while the process is running.
3062
386a8676
JB
3063* New commands
3064
3065set debug fbsd-nat
3066show debug fbsd-nat
3067 Control display of debugging info regarding the FreeBSD native target.
3068
3fcded8f
JB
3069set|show varsize-limit
3070 This new setting allows the user to control the maximum size of Ada
3071 objects being printed when those objects have a variable type,
3072 instead of that maximum size being hardcoded to 65536 bytes.
3073
4a4495d6
MM
3074set|show record btrace cpu
3075 Controls the processor to be used for enabling errata workarounds for
3076 branch trace decode.
3077
5045b3d7
GB
3078maint check libthread-db
3079 Run integrity checks on the current inferior's thread debugging
3080 library
3081
3082maint set check-libthread-db (on|off)
3083maint show check-libthread-db
3084 Control whether to run integrity checks on inferior specific thread
3085 debugging libraries as they are loaded. The default is not to
3086 perform such checks.
3087
6d7bb824
TT
3088* Python API
3089
3090 ** Type alignment is now exposed via the "align" attribute of a gdb.Type.
3091
a913fffb
TT
3092 ** The commands attached to a breakpoint can be set by assigning to
3093 the breakpoint's "commands" field.
3094
56bcdbea
TT
3095 ** gdb.execute can now execute multi-line gdb commands.
3096
7729052b
TT
3097 ** The new functions gdb.convenience_variable and
3098 gdb.set_convenience_variable can be used to get and set the value
3099 of convenience variables.
3100
984ee559
TT
3101 ** A gdb.Parameter will no longer print the "set" help text on an
3102 ordinary "set"; instead by default a "set" will be silent unless
3103 the get_set_string method returns a non-empty string.
3104
dbbb1059
AB
3105* New targets
3106
3107RiscV ELF riscv*-*-elf
3108
a2a79012
PA
3109* Removed targets and native configurations
3110
3111m88k running OpenBSD m88*-*-openbsd*
8a3de5e1
PA
3112SH-5/SH64 ELF sh64-*-elf*, SH-5/SH64 support in sh*
3113SH-5/SH64 running GNU/Linux SH-5/SH64 support in sh*-*-linux*
3114SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd*
a2a79012 3115
a3b60e45
JK
3116* Aarch64/Linux hardware watchpoints improvements
3117
3118 Hardware watchpoints on unaligned addresses are now properly
3119 supported when running Linux kernel 4.10 or higher: read and access
3120 watchpoints are no longer spuriously missed, and all watchpoints
3121 lengths between 1 and 8 bytes are supported. On older kernels,
3122 watchpoints set on unaligned addresses are no longer missed, with
3123 the tradeoff that there is a possibility of false hits being
3124 reported.
3125
056dec39 3126* Configure changes
44cee4fd
TT
3127
3128--enable-codesign=CERT
3129 This can be used to invoke "codesign -s CERT" after building gdb.
3130 This option is useful on macOS, where code signing is required for
3131 gdb to work properly.
3132
056dec39
TT
3133--disable-gdbcli has been removed
3134 This is now silently accepted, but does nothing.
3135
cd385f94 3136*** Changes in GDB 8.1
305d16a9 3137
cef0f868
SH
3138* GDB now supports dynamically creating arbitrary register groups specified
3139 in XML target descriptions. This allows for finer grain grouping of
3140 registers on systems with a large amount of registers.
3141
7c161838
SDJ
3142* The 'ptype' command now accepts a '/o' flag, which prints the
3143 offsets and sizes of fields in a struct, like the pahole(1) tool.
3144
97cbe998
SDJ
3145* New "--readnever" command line option instructs GDB to not read each
3146 symbol file's symbolic debug information. This makes startup faster
3147 but at the expense of not being able to perform symbolic debugging.
3148 This option is intended for use cases where symbolic debugging will
3149 not be used, e.g., when you only need to dump the debuggee's core.
3150
2400729e
UW
3151* GDB now uses the GNU MPFR library, if available, to emulate target
3152 floating-point arithmetic during expression evaluation when the target
3153 uses different floating-point formats than the host. At least version
3154 3.1 of GNU MPFR is required.
3155
289e23aa
AA
3156* GDB now supports access to the guarded-storage-control registers and the
3157 software-based guarded-storage broadcast control registers on IBM z14.
3158
0a2dde4a
SDJ
3159* On Unix systems, GDB now supports transmitting environment variables
3160 that are to be set or unset to GDBserver. These variables will
3161 affect the environment to be passed to the remote inferior.
3162
3163 To inform GDB of environment variables that are to be transmitted to
3164 GDBserver, use the "set environment" command. Only user set
3165 environment variables are sent to GDBserver.
3166
3167 To inform GDB of environment variables that are to be unset before
3168 the remote inferior is started by the GDBserver, use the "unset
3169 environment" command.
3170
d044bac8
PA
3171* Completion improvements
3172
3173 ** GDB can now complete function parameters in linespecs and
3174 explicit locations without quoting. When setting breakpoints,
3175 quoting around functions names to help with TAB-completion is
3176 generally no longer necessary. For example, this now completes
3177 correctly:
3178
3179 (gdb) b function(in[TAB]
3180 (gdb) b function(int)
3181
3182 Related, GDB is no longer confused with completing functions in
3183 C++ anonymous namespaces:
3184
3185 (gdb) b (anon[TAB]
3186 (gdb) b (anonymous namespace)::[TAB][TAB]
3187 (anonymous namespace)::a_function()
3188 (anonymous namespace)::b_function()
3189
3190 ** GDB now has much improved linespec and explicit locations TAB
3191 completion support, that better understands what you're
3192 completing and offers better suggestions. For example, GDB no
3193 longer offers data symbols as possible completions when you're
3194 setting a breakpoint.
3195
3196 ** GDB now TAB-completes label symbol names.
3197
3198 ** The "complete" command now mimics TAB completion accurately.
3199
c179febe
SL
3200* New command line options (gcore)
3201
3202-a
3203 Dump all memory mappings.
3204
a20714ff
PA
3205* Breakpoints on C++ functions are now set on all scopes by default
3206
3207 By default, breakpoints on functions/methods are now interpreted as
3208 specifying all functions with the given name ignoring missing
3209 leading scopes (namespaces and classes).
3210
3211 For example, assuming a C++ program with symbols named:
3212
3213 A::B::func()
3214 B::func()
3215
3216 both commands "break func()" and "break B::func()" set a breakpoint
3217 on both symbols.
3218
3219 You can use the new flag "-qualified" to override this. This makes
3220 GDB interpret the specified function name as a complete
3221 fully-qualified name instead. For example, using the same C++
3222 program, the "break -q B::func" command sets a breakpoint on
b89641ba
SM
3223 "B::func", only. A parameter has been added to the Python
3224 gdb.Breakpoint constructor to achieve the same result when creating
3225 a breakpoint from Python.
a20714ff 3226
bd69330d
PA
3227* Breakpoints on functions marked with C++ ABI tags
3228
3229 GDB can now set breakpoints on functions marked with C++ ABI tags
3230 (e.g., [abi:cxx11]). See here for a description of ABI tags:
3231 https://developers.redhat.com/blog/2015/02/05/gcc5-and-the-c11-abi/
3232
3233 Functions with a C++11 abi tag are demangled/displayed like this:
3234
3235 function[abi:cxx11](int)
3236 ^^^^^^^^^^^
3237
3238 You can now set a breakpoint on such functions simply as if they had
3239 no tag, like:
3240
3241 (gdb) b function(int)
3242
3243 Or if you need to disambiguate between tags, like:
3244
3245 (gdb) b function[abi:other_tag](int)
3246
3247 Tab completion was adjusted accordingly as well.
3248
7c96f8c1
TT
3249* Python Scripting
3250
3251 ** New events gdb.new_inferior, gdb.inferior_deleted, and
3252 gdb.new_thread are emitted. See the manual for further
3253 description of these.
3254
4e725347
JB
3255 ** A new function, "gdb.rbreak" has been added to the Python API.
3256 This function allows the setting of a large number of breakpoints
3257 via a regex pattern in Python. See the manual for further details.
d8ae99a7 3258
824cc835
PM
3259 ** Python breakpoints can now accept explicit locations. See the
3260 manual for a further description of this feature.
3261
3262
6d580b63
YQ
3263* New features in the GDB remote stub, GDBserver
3264
bc3b087d
SDJ
3265 ** GDBserver is now able to start inferior processes with a
3266 specified initial working directory.
3267
3268 The user can set the desired working directory to be used from
3269 GDB using the new "set cwd" command.
3270
6d580b63
YQ
3271 ** New "--selftest" command line option runs some GDBserver self
3272 tests. These self tests are disabled in releases.
3273
3274 ** On Unix systems, GDBserver now does globbing expansion and variable
3275 substitution in inferior command line arguments.
3276
3277 This is done by starting inferiors using a shell, like GDB does.
3278 See "set startup-with-shell" in the user manual for how to disable
3279 this from GDB when using "target extended-remote". When using
3280 "target remote", you can disable the startup with shell by using the
3281 new "--no-startup-with-shell" GDBserver command line option.
aefd8b33 3282
0a2dde4a
SDJ
3283 ** On Unix systems, GDBserver now supports receiving environment
3284 variables that are to be set or unset from GDB. These variables
3285 will affect the environment to be passed to the inferior.
3286
e547c119
JB
3287* When catching an Ada exception raised with a message, GDB now prints
3288 the message in the catchpoint hit notification. In GDB/MI mode, that
3289 information is provided as an extra field named "exception-message"
3290 in the *stopped notification.
3291
7403715e
TT
3292* Trait objects can now be inspected When debugging Rust code. This
3293 requires compiler support which will appear in Rust 1.24.
3294
aefd8b33
SDJ
3295* New remote packets
3296
0a2dde4a
SDJ
3297QEnvironmentHexEncoded
3298 Inform GDBserver of an environment variable that is to be passed to
3299 the inferior when starting it.
3300
3301QEnvironmentUnset
3302 Inform GDBserver of an environment variable that is to be unset
3303 before starting the remote inferior.
3304
3305QEnvironmentReset
3306 Inform GDBserver that the environment should be reset (i.e.,
3307 user-set environment variables should be unset).
3308
aefd8b33
SDJ
3309QStartupWithShell
3310 Indicates whether the inferior must be started with a shell or not.
3311
bc3b087d
SDJ
3312QSetWorkingDir
3313 Tell GDBserver that the inferior to be started should use a specific
3314 working directory.
3315
8e2141c6
YQ
3316* The "maintenance print c-tdesc" command now takes an optional
3317 argument which is the file name of XML target description.
3318
1526853e
SM
3319* The "maintenance selftest" command now takes an optional argument to
3320 filter the tests to be run.
3321
d0fe4701
XR
3322* The "enable", and "disable" commands now accept a range of
3323 breakpoint locations, e.g. "enable 1.3-5".
3324
c4dcb155
SM
3325* New commands
3326
d092c5a2
SDJ
3327set|show cwd
3328 Set and show the current working directory for the inferior.
3329
6e41ddec
JK
3330set|show compile-gcc
3331 Set and show compilation command used for compiling and injecting code
3332 with the 'compile' commands.
3333
c4dcb155
SM
3334set debug separate-debug-file
3335show debug separate-debug-file
3336 Control the display of debug output about separate debug file search.
3337
1e52e849
SL
3338set dump-excluded-mappings
3339show dump-excluded-mappings
3340 Control whether mappings marked with the VM_DONTDUMP flag should be
3341 dumped when generating a core file.
3342
1526853e
SM
3343maint info selftests
3344 List the registered selftests.
3345
4e5a4f58
JB
3346starti
3347 Start the debugged program stopping at the first instruction.
3348
b282f0f2
SH
3349set|show debug or1k
3350 Control display of debugging messages related to OpenRISC targets.
3351
883fd55a
KS
3352set|show print type nested-type-limit
3353 Set and show the limit of nesting level for nested types that the
3354 type printer will show.
3355
44d0fb3a
RK
3356* TUI Single-Key mode now supports two new shortcut keys: `i' for stepi and
3357 `o' for nexti.
3358
d69cf9b2
PA
3359* Safer/improved support for debugging with no debug info
3360
3361 GDB no longer assumes functions with no debug information return
3362 'int'.
3363
3364 This means that GDB now refuses to call such functions unless you
3365 tell it the function's type, by either casting the call to the
3366 declared return type, or by casting the function to a function
3367 pointer of the right type, and calling that:
3368
3369 (gdb) p getenv ("PATH")
3370 'getenv' has unknown return type; cast the call to its declared return type
3371 (gdb) p (char *) getenv ("PATH")
3372 $1 = 0x7fffffffe "/usr/local/bin:/"...
3373 (gdb) p ((char * (*) (const char *)) getenv) ("PATH")
3374 $2 = 0x7fffffffe "/usr/local/bin:/"...
3375
3376 Similarly, GDB no longer assumes that global variables with no debug
3377 info have type 'int', and refuses to print the variable's value
3378 unless you tell it the variable's type:
3379
3380 (gdb) p var
3381 'var' has unknown type; cast it to its declared type
3382 (gdb) p (float) var
3383 $3 = 3.14
3384
351787dd
JB
3385* New native configurations
3386
3387FreeBSD/aarch64 aarch64*-*-freebsd*
4f9d9906 3388FreeBSD/arm arm*-*-freebsd*
351787dd 3389
c0f84956
JB
3390* New targets
3391
3392FreeBSD/aarch64 aarch64*-*-freebsd*
7176dfd2 3393FreeBSD/arm arm*-*-freebsd*
b282f0f2 3394OpenRISC ELF or1k*-*-elf
c0f84956 3395
281c4447
RO
3396* Removed targets and native configurations
3397
3398Solaris 2.0-9 i?86-*-solaris2.[0-9], sparc*-*-solaris2.[0-9]
3399
305d16a9 3400*** Changes in GDB 8.0
51547df6
MS
3401
3402* GDB now supports access to the PKU register on GNU/Linux. The register is
3403 added by the Memory Protection Keys for Userspace feature which will be
3404 available in future Intel CPUs.
751b375e 3405
c0f55cc6
AV
3406* GDB now supports C++11 rvalue references.
3407
0a0faf9f
TW
3408* Python Scripting
3409
3410 ** New functions to start, stop and access a running btrace recording.
c0f55cc6 3411 ** Rvalue references are now supported in gdb.Type.
0a0faf9f 3412
20b477a7
LM
3413* GDB now supports recording and replaying rdrand and rdseed Intel 64
3414 instructions.
3415
e6485aaf 3416* Building GDB and GDBserver now requires a C++11 compiler.
d2946923
PA
3417
3418 For example, GCC 4.8 or later.
cf6de44d
PA
3419
3420 It is no longer possible to build GDB or GDBserver with a C
3421 compiler. The --disable-build-with-cxx configure option has been
3422 removed.
3423
f2ff9acd
SM
3424* Building GDB and GDBserver now requires GNU make >= 3.81.
3425
3426 It is no longer supported to build GDB or GDBserver with another
3427 implementation of the make program or an earlier version of GNU make.
3428
8ba42bc5
EZ
3429* Native debugging on MS-Windows supports command-line redirection
3430
3431 Command-line arguments used for starting programs on MS-Windows can
3432 now include redirection symbols supported by native Windows shells,
3433 such as '<', '>', '>>', '2>&1', etc. This affects GDB commands such
3434 as "run", "start", and "set args", as well as the corresponding MI
3435 features.
3436
24cdb46e
РИ
3437* Support for thread names on MS-Windows.
3438
3439 GDB now catches and handles the special exception that programs
3440 running on MS-Windows use to assign names to threads in the
3441 debugger.
3442
9c37b5ae
TT
3443* Support for Java programs compiled with gcj has been removed.
3444
df3ee9ca
PA
3445* User commands now accept an unlimited number of arguments.
3446 Previously, only up to 10 was accepted.
3447
01770bbd
PA
3448* The "eval" command now expands user-defined command arguments.
3449
3450 This makes it easier to process a variable number of arguments:
3451
3452 define mycommand
3453 set $i = 0
3454 while $i < $argc
3455 eval "print $arg%d", $i
3456 set $i = $i + 1
3457 end
3458 end
3459
3f7b46f2
IR
3460* Target descriptions can now describe registers for sparc32 and sparc64.
3461
0ae60b63
JK
3462* GDB now supports DWARF version 5 (debug information format).
3463 Its .debug_names index is not yet supported.
3464
b268007c
JB
3465* New native configurations
3466
3467FreeBSD/mips mips*-*-freebsd
3468
ad0a504f
AK
3469* New targets
3470
3471Synopsys ARC arc*-*-elf32
387360da 3472FreeBSD/mips mips*-*-freebsd
ad0a504f 3473
db6be0d5
SM
3474* Removed targets and native configurations
3475
3476Alpha running FreeBSD alpha*-*-freebsd*
3477Alpha running GNU/kFreeBSD alpha*-*-kfreebsd*-gnu
3478
78cbbba8
LM
3479* New commands
3480
3481flash-erase
3482 Erases all the flash memory regions reported by the target.
3483
db6be0d5
SM
3484maint print arc arc-instruction address
3485 Print internal disassembler information about instruction at a given address.
51457a05 3486
db6be0d5 3487* New options
65b48a81
PB
3488
3489set disassembler-options
3490show disassembler-options
3491 Controls the passing of target specific information to the disassembler.
3492 If it is necessary to specify more than one disassembler option then
3493 multiple options can be placed together into a comma separated list.
3494 The default value is the empty string. Currently, the only supported
3495 targets are ARM, PowerPC and S/390.
3496
db6be0d5 3497* New MI commands
eea78757 3498
db6be0d5
SM
3499-target-flash-erase
3500 Erases all the flash memory regions reported by the target. This is
3501 equivalent to the CLI command flash-erase.
1e1a8bef 3502
db6be0d5
SM
3503-file-list-shared-libraries
3504 List the shared libraries in the program. This is
3505 equivalent to the CLI command "info shared".
1e1a8bef 3506
bea298f9
XR
3507-catch-handlers
3508 Catchpoints stopping the program when Ada exceptions are
3509 handled. This is equivalent to the CLI command "catch handlers".
3510
751b375e 3511*** Changes in GDB 7.12
1233c0ba 3512
69ffd7f2
PA
3513* GDB and GDBserver now build with a C++ compiler by default.
3514
3515 The --enable-build-with-cxx configure option is now enabled by
3516 default. One must now explicitly configure with
3517 --disable-build-with-cxx in order to build with a C compiler. This
3518 option will be removed in a future release.
3519
c0272db5
TW
3520* GDBserver now supports recording btrace without maintaining an active
3521 GDB connection.
3522
bb556f1f
TK
3523* GDB now supports a negative repeat count in the 'x' command to examine
3524 memory backward from the given address. For example:
3525
3526 (gdb) bt
3527 #0 Func1 (n=42, p=0x40061c "hogehoge") at main.cpp:4
3528 #1 0x400580 in main (argc=1, argv=0x7fffffffe5c8) at main.cpp:8
3529 (gdb) x/-5i 0x0000000000400580
3530 0x40056a <main(int, char**)+8>: mov %edi,-0x4(%rbp)
3531 0x40056d <main(int, char**)+11>: mov %rsi,-0x10(%rbp)
3532 0x400571 <main(int, char**)+15>: mov $0x40061c,%esi
3533 0x400576 <main(int, char**)+20>: mov $0x2a,%edi
3534 0x40057b <main(int, char**)+25>:
3535 callq 0x400536 <Func1(int, char const*)>
3536
994bc098 3537* Fortran: Support structures with fields of dynamic types and
9920b434
BH
3538 arrays of dynamic types.
3539
34c41c68
DE
3540* The symbol dumping maintenance commands have new syntax.
3541maint print symbols [-pc address] [--] [filename]
3542maint print symbols [-objfile objfile] [-source source] [--] [filename]
3543maint print psymbols [-objfile objfile] [-pc address] [--] [filename]
3544maint print psymbols [-objfile objfile] [-source source] [--] [filename]
3545maint print msymbols [-objfile objfile] [--] [filename]
3546
81516450
DE
3547* GDB now supports multibit bitfields and enums in target register
3548 descriptions.
3549
f2f3ccb9
SM
3550* New Python-based convenience function $_as_string(val), which returns
3551 the textual representation of a value. This function is especially
3552 useful to obtain the text label of an enum value.
3553
012b3a21
WT
3554* Intel MPX bound violation handling.
3555
3556 Segmentation faults caused by a Intel MPX boundary violation
3557 now display the kind of violation (upper or lower), the memory
3558 address accessed and the memory bounds, along with the usual
3559 signal received and code location.
3560
3561 For example:
3562
3563 Program received signal SIGSEGV, Segmentation fault
3564 Upper bound violation while accessing address 0x7fffffffc3b3
3565 Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
3566 0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
3567
0bdfa368
TT
3568* Rust language support.
3569 GDB now supports debugging programs written in the Rust programming
3570 language. See https://www.rust-lang.org/ for more information about
3571 Rust.
3572
86f78169
PA
3573* Support for running interpreters on specified input/output devices
3574
3575 GDB now supports a new mechanism that allows frontends to provide
3576 fully featured GDB console views, as a better alternative to
3577 building such views on top of the "-interpreter-exec console"
3578 command. See the new "new-ui" command below. With that command,
3579 frontends can now start GDB in the traditional command-line mode
3580 running in an embedded terminal emulator widget, and create a
3581 separate MI interpreter running on a specified i/o device. In this
3582 way, GDB handles line editing, history, tab completion, etc. in the
3583 console all by itself, and the GUI uses the separate MI interpreter
3584 for its own control and synchronization, invisible to the command
3585 line.
3586
e3487908
GKB
3587* The "catch syscall" command catches groups of related syscalls.
3588
3589 The "catch syscall" command now supports catching a group of related
3590 syscalls using the 'group:' or 'g:' prefix.
3591
d2dffb8d
DE
3592* New commands
3593
3594skip -file file
3595skip -gfile file-glob-pattern
3596skip -function function
3597skip -rfunction regular-expression
3598 A generalized form of the skip command, with new support for
3599 glob-style file names and regular expressions for function names.
3600 Additionally, a file spec and a function spec may now be combined.
3601
f2403c39 3602maint info line-table REGEXP
82f06518 3603 Display the contents of GDB's internal line table data structure.
f2403c39 3604
dcd1f979
TT
3605maint selftest
3606 Run any GDB unit tests that were compiled in.
3607
86f78169
PA
3608new-ui INTERP TTY
3609 Start a new user interface instance running INTERP as interpreter,
3610 using the TTY file for input/output.
3611
93daf339
TT
3612* Python Scripting
3613
3614 ** gdb.Breakpoint objects have a new attribute "pending", which
3615 indicates whether the breakpoint is pending.
8d2a0a14
TT
3616 ** Three new breakpoint-related events have been added:
3617 gdb.breakpoint_created, gdb.breakpoint_modified, and
3618 gdb.breakpoint_deleted.
93daf339 3619
463888ab
РИ
3620signal-event EVENTID
3621 Signal ("set") the given MS-Windows event object. This is used in
3622 conjunction with the Windows JIT debugging (AeDebug) support, where
3623 the OS suspends a crashing process until a debugger can attach to
3624 it. Resuming the crashing process, in order to debug it, is done by
3625 signalling an event.
3626
c37c0ba6
MK
3627* Support for tracepoints and fast tracepoints on s390-linux and s390x-linux
3628 was added in GDBserver, including JIT compiling fast tracepoint's
3629 conditional expression bytecode into native code.
3630
f7c38292
PA
3631* Support for various remote target protocols and ROM monitors has
3632 been removed:
3633
3634 target m32rsdi Remote M32R debugging over SDI
3635 target mips MIPS remote debugging protocol
3636 target pmon PMON ROM monitor
3637 target ddb NEC's DDB variant of PMON for Vr4300
3638 target rockhopper NEC RockHopper variant of PMON
3639 target lsi LSI variant of PMO
3640
22084c42
MK
3641* Support for tracepoints and fast tracepoints on powerpc-linux,
3642 powerpc64-linux, and powerpc64le-linux was added in GDBserver,
3643 including JIT compiling fast tracepoint's conditional expression
3644 bytecode into native code.
3645
38b022b4
SM
3646* MI async record =record-started now includes the method and format used for
3647 recording. For example:
3648
3649 =record-started,thread-group="i1",method="btrace",format="bts"
3650
4034d0ff
AT
3651* MI async record =thread-selected now includes the frame field. For example:
3652
3653 =thread-selected,id="3",frame={level="0",addr="0x00000000004007c0"}
3654
a28d8e50
YTL
3655* New targets
3656
3657Andes NDS32 nds32*-*-elf
3658
1233c0ba 3659*** Changes in GDB 7.11
7c79d316 3660
6e9567fe
JB
3661* GDB now supports debugging kernel-based threads on FreeBSD.
3662
5d5658a1
PA
3663* Per-inferior thread numbers
3664
3665 Thread numbers are now per inferior instead of global. If you're
3666 debugging multiple inferiors, GDB displays thread IDs using a
3667 qualified INF_NUM.THR_NUM form. For example:
3668
3669 (gdb) info threads
3670 Id Target Id Frame
3671 1.1 Thread 0x7ffff7fc2740 (LWP 8155) (running)
3672 1.2 Thread 0x7ffff7fc1700 (LWP 8168) (running)
3673 * 2.1 Thread 0x7ffff7fc2740 (LWP 8157) (running)
3674 2.2 Thread 0x7ffff7fc1700 (LWP 8190) (running)
3675
3676 As consequence, thread numbers as visible in the $_thread
3677 convenience variable and in Python's InferiorThread.num attribute
3678 are no longer unique between inferiors.
3679
3680 GDB now maintains a second thread ID per thread, referred to as the
3681 global thread ID, which is the new equivalent of thread numbers in
663f6d42 3682 previous releases. See also $_gthread below.
5d5658a1
PA
3683
3684 For backwards compatibility, MI's thread IDs always refer to global
3685 IDs.
3686
3687* Commands that accept thread IDs now accept the qualified
3688 INF_NUM.THR_NUM form as well. For example:
3689
3690 (gdb) thread 2.1
3691 [Switching to thread 2.1 (Thread 0x7ffff7fc2740 (LWP 8157))] (running)
3692 (gdb)
3693
71ef29a8
PA
3694* In commands that accept a list of thread IDs, you can now refer to
3695 all threads of an inferior using a star wildcard. GDB accepts
3696 "INF_NUM.*", to refer to all threads of inferior INF_NUM, and "*" to
3697 refer to all threads of the current inferior. For example, "info
3698 threads 2.*".
3699
c84f6bbf
PA
3700* You can use "info threads -gid" to display the global thread ID of
3701 all threads.
3702
663f6d42
PA
3703* The new convenience variable $_gthread holds the global number of
3704 the current thread.
3705
e3940304
PA
3706* The new convenience variable $_inferior holds the number of the
3707 current inferior.
3708
f303dbd6
PA
3709* GDB now displays the ID and name of the thread that hit a breakpoint
3710 or received a signal, if your program is multi-threaded. For
3711 example:
3712
3713 Thread 3 "bar" hit Breakpoint 1 at 0x40087a: file program.c, line 20.
3714 Thread 1 "main" received signal SIGINT, Interrupt.
3715
cbb55fa7
MM
3716* Record btrace now supports non-stop mode.
3717
58d2eda5
PL
3718* Support for tracepoints on aarch64-linux was added in GDBserver.
3719
da8c46d2 3720* The 'record instruction-history' command now indicates speculative execution
bc504a31 3721 when using the Intel Processor Trace recording format.
da8c46d2 3722
629500fa
KS
3723* GDB now allows users to specify explicit locations, bypassing
3724 the linespec parser. This feature is also available to GDB/MI
3725 clients.
3726
02f024f9
YQ
3727* Multi-architecture debugging is supported on AArch64 GNU/Linux.
3728 GDB now is able to debug both AArch64 applications and ARM applications
3729 at the same time.
3730
4d9d419e
PL
3731* Support for fast tracepoints on aarch64-linux was added in GDBserver,
3732 including JIT compiling fast tracepoint's conditional expression bytecode
3733 into native code.
3734
eda14cf2
YQ
3735* GDB now supports displaced stepping on AArch64 GNU/Linux.
3736
be81798b
PA
3737* "info threads", "info inferiors", "info display", "info checkpoints"
3738 and "maint info program-spaces" now list the corresponding items in
3739 ascending ID order, for consistency with all other "info" commands.
3740
3685b09f
PMR
3741* In Ada, the overloads selection menu has been enhanced to display the
3742 parameter types and the return types for the matching overloaded subprograms.
3743
fbea99ea
PA
3744* New commands
3745
3746maint set target-non-stop (on|off|auto)
3747maint show target-non-stop
3748 Control whether GDB targets always operate in non-stop mode even if
3749 "set non-stop" is "off". The default is "auto", meaning non-stop
3750 mode is enabled if supported by the target.
3751
18989b3c
AB
3752maint set bfd-sharing
3753maint show bfd-sharing
3754 Control the reuse of bfd objects.
3755
566f5e3b
AB
3756set debug bfd-cache
3757show debug bfd-cache
3758 Control display of debugging info regarding bfd caching.
3759
6e9567fe
JB
3760set debug fbsd-lwp
3761show debug fbsd-lwp
3762 Control display of debugging info regarding FreeBSD threads.
3763
73b8c1fd
PA
3764set remote multiprocess-extensions-packet
3765show remote multiprocess-extensions-packet
3766 Set/show the use of the remote protocol multiprocess extensions.
3767
65706a29
PA
3768set remote thread-events
3769show remote thread-events
3770 Set/show the use of thread create/exit events.
3771
3685b09f
PMR
3772set ada print-signatures on|off
3773show ada print-signatures"
3774 Control whether parameter types and return types are displayed in overloads
82f06518 3775 selection menus. It is activated (@code{on}) by default.
3685b09f 3776
5fdf6324
AB
3777set max-value-size
3778show max-value-size
3779 Controls the maximum size of memory, in bytes, that GDB will
3780 allocate for value contents. Prevents incorrect programs from
3781 causing GDB to allocate overly large buffers. Default is 64k.
3782
6ff0ba5f
DE
3783* The "disassemble" command accepts a new modifier: /s.
3784 It prints mixed source+disassembly like /m with two differences:
3785 - disassembled instructions are now printed in program order, and
3786 - and source for all relevant files is now printed.
3787 The "/m" option is now considered deprecated: its "source-centric"
3788 output hasn't proved useful in practice.
3789
0c532a29
MM
3790* The "record instruction-history" command accepts a new modifier: /s.
3791 It behaves exactly like /m and prints mixed source+disassembly.
3792
f2665db5
MM
3793* The "set scheduler-locking" command supports a new mode "replay".
3794 It behaves like "off" in record mode and like "on" in replay mode.
3795
40e0b271
PA
3796* Support for various ROM monitors has been removed:
3797
3798 target dbug dBUG ROM monitor for Motorola ColdFire
3799 target picobug Motorola picobug monitor
3800 target dink32 DINK32 ROM monitor for PowerPC
3801 target m32r Renesas M32R/D ROM monitor
3802 target mon2000 mon2000 ROM monitor
3803 target ppcbug PPCBUG ROM monitor for PowerPC
3804
fd2ae5d6 3805* Support for reading/writing memory and extracting values on architectures
d63dd61e 3806 whose memory is addressable in units of any integral multiple of 8 bits.
fd2ae5d6 3807
9f757bf7
XR
3808catch handlers
3809 Allows to break when an Ada exception is handled.
3810
b459a59b
DB
3811* New remote packets
3812
3813exec stop reason
3814 Indicates that an exec system call was executed.
3815
3816exec-events feature in qSupported
3817 The qSupported packet allows GDB to request support for exec
3818 events using the new 'gdbfeature' exec-event, and the qSupported
3819 response can contain the corresponding 'stubfeature'. Set and
3820 show commands can be used to display whether these features are enabled.
3821
de979965
PA
3822vCtrlC
3823 Equivalent to interrupting with the ^C character, but works in
3824 non-stop mode.
3825
65706a29
PA
3826thread created stop reason (T05 create:...)
3827 Indicates that the thread was just created and is stopped at entry.
3828
3829thread exit stop reply (w exitcode;tid)
3830 Indicates that the thread has terminated.
3831
3832QThreadEvents
3833 Enables/disables thread create and exit event reporting. For
3834 example, this is used in non-stop mode when GDB stops a set of
3835 threads and synchronously waits for the their corresponding stop
3836 replies. Without exit events, if one of the threads exits, GDB
3837 would hang forever not knowing that it should no longer expect a
3838 stop for that same thread.
3839
f2faf941 3840N stop reply
f2faf941
PA
3841 Indicates that there are no resumed threads left in the target (all
3842 threads are stopped). The remote stub reports support for this stop
3843 reply to GDB's qSupported query.
3844
aab3c527
JK
3845QCatchSyscalls
3846 Enables/disables catching syscalls from the inferior process.
3847 The remote stub reports support for this packet to GDB's qSupported query.
82075af2
JS
3848
3849syscall_entry stop reason
3850 Indicates that a syscall was just called.
3851
3852syscall_return stop reason
3853 Indicates that a syscall just returned.
3854
b459a59b
DB
3855* Extended-remote exec events
3856
3857 ** GDB now has support for exec events on extended-remote Linux targets.
3858 For such targets with Linux kernels 2.5.46 and later, this enables
3859 follow-exec-mode and exec catchpoints.
3860
3861set remote exec-event-feature-packet
3862show remote exec-event-feature-packet
3863 Set/show the use of the remote exec event feature.
3864
79efa585
SM
3865 * Thread names in remote protocol
3866
3867 The reply to qXfer:threads:read may now include a name attribute for each
3868 thread.
3869
19d9d4ef
DB
3870* Target remote mode fork and exec events
3871
3872 ** GDB now has support for fork and exec events on target remote mode
3873 Linux targets. For such targets with Linux kernels 2.5.46 and later,
3874 this enables follow-fork-mode, detach-on-fork, follow-exec-mode, and
3875 fork and exec catchpoints.
3876
82075af2
JS
3877* Remote syscall events
3878
3879 ** GDB now has support for catch syscall on remote Linux targets,
3880 currently enabled on x86/x86_64 architectures.
3881
3882set remote catch-syscall-packet
3883show remote catch-syscall-packet
3884 Set/show the use of the remote catch syscall feature.
3885
1c35a88f
LM
3886* MI changes
3887
3888 ** The -var-set-format command now accepts the zero-hexadecimal
3889 format. It outputs data in hexadecimal format with zero-padding on the
3890 left.
3891
84654457
PA
3892* Python Scripting
3893
22a02324
PA
3894 ** gdb.InferiorThread objects have a new attribute "global_num",
3895 which refers to the thread's global thread ID. The existing
3896 "num" attribute now refers to the thread's per-inferior number.
3897 See "Per-inferior thread numbers" above.
84654457
PA
3898 ** gdb.InferiorThread objects have a new attribute "inferior", which
3899 is the Inferior object the thread belongs to.
3900
7c79d316 3901*** Changes in GDB 7.10
df8411da 3902
c16a3f52
OJ
3903* Support for process record-replay and reverse debugging on aarch64*-linux*
3904 targets has been added. GDB now supports recording of A64 instruction set
3905 including advance SIMD instructions.
3906
18a94d75
DE
3907* Support for Sun's version of the "stabs" debug file format has been removed.
3908
df8411da
SDJ
3909* GDB now honors the content of the file /proc/PID/coredump_filter
3910 (PID is the process ID) on GNU/Linux systems. This file can be used
3911 to specify the types of memory mappings that will be included in a
3912 corefile. For more information, please refer to the manual page of
3913 "core(5)". GDB also has a new command: "set use-coredump-filter
3914 on|off". It allows to set whether GDB will read the content of the
3915 /proc/PID/coredump_filter file when generating a corefile.
3b2f13ff 3916
d33279b3
AT
3917* The "info os" command on GNU/Linux can now display information on
3918 cpu information :
3919 "info os cpus" Listing of all cpus/cores on the system
3920
236af5e3
YG
3921* GDB has two new commands: "set serial parity odd|even|none" and
3922 "show serial parity". These allows to set or show parity for the
3923 remote serial I/O.
3924
b6577aab
DE
3925* The "info source" command now displays the producer string if it was
3926 present in the debug info. This typically includes the compiler version
3927 and may include things like its command line arguments.
3928
b30a0bc3
JB
3929* The "info dll", an alias of the "info sharedlibrary" command,
3930 is now available on all platforms.
3931
599bd15c
GB
3932* Directory names supplied to the "set sysroot" commands may be
3933 prefixed with "target:" to tell GDB to access shared libraries from
3934 the target system, be it local or remote. This replaces the prefix
3935 "remote:". The default sysroot has been changed from "" to
3936 "target:". "remote:" is automatically converted to "target:" for
3937 backward compatibility.
3938
a9a5a3d1
GB
3939* The system root specified by "set sysroot" will be prepended to the
3940 filename of the main executable (if reported to GDB as absolute by
3941 the operating system) when starting processes remotely, and when
3942 attaching to already-running local or remote processes.
3943
1b6e6f5c
GB
3944* GDB now supports automatic location and retrieval of executable
3945 files from remote targets. Remote debugging can now be initiated
3946 using only a "target remote" or "target extended-remote" command
3947 (no "set sysroot" or "file" commands are required). See "New remote
3948 packets" below.
3949
cf75d6c3
AB
3950* The "dump" command now supports verilog hex format.
3951
417c80f9
AA
3952* GDB now supports the vector ABI on S/390 GNU/Linux targets.
3953
51aad7cc
GB
3954* On GNU/Linux, GDB and gdbserver are now able to access executable
3955 and shared library files without a "set sysroot" command when
3956 attaching to processes running in different mount namespaces from
3957 the debugger. This makes it possible to attach to processes in
3958 containers as simply as "gdb -p PID" or "gdbserver --attach PID".
3959 See "New remote packets" below.
3960
51f0e40d
AB
3961* The "tui reg" command now provides completion for all of the
3962 available register groups, including target specific groups.
3963
b58c513b
PP
3964* The HISTSIZE environment variable is no longer read when determining
3965 the size of GDB's command history. GDB now instead reads the dedicated
bc460514
PP
3966 GDBHISTSIZE environment variable. Setting GDBHISTSIZE to "-1" or to "" now
3967 disables truncation of command history. Non-numeric values of GDBHISTSIZE
3968 are ignored.
b58c513b 3969
37442ce1
DE
3970* Guile Scripting
3971
3972 ** Memory ports can now be unbuffered.
3973
3a8b707a
DE
3974* Python Scripting
3975
3976 ** gdb.Objfile objects have a new attribute "username",
3977 which is the name of the objfile as specified by the user,
3978 without, for example, resolving symlinks.
d11916aa 3979 ** You can now write frame unwinders in Python.
59fb7612
SS
3980 ** gdb.Type objects have a new method "optimized_out",
3981 returning optimized out gdb.Value instance of this type.
4c082a81
SC
3982 ** gdb.Value objects have new methods "reference_value" and
3983 "const_value" which return a reference to the value and a
3984 "const" version of the value respectively.
3a8b707a 3985
f57d2163
DE
3986* New commands
3987
3988maint print symbol-cache
3989 Print the contents of the symbol cache.
3990
3991maint print symbol-cache-statistics
3992 Print statistics of symbol cache usage.
3993
3994maint flush-symbol-cache
3995 Flush the contents of the symbol cache.
3996
f4abbc16
MM
3997record btrace bts
3998record bts
3999 Start branch trace recording using Branch Trace Store (BTS) format.
4000
36de76f9
JK
4001compile print
4002 Evaluate expression by using the compiler and print result.
4003
a4ea0946
AB
4004tui enable
4005tui disable
4006 Explicit commands for enabling and disabling tui mode.
4007
29c1c244
WT
4008show mpx bound
4009set mpx bound on i386 and amd64
bc504a31 4010 Support for bound table investigation on Intel MPX enabled applications.
29c1c244 4011
b20a6524
MM
4012record btrace pt
4013record pt
bc504a31 4014 Start branch trace recording using Intel Processor Trace format.
b20a6524 4015
b0627500
MM
4016maint info btrace
4017 Print information about branch tracing internals.
4018
4019maint btrace packet-history
4020 Print the raw branch tracing data.
4021
4022maint btrace clear-packet-history
4023 Discard the stored raw branch tracing data.
4024
4025maint btrace clear
4026 Discard all branch tracing data. It will be fetched and processed
4027 anew by the next "record" command.
4028
253828f1
JK
4029* New options
4030
b4f54984
DE
4031set debug dwarf-die
4032 Renamed from "set debug dwarf2-die".
4033show debug dwarf-die
4034 Renamed from "show debug dwarf2-die".
4035
4036set debug dwarf-read
4037 Renamed from "set debug dwarf2-read".
4038show debug dwarf-read
4039 Renamed from "show debug dwarf2-read".
4040
4041maint set dwarf always-disassemble
4042 Renamed from "maint set dwarf2 always-disassemble".
4043maint show dwarf always-disassemble
4044 Renamed from "maint show dwarf2 always-disassemble".
4045
4046maint set dwarf max-cache-age
4047 Renamed from "maint set dwarf2 max-cache-age".
4048maint show dwarf max-cache-age
4049 Renamed from "maint show dwarf2 max-cache-age".
4050
27e0867f
DE
4051set debug dwarf-line
4052show debug dwarf-line
4053 Control display of debugging info regarding DWARF line processing.
4054
ef0b411a
GB
4055set max-completions
4056show max-completions
4057 Set the maximum number of candidates to be considered during
4058 completion. The default value is 200. This limit allows GDB
4059 to avoid generating large completion lists, the computation of
4060 which can cause the debugger to become temporarily unresponsive.
4061
fc637f04
PP
4062set history remove-duplicates
4063show history remove-duplicates
4064 Control the removal of duplicate history entries.
4065
f57d2163
DE
4066maint set symbol-cache-size
4067maint show symbol-cache-size
4068 Control the size of the symbol cache.
4069
d33501a5
MM
4070set|show record btrace bts buffer-size
4071 Set and show the size of the ring buffer used for branch tracing in
4072 BTS format.
4073 The obtained size may differ from the requested size. Use "info
4074 record" to see the obtained buffer size.
4075
7a6a1731
GB
4076set debug linux-namespaces
4077show debug linux-namespaces
4078 Control display of debugging info regarding Linux namespaces.
4079
b20a6524
MM
4080set|show record btrace pt buffer-size
4081 Set and show the size of the ring buffer used for branch tracing in
bc504a31 4082 Intel Processor Trace format.
b20a6524
MM
4083 The obtained size may differ from the requested size. Use "info
4084 record" to see the obtained buffer size.
4085
b0627500
MM
4086maint set|show btrace pt skip-pad
4087 Set and show whether PAD packets are skipped when computing the
4088 packet history.
4089
253828f1
JK
4090* The command 'thread apply all' can now support new option '-ascending'
4091 to call its specified command for all threads in ascending order.
4092
9f050062
DE
4093* Python/Guile scripting
4094
4095 ** GDB now supports auto-loading of Python/Guile scripts contained in the
4096 special section named `.debug_gdb_scripts'.
4097
f4abbc16
MM
4098* New remote packets
4099
4100qXfer:btrace-conf:read
4101 Return the branch trace configuration for the current thread.
4102
d33501a5
MM
4103Qbtrace-conf:bts:size
4104 Set the requested ring buffer size for branch tracing in BTS format.
4105
b20a6524 4106Qbtrace:pt
82f06518 4107 Enable Intel Processor Trace-based branch tracing for the current
b20a6524
MM
4108 process. The remote stub reports support for this packet to GDB's
4109 qSupported query.
4110
4111Qbtrace-conf:pt:size
bc504a31 4112 Set the requested ring buffer size for branch tracing in Intel Processor
b20a6524
MM
4113 Trace format.
4114
f7e6eed5
PA
4115swbreak stop reason
4116 Indicates a memory breakpoint instruction was executed, irrespective
4117 of whether it was GDB that planted the breakpoint or the breakpoint
4118 is hardcoded in the program. This is required for correct non-stop
4119 mode operation.
4120
4121hwbreak stop reason
4122 Indicates the target stopped for a hardware breakpoint. This is
4123 required for correct non-stop mode operation.
4124
0a93529c
GB
4125vFile:fstat:
4126 Return information about files on the remote system.
4127
c78fa86a
GB
4128qXfer:exec-file:read
4129 Return the full absolute name of the file that was executed to
4130 create a process running on the remote system.
4131
15a201c8
GB
4132vFile:setfs:
4133 Select the filesystem on which vFile: operations with filename
4134 arguments will operate. This is required for GDB to be able to
4135 access files on remote targets where the remote stub does not
4136 share a common filesystem with the inferior(s).
4137
0d71eef5
DB
4138fork stop reason
4139 Indicates that a fork system call was executed.
4140
4141vfork stop reason
4142 Indicates that a vfork system call was executed.
4143
4144vforkdone stop reason
4145 Indicates that a vfork child of the specified process has executed
4146 an exec or exit, allowing the vfork parent to resume execution.
4147
4148fork-events and vfork-events features in qSupported
994bc098 4149 The qSupported packet allows GDB to request support for fork and
0d71eef5
DB
4150 vfork events using new 'gdbfeatures' fork-events and vfork-events,
4151 and the qSupported response can contain the corresponding
4152 'stubfeatures'. Set and show commands can be used to display
4153 whether these features are enabled.
4154
4155* Extended-remote fork events
4156
4157 ** GDB now has support for fork events on extended-remote Linux
4158 targets. For targets with Linux kernels 2.5.60 and later, this
4159 enables follow-fork-mode and detach-on-fork for both fork and
4160 vfork, as well as fork and vfork catchpoints.
4161
d33501a5
MM
4162* The info record command now shows the recording format and the
4163 branch tracing configuration for the current thread when using
4164 the btrace record target.
4165 For the BTS format, it shows the ring buffer size.
4166
b05e3b0d
JM
4167* GDB now has support for DTrace USDT (Userland Static Defined
4168 Tracing) probes. The supported targets are x86_64-*-linux-gnu.
4169
550bdf96
AA
4170* GDB now supports access to vector registers on S/390 GNU/Linux
4171 targets.
4172
4f45d445
JK
4173* Removed command line options
4174
4175-xdb HP-UX XDB compatibility mode.
4176
0800b440
JK
4177* Removed targets and native configurations
4178
4179HP/PA running HP-UX hppa*-*-hpux*
4180Itanium running HP-UX ia64-*-hpux*
4181
58bfce93
MM
4182* New configure options
4183
4184--with-intel-pt
4185 This configure option allows the user to build GDB with support for
bc504a31 4186 Intel Processor Trace (default: auto). This requires libipt.
58bfce93
MM
4187
4188--with-libipt-prefix=PATH
4189 Specify the path to the version of libipt that GDB should use.
4190 $PATH/include should contain the intel-pt.h header and
4191 $PATH/lib should contain the libipt.so library.
4192
f5f85ab9
JB
4193*** Changes in GDB 7.9.1
4194
4195* Python Scripting
4196
4197 ** Xmethods can now specify a result type.
4198
3b2f13ff 4199*** Changes in GDB 7.9
919b9a93 4200
05db5edd
ST
4201* GDB now supports hardware watchpoints on x86 GNU Hurd.
4202
5f3b99cf 4203* Python Scripting
2b4fd423
DE
4204
4205 ** You can now access frame registers from Python scripts.
4206 ** New attribute 'producer' for gdb.Symtab objects.
d096d8c1
DE
4207 ** gdb.Objfile objects have a new attribute "progspace",
4208 which is the gdb.Progspace object of the containing program space.
a0be3e44 4209 ** gdb.Objfile objects have a new attribute "owner".
7c50a931
DE
4210 ** gdb.Objfile objects have a new attribute "build_id",
4211 which is the build ID generated when the file was built.
86e4ed39 4212 ** gdb.Objfile objects have a new method "add_separate_debug_file".
4ffbba72
DE
4213 ** A new event "gdb.clear_objfiles" has been added, triggered when
4214 selecting a new file to debug.
02be9a71 4215 ** You can now add attributes to gdb.Objfile and gdb.Progspace objects.
6dddd6a5 4216 ** New function gdb.lookup_objfile.
5f3b99cf 4217
994bc098 4218 New events which are triggered when GDB modifies the state of the
8fda9068
YQ
4219 inferior.
4220
4221 ** gdb.events.inferior_call_pre: Function call is about to be made.
4222 ** gdb.events.inferior_call_post: Function call has just been made.
4223 ** gdb.events.memory_changed: A memory location has been altered.
4224 ** gdb.events.register_changed: A register has been altered.
4225
faa42425
DE
4226* New Python-based convenience functions:
4227
4228 ** $_caller_is(name [, number_of_frames])
4229 ** $_caller_matches(regexp [, number_of_frames])
4230 ** $_any_caller_is(name [, number_of_frames])
4231 ** $_any_caller_matches(regexp [, number_of_frames])
4232
bb2ec1b3
TT
4233* GDB now supports the compilation and injection of source code into
4234 the inferior. GDB will use GCC 5.0 or higher built with libcc1.so
4235 to compile the source code to object code, and if successful, inject
4236 and execute that code within the current context of the inferior.
4237 Currently the C language is supported. The commands used to
4238 interface with this new feature are:
4239
4240 compile code [-raw|-r] [--] [source code]
4241 compile file [-raw|-r] filename
4242
81219e53
DE
4243* New commands
4244
439250fb
DE
4245demangle [-l language] [--] name
4246 Demangle "name" in the specified language, or the current language
4247 if elided. This command is renamed from the "maint demangle" command.
4248 The latter is kept as a no-op to avoid "maint demangle" being interpreted
4249 as "maint demangler-warning".
4250
81219e53
DE
4251queue-signal signal-name-or-number
4252 Queue a signal to be delivered to the thread when it is resumed.
4253
f10c5b19
JK
4254add-auto-load-scripts-directory directory
4255 Add entries to the list of directories from which to load auto-loaded
4256 scripts.
4257
f5b95c01
AA
4258maint print user-registers
4259 List all currently available "user" registers.
4260
bb2ec1b3
TT
4261compile code [-r|-raw] [--] [source code]
4262 Compile, inject, and execute in the inferior the executable object
4263 code produced by compiling the provided source code.
4264
4265compile file [-r|-raw] filename
4266 Compile and inject into the inferior the executable object code
4267 produced by compiling the source code stored in the filename
4268 provided.
4269
70509625
PA
4270* On resume, GDB now always passes the signal the program had stopped
4271 for to the thread the signal was sent to, even if the user changed
4272 threads before resuming. Previously GDB would often (but not
4273 always) deliver the signal to the thread that happens to be current
4274 at resume time.
4275
4276* Conversely, the "signal" command now consistently delivers the
4277 requested signal to the current thread. GDB now asks for
4278 confirmation if the program had stopped for a signal and the user
4279 switched threads meanwhile.
4280
a25a5a45
PA
4281* "breakpoint always-inserted" modes "off" and "auto" merged.
4282
4283 Now, when 'breakpoint always-inserted mode' is set to "off", GDB
4284 won't remove breakpoints from the target until all threads stop,
4285 even in non-stop mode. The "auto" mode has been removed, and "off"
4286 is now the default mode.
4287
cc485e62
DE
4288* New options
4289
4290set debug symbol-lookup
4291show debug symbol-lookup
4292 Control display of debugging info regarding symbol lookup.
4293
2ddf4301
SM
4294* MI changes
4295
4296 ** The -list-thread-groups command outputs an exit-code field for
4297 inferiors that have exited.
4298
bb7e3f4d
YQ
4299* New targets
4300
4301MIPS SDE mips*-sde*-elf*
4302
3831839c
PA
4303* Removed targets
4304
4305Support for these obsolete configurations has been removed.
4306
5ab806de
PA
4307Alpha running OSF/1 (or Tru64) alpha*-*-osf*
4308SGI Irix-5.x mips-*-irix5*
4309SGI Irix-6.x mips-*-irix6*
09dd9a69
PA
4310VAX running (4.2 - 4.3 Reno) BSD vax-*-bsd*
4311VAX running Ultrix vax-*-ultrix*
3831839c 4312
6bf6fd09
JB
4313* The "dll-symbols" command, and its two aliases ("add-shared-symbol-files"
4314 and "assf"), have been removed. Use the "sharedlibrary" command, or
4315 its alias "share", instead.
4316
919b9a93 4317*** Changes in GDB 7.8
e9475ead 4318
8d551b02
DE
4319* New command line options
4320
4321-D data-directory
4322 This is an alias for the --data-directory option.
4323
e9475ead
SA
4324* GDB supports printing and modifying of variable length automatic arrays
4325 as specified in ISO C99.
4326
a75fef0e
NC
4327* The ARM simulator now supports instruction level tracing
4328 with or without disassembly.
b7bba001 4329
ed3ef339
DE
4330* Guile scripting
4331
4332 GDB now has support for scripting using Guile. Whether this is
4333 available is determined at configure time.
4334 Guile version 2.0 or greater is required.
4335 Guile version 2.0.9 is well tested, earlier 2.0 versions are not.
4336
4337* New commands (for set/show, see "New options" below)
4338
4339guile [code]
4340gu [code]
4341 Invoke CODE by passing it to the Guile interpreter.
4342
4343guile-repl
4344gr
4345 Start a Guile interactive prompt (or "repl" for "read-eval-print loop").
4346
4347info auto-load guile-scripts [regexp]
4348 Print the list of automatically loaded Guile scripts.
4349
4350* The source command is now capable of sourcing Guile scripts.
4351 This feature is dependent on the debugger being built with Guile support.
4352
c6044dd1
JB
4353* New options
4354
770e7fc7
DE
4355set print symbol-loading (off|brief|full)
4356show print symbol-loading
4357 Control whether to print informational messages when loading symbol
4358 information for a file. The default is "full", but when debugging
4359 programs with large numbers of shared libraries the amount of output
4360 becomes less useful.
4361
ed3ef339
DE
4362set guile print-stack (none|message|full)
4363show guile print-stack
4364 Show a stack trace when an error is encountered in a Guile script.
4365
4366set auto-load guile-scripts (on|off)
4367show auto-load guile-scripts
4368 Control auto-loading of Guile script files.
4369
c6044dd1
JB
4370maint ada set ignore-descriptive-types (on|off)
4371maint ada show ignore-descriptive-types
4372 Control whether the debugger should ignore descriptive types in Ada
4373 programs. The default is not to ignore the descriptive types. See
4374 the user manual for more details on descriptive types and the intended
4375 usage of this option.
4376
6a3cb8e8
PA
4377set auto-connect-native-target
4378
4379 Control whether GDB is allowed to automatically connect to the
4380 native target for the run, attach, etc. commands when not connected
4381 to any target yet. See also "target native" below.
4382
67b5c0c1
MM
4383set record btrace replay-memory-access (read-only|read-write)
4384show record btrace replay-memory-access
4385 Control what memory accesses are allowed during replay.
4386
329ea579
PA
4387maint set target-async (on|off)
4388maint show target-async
5784b3ca
JK
4389 This controls whether GDB targets operate in synchronous or
4390 asynchronous mode. Normally the default is asynchronous, if it is
329ea579 4391 available; but this can be changed to more easily debug problems
5784b3ca 4392 occurring only in synchronous mode.
329ea579
PA
4393
4394set mi-async (on|off)
4395show mi-async
4396 Control whether MI asynchronous mode is preferred. This supersedes
4397 "set target-async" of previous GDB versions.
4398
4399* "set target-async" is deprecated as a CLI option and is now an alias
4400 for "set mi-async" (only puts MI into async mode).
4401
4402* Background execution commands (e.g., "c&", "s&", etc.) are now
4403 possible ``out of the box'' if the target supports them. Previously
4404 the user would need to explicitly enable the possibility with the
4405 "set target-async on" command.
4406
87ce2a04
DE
4407* New features in the GDB remote stub, GDBserver
4408
4409 ** New option --debug-format=option1[,option2,...] allows one to add
4410 additional text to each output. At present only timestamps
4411 are supported: --debug-format=timestamps.
4412 Timestamps can also be turned on with the
4413 "monitor set debug-format timestamps" command from GDB.
4414
5de9129b
MM
4415* The 'record instruction-history' command now starts counting instructions
4416 at one. This also affects the instruction ranges reported by the
4417 'record function-call-history' command when given the /i modifier.
4418
8710b709
MM
4419* The command 'record function-call-history' supports a new modifier '/c' to
4420 indent the function names based on their call stack depth.
4421 The fields for the '/i' and '/l' modifier have been reordered.
4422 The source line range is now prefixed with 'at'.
4423 The instruction range is now prefixed with 'inst'.
4424 Both ranges are now printed as '<from>, <to>' to allow copy&paste to the
4425 "record instruction-history" and "list" commands.
4426
0688d04e
MM
4427* The ranges given as arguments to the 'record function-call-history' and
4428 'record instruction-history' commands are now inclusive.
4429
066ce621 4430* The btrace record target now supports the 'record goto' command.
0b722aec
MM
4431 For locations inside the execution trace, the back trace is computed
4432 based on the information stored in the execution trace.
066ce621 4433
52834460
MM
4434* The btrace record target supports limited reverse execution and replay.
4435 The target does not record data and therefore does not allow reading
4436 memory or registers.
4437
237b092b
AA
4438* The "catch syscall" command now works on s390*-linux* targets.
4439
936d2992
PA
4440* The "compare-sections" command is no longer specific to target
4441 remote. It now works with all targets.
4442
930ee1b1
PA
4443* All native targets are now consistently called "native".
4444 Consequently, the "target child", "target GNU", "target djgpp",
4445 "target procfs" (Solaris/Irix/OSF/AIX) and "target darwin-child"
4446 commands have been replaced with "target native". The QNX/NTO port
4447 leaves the "procfs" target in place and adds a "native" target for
4448 consistency with other ports. The impact on users should be minimal
add18b78 4449 as these commands previously either threw an error, or were
930ee1b1
PA
4450 no-ops. The target's name is visible in the output of the following
4451 commands: "help target", "info target", "info files", "maint print
4452 target-stack".
4453
6a3cb8e8
PA
4454* The "target native" command now connects to the native target. This
4455 can be used to launch native programs even when "set
4456 auto-connect-native-target" is set to off.
4457
bc504a31 4458* GDB now supports access to Intel MPX registers on GNU/Linux.
dc304a94 4459
bc504a31
PA
4460* Support for Intel AVX-512 registers on GNU/Linux.
4461 Support displaying and modifying Intel AVX-512 registers
dc304a94
JK
4462 $zmm0 - $zmm31 and $k0 - $k7 on GNU/Linux.
4463
969c39fb
MM
4464* New remote packets
4465
4466qXfer:btrace:read's annex
4467 The qXfer:btrace:read packet supports a new annex 'delta' to read
4468 branch trace incrementally.
4469
f7bd0f78
SC
4470* Python Scripting
4471
4472 ** Valid Python operations on gdb.Value objects representing
4473 structs/classes invoke the corresponding overloaded operators if
4474 available.
0c6e92a5
SC
4475 ** New `Xmethods' feature in the Python API. Xmethods are
4476 additional methods or replacements for existing methods of a C++
4477 class. This feature is useful for those cases where a method
4478 defined in C++ source code could be inlined or optimized out by
4479 the compiler, making it unavailable to GDB.
f7bd0f78 4480
36c24d95
UW
4481* New targets
4482PowerPC64 GNU/Linux little-endian powerpc64le-*-linux*
4483
95060284
JB
4484* The "dll-symbols" command, and its two aliases ("add-shared-symbol-files"
4485 and "assf"), have been deprecated. Use the "sharedlibrary" command, or
4486 its alias "share", instead.
4487
7f3c0343
JB
4488* The commands "set remotebaud" and "show remotebaud" are no longer
4489 supported. Use "set serial baud" and "show serial baud" (respectively)
4490 instead.
4491
329ea579
PA
4492* MI changes
4493
4494 ** A new option "-gdb-set mi-async" replaces "-gdb-set
4495 target-async". The latter is left as a deprecated alias of the
4496 former for backward compatibility. If the target supports it,
4497 CLI background execution commands are now always possible by
4498 default, independently of whether the frontend stated a
4499 preference for asynchronous execution with "-gdb-set mi-async".
4500 Previously "-gdb-set target-async off" affected both MI execution
4501 commands and CLI execution commands.
4502
b7bba001 4503*** Changes in GDB 7.7
2d450646 4504
33a97bbe
OJ
4505* Improved support for process record-replay and reverse debugging on
4506 arm*-linux* targets. Support for thumb32 and syscall instruction
4507 recording has been added.
4508
08248ca9
SDJ
4509* GDB now supports SystemTap SDT probes on AArch64 GNU/Linux.
4510
73869dc2
DE
4511* GDB now supports Fission DWP file format version 2.
4512 http://gcc.gnu.org/wiki/DebugFission
4513
a280dbd1
SDJ
4514* New convenience function "$_isvoid", to check whether an expression
4515 is void. A void expression is an expression where the type of the
4516 result is "void". For example, some convenience variables may be
4517 "void" when evaluated (e.g., "$_exitcode" before the execution of
4518 the program being debugged; or an undefined convenience variable).
4519 Another example, when calling a function whose return type is
4520 "void".
4521
52e260a3
DE
4522* The "maintenance print objfiles" command now takes an optional regexp.
4523
9f948660
SDJ
4524* The "catch syscall" command now works on arm*-linux* targets.
4525
901461f8
PA
4526* GDB now consistently shows "<not saved>" when printing values of
4527 registers the debug info indicates have not been saved in the frame
4528 and there's nowhere to retrieve them from
4529 (callee-saved/call-clobbered registers):
4530
4531 (gdb) p $rax
4532 $1 = <not saved>
4533
4534 (gdb) info registers rax
4535 rax <not saved>
4536
4537 Before, the former would print "<optimized out>", and the latter
4538 "*value not available*".
4539
caf26be9
SB
4540* New script contrib/gdb-add-index.sh for adding .gdb_index sections
4541 to binaries.
4542
1e611234
PM
4543* Python scripting
4544
4545 ** Frame filters and frame decorators have been added.
f76c27b5 4546 ** Temporary breakpoints are now supported.
bc79de95 4547 ** Line tables representation has been added.
a16b0e22
SC
4548 ** New attribute 'parent_type' for gdb.Field objects.
4549 ** gdb.Field objects can be used as subscripts on gdb.Value objects.
c0d48811 4550 ** New attribute 'name' for gdb.Type objects.
1e611234 4551
a1217d97
SL
4552* New targets
4553
4554Nios II ELF nios2*-*-elf
4555Nios II GNU/Linux nios2*-*-linux
42059f0e 4556Texas Instruments MSP430 msp430*-*-elf
a1217d97 4557
2659903b
JK
4558* Removed native configurations
4559
4560Support for these a.out NetBSD and OpenBSD obsolete configurations has
4561been removed. ELF variants of these configurations are kept supported.
4562
4563arm*-*-netbsd* but arm*-*-netbsdelf* is kept supported.
4564i[34567]86-*-netbsd* but i[34567]86-*-netbsdelf* is kept supported.
4565i[34567]86-*-openbsd[0-2].* but i[34567]86-*-openbsd* is kept supported.
4566i[34567]86-*-openbsd3.[0-3]
4567m68*-*-netbsd* but m68*-*-netbsdelf* is kept supported.
4568sparc-*-netbsd* but sparc-*-netbsdelf* is kept supported.
4569vax-*-netbsd* but vax-*-netbsdelf* is kept supported.
4570
bd712aed 4571* New commands:
b340913d
TT
4572catch rethrow
4573 Like "catch throw", but catches a re-thrown exception.
7d0c9981
DE
4574maint check-psymtabs
4575 Renamed from old "maint check-symtabs".
4576maint check-symtabs
4577 Perform consistency checks on symtabs.
4578maint expand-symtabs
4579 Expand symtabs matching an optional regexp.
b340913d 4580
dccca75d
EZ
4581show configuration
4582 Display the details of GDB configure-time options.
4583
bd712aed
DE
4584maint set|show per-command
4585maint set|show per-command space
4586maint set|show per-command time
4587maint set|show per-command symtab
4588 Enable display of per-command gdb resource usage.
4589
98297bf6
NB
4590remove-symbol-file FILENAME
4591remove-symbol-file -a ADDRESS
4592 Remove a symbol file added via add-symbol-file. The file to remove
4593 can be identified by its filename or by an address that lies within
4594 the boundaries of this symbol file in memory.
4595
58d06528
JB
4596info exceptions
4597info exceptions REGEXP
4598 Display the list of Ada exceptions defined in the program being
4599 debugged. If provided, only the exceptions whose names match REGEXP
4600 are listed.
4601
bd3eecc3
PA
4602* New options
4603
8fb8eb5c
DE
4604set debug symfile off|on
4605show debug symfile
4606 Control display of debugging info regarding reading symbol files and
4607 symbol tables within those files
4608
e7045703
DE
4609set print raw frame-arguments
4610show print raw frame-arguments
4611 Set/show whether to print frame arguments in raw mode,
4612 disregarding any defined pretty-printers.
4613
bd3eecc3
PA
4614set remote trace-status-packet
4615show remote trace-status-packet
4616 Set/show the use of remote protocol qTStatus packet.
4617
a1217d97
SL
4618set debug nios2
4619show debug nios2
4620 Control display of debugging messages related to Nios II targets.
4621
c1e36e3e
PA
4622set range-stepping
4623show range-stepping
4624 Control whether target-assisted range stepping is enabled.
4625
98882a26
PA
4626set startup-with-shell
4627show startup-with-shell
4628 Specifies whether Unix child processes are started via a shell or
4629 directly.
4630
29453a14
YQ
4631set code-cache
4632show code-cache
4633 Use the target memory cache for accesses to the code segment. This
4634 improves performance of remote debugging (particularly disassembly).
4635
1c2e4450
PA
4636* You can now use a literal value 'unlimited' for options that
4637 interpret 0 or -1 as meaning "unlimited". E.g., "set
4638 trace-buffer-size unlimited" is now an alias for "set
4639 trace-buffer-size -1" and "set height unlimited" is now an alias for
4640 "set height 0".
4641
db0fec5c
DE
4642* The "set debug symtab-create" debugging option of GDB has been changed to
4643 accept a verbosity level. 0 means "off", 1 provides basic debugging
4644 output, and values of 2 or greater provides more verbose output.
4645
dccca75d
EZ
4646* New command-line options
4647--configuration
4648 Display the details of GDB configure-time options.
4649
d0353e76
YQ
4650* The command 'tsave' can now support new option '-ctf' to save trace
4651 buffer in Common Trace Format.
4652
b292c783
JK
4653* Newly installed $prefix/bin/gcore acts as a shell interface for the
4654 GDB command gcore.
4655
09f2921c 4656* GDB now implements the C++ 'typeid' operator.
6e72ca20 4657
b340913d
TT
4658* The new convenience variable $_exception holds the exception being
4659 thrown or caught at an exception-related catchpoint.
4660
4661* The exception-related catchpoints, like "catch throw", now accept a
4662 regular expression which can be used to filter exceptions by type.
4663
0c557179
SDJ
4664* The new convenience variable $_exitsignal is automatically set to
4665 the terminating signal number when the program being debugged dies
4666 due to an uncaught signal.
4667
d0353e76
YQ
4668* MI changes
4669
403cb6b1 4670 ** All MI commands now accept an optional "--language" option.
4e35e808
JB
4671 Support for this feature can be verified by using the "-list-features"
4672 command, which should contain "language-option".
403cb6b1 4673
6b7cbff1
JB
4674 ** The new command -info-gdb-mi-command allows the user to determine
4675 whether a GDB/MI command is supported or not.
4676
2ea126fa
JB
4677 ** The "^error" result record returned when trying to execute an undefined
4678 GDB/MI command now provides a variable named "code" whose content is the
4679 "undefined-command" error code. Support for this feature can be verified
4680 by using the "-list-features" command, which should contain
4681 "undefined-command-error-code".
4682
d0353e76
YQ
4683 ** The -trace-save MI command can optionally save trace buffer in Common
4684 Trace Format now.
4685
c5867ab6
HZ
4686 ** The new command -dprintf-insert sets a dynamic printf breakpoint.
4687
c898adb7
YQ
4688 ** The command -data-list-register-values now accepts an optional
4689 "--skip-unavailable" option. When used, only the available registers
4690 are displayed.
4691
dc673c81
YQ
4692 ** The new command -trace-frame-collected dumps collected variables,
4693 computed expressions, tvars, memory and registers in a traceframe.
4694
6211c335
YQ
4695 ** The commands -stack-list-locals, -stack-list-arguments and
4696 -stack-list-variables now accept an option "--skip-unavailable".
4697 When used, only the available locals or arguments are displayed.
4698
5713b9b5
JB
4699 ** The -exec-run command now accepts an optional "--start" option.
4700 When used, the command follows the same semantics as the "start"
4701 command, stopping the program's execution at the start of its
72bfa06c
JB
4702 main subprogram. Support for this feature can be verified using
4703 the "-list-features" command, which should contain
4704 "exec-run-start-option".
5713b9b5 4705
40555925
JB
4706 ** The new commands -catch-assert and -catch-exceptions insert
4707 catchpoints stopping the program when Ada exceptions are raised.
4708
58d06528
JB
4709 ** The new command -info-ada-exceptions provides the equivalent of
4710 the new "info exceptions" command.
4711
0201faac
JB
4712* New system-wide configuration scripts
4713 A GDB installation now provides scripts suitable for use as system-wide
4714 configuration scripts for the following systems:
4715 ** ElinOS
4716 ** Wind River Linux
4717
c1e36e3e
PA
4718* GDB now supports target-assigned range stepping with remote targets.
4719 This improves the performance of stepping source lines by reducing
4720 the number of control packets from/to GDB. See "New remote packets"
4721 below.
4722
28a93511
YQ
4723* GDB now understands the element 'tvar' in the XML traceframe info.
4724 It has the id of the collected trace state variables.
4725
4ac33720
UW
4726* On S/390 targets that provide the transactional-execution feature,
4727 the program interruption transaction diagnostic block (TDB) is now
4728 represented as a number of additional "registers" in GDB.
4729
c1e36e3e
PA
4730* New remote packets
4731
4732vCont;r
4733
4734 The vCont packet supports a new 'r' action, that tells the remote
4735 stub to step through an address range itself, without GDB
4736 involvemement at each single-step.
4737
7f91dbec
GB
4738qXfer:libraries-svr4:read's annex
4739 The previously unused annex of the qXfer:libraries-svr4:read packet
4740 is now used to support passing an argument list. The remote stub
4741 reports support for this argument list to GDB's qSupported query.
4742 The defined arguments are "start" and "prev", used to reduce work
4743 necessary for library list updating, resulting in significant
4744 speedup.
4745
c2d6af84
PA
4746* New features in the GDB remote stub, GDBserver
4747
4748 ** GDBserver now supports target-assisted range stepping. Currently
4749 enabled on x86/x86_64 GNU/Linux targets.
4750
28a93511
YQ
4751 ** GDBserver now adds element 'tvar' in the XML in the reply to
4752 'qXfer:traceframe-info:read'. It has the id of the collected
4753 trace state variables.
4754
7a60ad40
YQ
4755 ** GDBserver now supports hardware watchpoints on the MIPS GNU/Linux
4756 target.
4757
6fbe845e
AB
4758* New 'z' formatter for printing and examining memory, this displays the
4759 value as hexadecimal zero padded on the left to the size of the type.
4760
9058cc3a
TG
4761* GDB can now use Windows x64 unwinding data.
4762
0d12017b
JB
4763* The "set remotebaud" command has been replaced by "set serial baud".
4764 Similarly, "show remotebaud" has been replaced by "show serial baud".
4765 The "set remotebaud" and "show remotebaud" commands are still available
4766 to provide backward compatibility with older versions of GDB.
4767
2d450646 4768*** Changes in GDB 7.6
80c8d323 4769
59ea5688
MM
4770* Target record has been renamed to record-full.
4771 Record/replay is now enabled with the "record full" command.
4772 This also affects settings that are associated with full record/replay
4773 that have been moved from "set/show record" to "set/show record full":
4774
4775set|show record full insn-number-max
4776set|show record full stop-at-limit
4777set|show record full memory-query
4778
4779* A new record target "record-btrace" has been added. The new target
4780 uses hardware support to record the control-flow of a process. It
4781 does not support replaying the execution, but it implements the
4782 below new commands for investigating the recorded execution log.
4783 This new recording method can be enabled using:
4784
4785record btrace
4786
4787 The "record-btrace" target is only available on Intel Atom processors
4788 and requires a Linux kernel 2.6.32 or later.
4789
4790* Two new commands have been added for record/replay to give information
4791 about the recorded execution without having to replay the execution.
4792 The commands are only supported by "record btrace".
4793
4794record instruction-history prints the execution history at
4795 instruction granularity
4796
4797record function-call-history prints the execution history at
4798 function granularity
4799
543bf33d
AT
4800* New native configurations
4801
51d66578 4802ARM AArch64 GNU/Linux aarch64*-*-linux-gnu
543bf33d 4803FreeBSD/powerpc powerpc*-*-freebsd
4f4352f7 4804x86_64/Cygwin x86_64-*-cygwin*
ea5f3910 4805Tilera TILE-Gx GNU/Linux tilegx*-*-linux-gnu
543bf33d 4806
249729c4
JB
4807* New targets
4808
51d66578
MS
4809ARM AArch64 aarch64*-*-elf
4810ARM AArch64 GNU/Linux aarch64*-*-linux
249729c4 4811Lynx 178 PowerPC powerpc-*-lynx*178
3c095f49 4812x86_64/Cygwin x86_64-*-cygwin*
ea5f3910 4813Tilera TILE-Gx GNU/Linux tilegx*-*-linux
249729c4 4814
e64e0392
DE
4815* If the configured location of system.gdbinit file (as given by the
4816 --with-system-gdbinit option at configure time) is in the
4817 data-directory (as specified by --with-gdb-datadir at configure
4818 time) or in one of its subdirectories, then GDB will look for the
4819 system-wide init file in the directory specified by the
4820 --data-directory command-line option.
4821
07540c15
DE
4822* New command line options:
4823
4824-nh Disables auto-loading of ~/.gdbinit, but still executes all the
4825 other initialization files, unlike -nx which disables all of them.
4826
e93a8774
TT
4827* Removed command line options
4828
4829-epoch This was used by the gdb mode in Epoch, an ancient fork of
4830 Emacs.
4831
53342f27
TT
4832* The 'ptype' and 'whatis' commands now accept an argument to control
4833 type formatting.
4834
451b7c33
TT
4835* 'info proc' now works on some core files.
4836
a72c3253
DE
4837* Python scripting
4838
4839 ** Vectors can be created with gdb.Type.vector.
4840
d7de8e3c
TT
4841 ** Python's atexit.register now works in GDB.
4842
18a9fc12
TT
4843 ** Types can be pretty-printed via a Python API.
4844
9a27f2c6
PK
4845 ** Python 3 is now supported (in addition to Python 2.4 or later)
4846
bea883fd
SCR
4847 ** New class gdb.Architecture exposes GDB's internal representation
4848 of architecture in the Python API.
4849
4850 ** New method Frame.architecture returns the gdb.Architecture object
4851 corresponding to the frame's architecture.
4852
a72c3253
DE
4853* New Python-based convenience functions:
4854
4855 ** $_memeq(buf1, buf2, length)
4856 ** $_streq(str1, str2)
4857 ** $_strlen(str)
4858 ** $_regex(str, regex)
4859
f3c8a52a
JK
4860* The 'cd' command now defaults to using '~' (the home directory) if not
4861 given an argument.
4862
1605ef26
TT
4863* The C++ ABI now defaults to the GNU v3 ABI. This has been the
4864 default for GCC since November 2000.
4865
504b36fd
YQ
4866* The command 'forward-search' can now be abbreviated as 'fo'.
4867
f2a8bc8a
YQ
4868* The command 'info tracepoints' can now display 'installed on target'
4869 or 'not installed on target' for each non-pending location of tracepoint.
4870
23a80689
JB
4871* New configure options
4872
4873--enable-libmcheck/--disable-libmcheck
4874 By default, development versions are built with -lmcheck on hosts
4875 that support it, in order to help track memory corruption issues.
4876 Release versions, on the other hand, are built without -lmcheck
4877 by default. The --enable-libmcheck/--disable-libmcheck configure
4878 options allow the user to override that default.
393fd4c3
YQ
4879--with-babeltrace/--with-babeltrace-include/--with-babeltrace-lib
4880 This configure option allows the user to build GDB with
4881 libbabeltrace using which GDB can read Common Trace Format data.
23a80689 4882
d6b28940
TT
4883* New commands (for set/show, see "New options" below)
4884
994bc098 4885catch signal
ab04a2af
TT
4886 Catch signals. This is similar to "handle", but allows commands and
4887 conditions to be attached.
4888
d6b28940
TT
4889maint info bfds
4890 List the BFDs known to GDB.
4891
8315665e
YPK
4892python-interactive [command]
4893pi [command]
4894 Start a Python interactive prompt, or evaluate the optional command
4895 and print the result of expressions.
4896
4897py [command]
4898 "py" is a new alias for "python".
4899
18a9fc12
TT
4900enable type-printer [name]...
4901disable type-printer [name]...
4902 Enable or disable type printers.
4903
aa9259cc
TS
4904* Removed commands
4905
4906 ** For the Renesas Super-H architecture, the "regs" command has been removed
4907 (has been deprecated in GDB 7.5), and "info all-registers" should be used
4908 instead.
4909
53342f27
TT
4910* New options
4911
4912set print type methods (on|off)
4913show print type methods
4914 Control whether method declarations are displayed by "ptype".
4915 The default is to show them.
4916
4917set print type typedefs (on|off)
4918show print type typedefs
4919 Control whether typedef definitions are displayed by "ptype".
4920 The default is to show them.
4921
1b56eb55
JK
4922set filename-display basename|relative|absolute
4923show filename-display
4924 Control the way in which filenames is displayed.
4925 The default is "relative", which preserves previous behavior.
4926
e9f1758d
PA
4927set trace-buffer-size
4928show trace-buffer-size
4929 Request target to change the size of trace buffer.
4930
a46c1e42
PA
4931set remote trace-buffer-size-packet auto|on|off
4932show remote trace-buffer-size-packet
4933 Control the use of the remote protocol `QTBuffer:size' packet.
4934
be9a8770
PA
4935set debug aarch64
4936show debug aarch64
4937 Control display of debugging messages related to ARM AArch64.
4938 The default is off.
4939
4940set debug coff-pe-read
4941show debug coff-pe-read
4942 Control display of debugging messages related to reading of COFF/PE
4943 exported symbols.
4944
4945set debug mach-o
4946show debug mach-o
4947 Control display of debugging messages related to Mach-O symbols
4948 processing.
4949
4950set debug notification
4951show debug notification
4952 Control display of debugging info for async remote notification.
4953
5b9afe8a
YQ
4954* MI changes
4955
4956 ** Command parameter changes are now notified using new async record
4957 "=cmd-param-changed".
201b4506
YQ
4958 ** Trace frame changes caused by command "tfind" are now notified using
4959 new async record "=traceframe-changed".
134a2066
YQ
4960 ** The creation, deletion and modification of trace state variables
4961 are now notified using new async records "=tsv-created",
4962 "=tsv-deleted" and "=tsv-modified".
82a90ccf
YQ
4963 ** The start and stop of process record are now notified using new
4964 async record "=record-started" and "=record-stopped".
8de0566d
YQ
4965 ** Memory changes are now notified using new async record
4966 "=memory-changed".
ed8a1c2d 4967 ** The data-disassemble command response will include a "fullname" field
ec83d211 4968 containing the absolute file name when source has been requested.
994bc098 4969 ** New optional parameter COUNT added to the "-data-write-memory-bytes"
62747a60 4970 command, to allow pattern filling of memory areas.
3fa7bf06
MG
4971 ** New commands "-catch-load"/"-catch-unload" added for intercepting
4972 library load/unload events.
f2a8bc8a
YQ
4973 ** The response to breakpoint commands and breakpoint async records
4974 includes an "installed" field containing a boolean state about each
4975 non-pending tracepoint location is whether installed on target or not.
994bc098 4976 ** Output of the "-trace-status" command includes a "trace-file" field
f5911ea1
HAQ
4977 containing the name of the trace file being examined. This field is
4978 optional, and only present when examining a trace file.
ec83d211
JK
4979 ** The "fullname" field is now always present along with the "file" field,
4980 even if the file cannot be found by GDB.
5b9afe8a 4981
608e2dbb
TT
4982* GDB now supports the "mini debuginfo" section, .gnu_debugdata.
4983 You must have the LZMA library available when configuring GDB for this
4984 feature to be enabled. For more information, see:
4985 http://fedoraproject.org/wiki/Features/MiniDebugInfo
4986
f6f899bf
HAQ
4987* New remote packets
4988
4989QTBuffer:size
4990 Set the size of trace buffer. The remote stub reports support for this
4991 packet to gdb's qSupported query.
4992
10782d74
MM
4993Qbtrace:bts
4994 Enable Branch Trace Store (BTS)-based branch tracing for the current
4995 thread. The remote stub reports support for this packet to gdb's
4996 qSupported query.
4997
4998Qbtrace:off
4999 Disable branch tracing for the current thread. The remote stub reports
5000 support for this packet to gdb's qSupported query.
5001
5002qXfer:btrace:read
5003 Read the traced branches for the current thread. The remote stub
5004 reports support for this packet to gdb's qSupported query.
5005
80c8d323 5006*** Changes in GDB 7.5
d6e00af6 5007
1b3371b1
L
5008* GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/>
5009 for more x32 ABI info.
5010
d0e64392
MR
5011* GDB now supports access to MIPS DSP registers on Linux targets.
5012
4cc0665f
MR
5013* GDB now supports debugging microMIPS binaries.
5014
85d4a676
SS
5015* The "info os" command on GNU/Linux can now display information on
5016 several new classes of objects managed by the operating system:
5017 "info os procgroups" lists process groups
5018 "info os files" lists file descriptors
5019 "info os sockets" lists internet-domain sockets
5020 "info os shm" lists shared-memory regions
5021 "info os semaphores" lists semaphores
5022 "info os msg" lists message queues
5023 "info os modules" lists loaded kernel modules
5024
55aa24fb
SDJ
5025* GDB now has support for SDT (Static Defined Tracing) probes. Currently,
5026 the only implemented backend is for SystemTap probes (<sys/sdt.h>). You
5027 can set a breakpoint using the new "-probe, "-pstap" or "-probe-stap"
5028 options and inspect the probe arguments using the new $_probe_arg family
5029 of convenience variables. You can obtain more information about SystemTap
5030 in <http://sourceware.org/systemtap/>.
5031
72508ac0 5032* GDB now supports reversible debugging on ARM, it allows you to
994bc098
ES
5033 debug basic ARM and THUMB instructions, and provides
5034 record/replay support.
72508ac0 5035
16899756
DE
5036* The option "symbol-reloading" has been deleted as it is no longer used.
5037
4795f398
DE
5038* Python scripting
5039
7d74f244
DE
5040 ** GDB commands implemented in Python can now be put in command class
5041 "gdb.COMMAND_USER".
5042
4795f398
DE
5043 ** The "maint set python print-stack on|off" is now deleted.
5044
50897289
TT
5045 ** A new class, gdb.printing.FlagEnumerationPrinter, can be used to
5046 apply "flag enum"-style pretty-printing to any enum.
5047
64e7d9dd
TT
5048 ** gdb.lookup_symbol can now work when there is no current frame.
5049
5050 ** gdb.Symbol now has a 'line' attribute, holding the line number in
5051 the source at which the symbol was defined.
5052
f0823d2c
TT
5053 ** gdb.Symbol now has the new attribute 'needs_frame' and the new
5054 method 'value'. The former indicates whether the symbol needs a
5055 frame in order to compute its value, and the latter computes the
5056 symbol's value.
5057
7b282c5a
SCR
5058 ** A new method 'referenced_value' on gdb.Value objects which can
5059 dereference pointer as well as C++ reference values.
5060
a20ee7a4
SCR
5061 ** New methods 'global_block' and 'static_block' on gdb.Symtab objects
5062 which return the global and static blocks (as gdb.Block objects),
5063 of the underlying symbol table, respectively.
5064
7efc75aa
SCR
5065 ** New function gdb.find_pc_line which returns the gdb.Symtab_and_line
5066 object associated with a PC value.
5067
ee0bf529
SCR
5068 ** gdb.Symtab_and_line has new attribute 'last' which holds the end
5069 of the address range occupied by code for the current source line.
5070
a766d390
DE
5071* Go language support.
5072 GDB now supports debugging programs written in the Go programming
5073 language.
5074
e0f9f062
DE
5075* GDBserver now supports stdio connections.
5076 E.g. (gdb) target remote | ssh myhost gdbserver - hello
5077
217bff3e
JK
5078* The binary "gdbtui" can no longer be built or installed.
5079 Use "gdb -tui" instead.
5080
cafec441
TT
5081* GDB will now print "flag" enums specially. A flag enum is one where
5082 all the enumerator values have no bits in common when pairwise
5083 "and"ed. When printing a value whose type is a flag enum, GDB will
5084 show all the constants, e.g., for enum E { ONE = 1, TWO = 2}:
5085 (gdb) print (enum E) 3
5086 $1 = (ONE | TWO)
5087
4aac40c8
TT
5088* The filename part of a linespec will now match trailing components
5089 of a source file name. For example, "break gcc/expr.c:1000" will
5090 now set a breakpoint in build/gcc/expr.c, but not
5091 build/libcpp/expr.c.
5092
d99bd577
UW
5093* The "info proc" and "generate-core-file" commands will now also
5094 work on remote targets connected to GDBserver on Linux.
5095
53fe1783
GB
5096* The command "info catch" has been removed. It has been disabled
5097 since December 2007.
5098
e41eec66
JB
5099* The "catch exception" and "catch assert" commands now accept
5100 a condition at the end of the command, much like the "break"
5101 command does. For instance:
5102
5103 (gdb) catch exception Constraint_Error if Barrier = True
5104
5105 Previously, it was possible to add a condition to such catchpoints,
5106 but it had to be done as a second step, after the catchpoint had been
5107 created, using the "condition" command.
5108
5808517f
YQ
5109* The "info static-tracepoint-marker" command will now also work on
5110 native Linux targets with in-process agent.
5111
481860b3
GB
5112* GDB can now set breakpoints on inlined functions.
5113
5114* The .gdb_index section has been updated to include symbols for
5115 inlined functions. GDB will ignore older .gdb_index sections by
5116 default, which could cause symbol files to be loaded more slowly
e615022a
DE
5117 until their .gdb_index sections can be recreated. The new command
5118 "set use-deprecated-index-sections on" will cause GDB to use any older
5119 .gdb_index sections it finds. This will restore performance, but the
5120 ability to set breakpoints on inlined functions will be lost in symbol
5121 files with older .gdb_index sections.
481860b3 5122
156942c7
DE
5123 The .gdb_index section has also been updated to record more information
5124 about each symbol. This speeds up the "info variables", "info functions"
5125 and "info types" commands when used with programs having the .gdb_index
5126 section, as well as speeding up debugging with shared libraries using
5127 the .gdb_index section.
5128
927fbba6
JB
5129* Ada support for GDB/MI Variable Objects has been added.
5130
20388dd6
YQ
5131* GDB can now support 'breakpoint always-inserted mode' in 'record'
5132 target.
5133
f3e0e960
SS
5134* MI changes
5135
5136 ** New command -info-os is the MI equivalent of "info os".
5137
37ce89eb
SS
5138 ** Output logs ("set logging" and related) now include MI output.
5139
edcc5120
TT
5140* New commands
5141
e615022a
DE
5142 ** "set use-deprecated-index-sections on|off"
5143 "show use-deprecated-index-sections on|off"
5144 Controls the use of deprecated .gdb_index sections.
5145
edcc5120
TT
5146 ** "catch load" and "catch unload" can be used to stop when a shared
5147 library is loaded or unloaded, respectively.
5148
816338b5
SS
5149 ** "enable count" can be used to auto-disable a breakpoint after
5150 several hits.
5151
57651221 5152 ** "info vtbl" can be used to show the virtual method tables for
c4aeac85
TT
5153 C++ and Java objects.
5154
06fc020f 5155 ** "explore" and its sub commands "explore value" and "explore type"
6ea71545 5156 can be used to recursively explore values and types of
06fc020f
SCR
5157 expressions. These commands are available only if GDB is
5158 configured with '--with-python'.
5159
bf88dd68
JK
5160 ** "info auto-load" shows status of all kinds of auto-loaded files,
5161 "info auto-load gdb-scripts" shows status of auto-loading GDB canned
5162 sequences of commands files, "info auto-load python-scripts"
5163 shows status of auto-loading Python script files,
5164 "info auto-load local-gdbinit" shows status of loading init file
5165 (.gdbinit) from current directory and "info auto-load libthread-db" shows
5166 status of inferior specific thread debugging shared library loading.
5167
5168 ** "info auto-load-scripts", "set auto-load-scripts on|off"
5169 and "show auto-load-scripts" commands have been deprecated, use their
5170 "info auto-load python-scripts", "set auto-load python-scripts on|off"
5171 and "show auto-load python-scripts" counterparts instead.
5172
e7e0cddf
SS
5173 ** "dprintf location,format,args..." creates a dynamic printf, which
5174 is basically a breakpoint that does a printf and immediately
5175 resumes your program's execution, so it is like a printf that you
add18b78 5176 can insert dynamically at runtime instead of at compile time.
e7e0cddf 5177
9cb709b6
TT
5178 ** "set print symbol"
5179 "show print symbol"
5180 Controls whether GDB attempts to display the symbol, if any,
5181 corresponding to addresses it prints. This defaults to "on", but
5182 you can set it to "off" to restore GDB's previous behavior.
5183
2d4c29c5
TS
5184* Deprecated commands
5185
5186 ** For the Renesas Super-H architecture, the "regs" command has been
5187 deprecated, and "info all-registers" should be used instead.
5188
a58b110a
KB
5189* New targets
5190
5191Renesas RL78 rl78-*-elf
60c9a3c0 5192HP OpenVMS ia64 ia64-hp-openvms*
a58b110a 5193
72895ff6
LM
5194* GDBserver supports evaluation of breakpoint conditions. When
5195 support is advertised by GDBserver, GDB may be told to send the
5196 breakpoint conditions in bytecode form to GDBserver. GDBserver
5197 will only report the breakpoint trigger to GDB when its condition
5198 evaluates to true.
5199
5200* New options
5201
4cc0665f
MR
5202set mips compression
5203show mips compression
5204 Select the compressed ISA encoding used in functions that have no symbol
5205 information available. The encoding can be set to either of:
5206 mips16
5207 micromips
5208 and is updated automatically from ELF file flags if available.
5209
72895ff6
LM
5210set breakpoint condition-evaluation
5211show breakpoint condition-evaluation
cf65ecd3 5212 Control whether breakpoint conditions are evaluated by GDB ("host") or by
5b43fab2
JK
5213 GDBserver ("target"). Default option "auto" chooses the most efficient
5214 available mode.
72895ff6
LM
5215 This option can improve debugger efficiency depending on the speed of the
5216 target.
5217
bf88dd68
JK
5218set auto-load off
5219 Disable auto-loading globally.
5220
5221show auto-load
5222 Show auto-loading setting of all kinds of auto-loaded files.
5223
5224set auto-load gdb-scripts on|off
5225show auto-load gdb-scripts
5226 Control auto-loading of GDB canned sequences of commands files.
5227
5228set auto-load python-scripts on|off
5229show auto-load python-scripts
5230 Control auto-loading of Python script files.
5231
5232set auto-load local-gdbinit on|off
5233show auto-load local-gdbinit
5234 Control loading of init file (.gdbinit) from current directory.
5235
5236set auto-load libthread-db on|off
5237show auto-load libthread-db
5238 Control auto-loading of inferior specific thread debugging shared library.
5239
7349ff92 5240set auto-load scripts-directory <dir1>[:<dir2>...]
9cc815f5 5241show auto-load scripts-directory
7349ff92
JK
5242 Set a list of directories from which to load auto-loaded scripts.
5243 Automatically loaded Python scripts and GDB scripts are located in one
5244 of the directories listed by this option.
5245 The delimiter (':' above) may differ according to the host platform.
5246
bccbefd2
JK
5247set auto-load safe-path <dir1>[:<dir2>...]
5248show auto-load safe-path
5249 Set a list of directories from which it is safe to auto-load files.
5250 The delimiter (':' above) may differ according to the host platform.
5251
4dc84fd1
JK
5252set debug auto-load on|off
5253show debug auto-load
5254 Control display of debugging info for auto-loading the files above.
5255
d3ce09f5 5256set dprintf-style gdb|call|agent
e7e0cddf 5257show dprintf-style
d3ce09f5
SS
5258 Control the way in which a dynamic printf is performed; "gdb"
5259 requests a GDB printf command, while "call" causes dprintf to call a
5260 function in the inferior. "agent" requests that the target agent
5261 (such as GDBserver) do the printing.
e7e0cddf
SS
5262
5263set dprintf-function <expr>
5264show dprintf-function
5265set dprintf-channel <expr>
5266show dprintf-channel
5267 Set the function and optional first argument to the call when using
5268 the "call" style of dynamic printf.
5269
d3ce09f5
SS
5270set disconnected-dprintf on|off
5271show disconnected-dprintf
5272 Control whether agent-style dynamic printfs continue to be in effect
5273 after GDB disconnects.
5274
6dea1fbd
JK
5275* New configure options
5276
7349ff92
JK
5277--with-auto-load-dir
5278 Configure default value for the 'set auto-load scripts-directory'
1564a261
JK
5279 setting above. It defaults to '$debugdir:$datadir/auto-load',
5280 $debugdir representing global debugging info directories (available
5281 via 'show debug-file-directory') and $datadir representing GDB's data
5282 directory (available via 'show data-directory').
7349ff92 5283
6dea1fbd
JK
5284--with-auto-load-safe-path
5285 Configure default value for the 'set auto-load safe-path' setting
7349ff92 5286 above. It defaults to the --with-auto-load-dir setting.
6dea1fbd
JK
5287
5288--without-auto-load-safe-path
5289 Set 'set auto-load safe-path' to '/', effectively disabling this
5290 security feature.
5291
72895ff6
LM
5292* New remote packets
5293
74c48cbb
PA
5294z0/z1 conditional breakpoints extension
5295
72895ff6
LM
5296 The z0/z1 breakpoint insertion packets have been extended to carry
5297 a list of conditional expressions over to the remote stub depending on the
5298 condition evaluation mode. The use of this extension can be controlled
5299 via the "set remote conditional-breakpoints-packet" command.
5300
9b224c5e
PA
5301QProgramSignals:
5302
5303 Specify the signals which the remote stub may pass to the debugged
5304 program without GDB involvement.
5305
8320cc4f
JK
5306* New command line options
5307
5308--init-command=FILE, -ix Like --command, -x but execute it
5309 before loading inferior.
5310--init-eval-command=COMMAND, -iex Like --eval-command=COMMAND, -ex but
5311 execute it before loading inferior.
5312
8837a20f
JB
5313*** Changes in GDB 7.4
5314
f8eba3c6
TT
5315* GDB now handles ambiguous linespecs more consistently; the existing
5316 FILE:LINE support has been expanded to other types of linespecs. A
5317 breakpoint will now be set on all matching locations in all
5318 inferiors, and locations will be added or removed according to
5319 inferior changes.
5320
1bfeeb0f
JL
5321* GDB now allows you to skip uninteresting functions and files when
5322 stepping with the "skip function" and "skip file" commands.
5323
480a3f21
PW
5324* GDB has two new commands: "set remote hardware-watchpoint-length-limit"
5325 and "show remote hardware-watchpoint-length-limit". These allows to
5326 set or show the maximum length limit (in bytes) of a remote
5327 target hardware watchpoint.
5328
5329 This allows e.g. to use "unlimited" hardware watchpoints with the
5330 gdbserver integrated in Valgrind version >= 3.7.0. Such Valgrind
5331 watchpoints are slower than real hardware watchpoints but are
5332 significantly faster than gdb software watchpoints.
5333
3a7bf607
PM
5334* Python scripting
5335
32d1c362 5336 ** The register_pretty_printer function in module gdb.printing now takes
7d0aff21 5337 an optional `replace' argument. If True, the new printer replaces any
32d1c362
DE
5338 existing one.
5339
3a7bf607 5340 ** The "maint set python print-stack on|off" command has been
4795f398
DE
5341 deprecated and will be deleted in GDB 7.5.
5342 A new command: "set python print-stack none|full|message" has
5343 replaced it. Additionally, the default for "print-stack" is
5344 now "message", which just prints the error message without
5345 the stack trace.
994bc098 5346
baacfb07 5347 ** A prompt substitution hook (prompt_hook) is now available to the
3a7bf607 5348 Python API.
713389e0 5349
fa3a4f15
PM
5350 ** A new Python module, gdb.prompt has been added to the GDB Python
5351 modules library. This module provides functionality for
baacfb07 5352 escape sequences in prompts (used by set/show
fa3a4f15
PM
5353 extended-prompt). These escape sequences are replaced by their
5354 corresponding value.
5355
5e239b84
PM
5356 ** Python commands and convenience-functions located in
5357 'data-directory'/python/gdb/command and
5358 'data-directory'/python/gdb/function are now automatically loaded
5359 on GDB start-up.
5360
9df2fbc4
PM
5361 ** Blocks now provide four new attributes. global_block and
5362 static_block will return the global and static blocks
5363 respectively. is_static and is_global are boolean attributes
5364 that indicate if the block is one of those two types.
5365
457e09f0
DE
5366 ** Symbols now provide the "type" attribute, the type of the symbol.
5367
6839b47f
KP
5368 ** The "gdb.breakpoint" function has been deprecated in favor of
5369 "gdb.breakpoints".
5370
cc72b2a2
KP
5371 ** A new class "gdb.FinishBreakpoint" is provided to catch the return
5372 of a function. This class is based on the "finish" command
994bc098 5373 available in the CLI.
cc72b2a2 5374
84ad80e6
PK
5375 ** Type objects for struct and union types now allow access to
5376 the fields using standard Python dictionary (mapping) methods.
5377 For example, "some_type['myfield']" now works, as does
5378 "some_type.items()".
5379
20c168b5
KP
5380 ** A new event "gdb.new_objfile" has been added, triggered by loading a
5381 new object file.
5382
03c3051a
PK
5383 ** A new function, "deep_items" has been added to the gdb.types
5384 module in the GDB Python modules library. This function returns
5385 an iterator over the fields of a struct or union type. Unlike
5386 the standard Python "iteritems" method, it will recursively traverse
5387 any anonymous fields.
5388
7376e450
TT
5389* MI changes
5390
5391 ** "*stopped" events can report several new "reason"s, such as
5392 "solib-event".
5393
5394 ** Breakpoint changes are now notified using new async records, like
5395 "=breakpoint-modified".
5396
5397 ** New command -ada-task-info.
5398
98a5dd13
DE
5399* libthread-db-search-path now supports two special values: $sdir and $pdir.
5400 $sdir specifies the default system locations of shared libraries.
5401 $pdir specifies the directory where the libpthread used by the application
5402 lives.
5403
5404 GDB no longer looks in $sdir and $pdir after it has searched the directories
5405 mentioned in libthread-db-search-path. If you want to search those
5406 directories, they must be specified in libthread-db-search-path.
5407 The default value of libthread-db-search-path on GNU/Linux and Solaris
5408 systems is now "$sdir:$pdir".
5409
5410 $pdir is not supported by gdbserver, it is currently ignored.
5411 $sdir is supported by gdbserver.
5412
478aac75
DE
5413* New configure option --with-iconv-bin.
5414 When using the internationalization support like the one in the GNU C
5415 library, GDB will invoke the "iconv" program to get a list of supported
5416 character sets. If this program lives in a non-standard location, one can
5417 use this option to specify where to find it.
5418
9c06b0b4
TJB
5419* When natively debugging programs on PowerPC BookE processors running
5420 a Linux kernel version 2.6.34 or later, GDB supports masked hardware
5421 watchpoints, which specify a mask in addition to an address to watch.
5422 The mask specifies that some bits of an address (the bits which are
5423 reset in the mask) should be ignored when matching the address accessed
5424 by the inferior against the watchpoint address. See the "PowerPC Embedded"
5425 section in the user manual for more details.
5426
03f2bd59
JK
5427* The new option --once causes GDBserver to stop listening for connections once
5428 the first connection is made. The listening port used by GDBserver will
5429 become available after that.
5430
71eba9c2 5431* New commands "info macros" and "alias" have been added.
edc84990 5432
2bda9cc5
JK
5433* New function parameters suffix @entry specifies value of function parameter
5434 at the time the function got called. Entry values are available only since
5435 gcc version 4.7.
5436
ed59ded5
DE
5437* New commands
5438
5439!SHELL COMMAND
5440 "!" is now an alias of the "shell" command.
5441 Note that no space is needed between "!" and SHELL COMMAND.
5442
9c06b0b4
TJB
5443* Changed commands
5444
5445watch EXPRESSION mask MASK_VALUE
5446 The watch command now supports the mask argument which allows creation
5447 of masked watchpoints, if the current architecture supports this feature.
5448
dbaefcf7
DE
5449info auto-load-scripts [REGEXP]
5450 This command was formerly named "maintenance print section-scripts".
5451 It is now generally useful and is no longer a maintenance-only command.
5452
71eba9c2 5453info macro [-all] [--] MACRO
5454 The info macro command has new options `-all' and `--'. The first for
5455 printing all definitions of a macro. The second for explicitly specifying
5456 the end of arguments and the beginning of the macro name in case the macro
5457 name starts with a hyphen.
5458
3065dfb6
SS
5459collect[/s] EXPRESSIONS
5460 The tracepoint collect command now takes an optional modifier "/s"
5461 that directs it to dereference pointer-to-character types and
5462 collect the bytes of memory up to a zero byte. The behavior is
5463 similar to what you see when you use the regular print command on a
5464 string. An optional integer following the "/s" sets a bound on the
5465 number of bytes that will be collected.
5466
f196051f
SS
5467tstart [NOTES]
5468 The trace start command now interprets any supplied arguments as a
5469 note to be recorded with the trace run, with an effect similar to
5470 setting the variable trace-notes.
5471
5472tstop [NOTES]
5473 The trace stop command now interprets any arguments as a note to be
5474 mentioned along with the tstatus report that the trace was stopped
5475 with a command. The effect is similar to setting the variable
5476 trace-stop-notes.
5477
d248b706
KY
5478* Tracepoints can now be enabled and disabled at any time after a trace
5479 experiment has been started using the standard "enable" and "disable"
5480 commands. It is now possible to start a trace experiment with no enabled
5481 tracepoints; GDB will display a warning, but will allow the experiment to
5482 begin, assuming that tracepoints will be enabled as needed while the trace
5483 is running.
5484
405f8e94
SS
5485* Fast tracepoints on 32-bit x86-architectures can now be placed at
5486 locations with 4-byte instructions, when they were previously
5487 limited to locations with instructions of 5 bytes or longer.
5488
2bda9cc5
JK
5489* New options
5490
45cfd468
DE
5491set debug dwarf2-read
5492show debug dwarf2-read
5493 Turns on or off display of debugging messages related to reading
5494 DWARF debug info. The default is off.
5495
5496set debug symtab-create
5497show debug symtab-create
5498 Turns on or off display of debugging messages related to symbol table
5499 creation. The default is off.
5500
baacfb07
PM
5501set extended-prompt
5502show extended-prompt
5503 Set the GDB prompt, and allow escape sequences to be inserted to
5504 display miscellaneous information (see 'help set extended-prompt'
5505 for the list of sequences). This prompt (and any information
5506 accessed through the escape sequences) is updated every time the
5507 prompt is displayed.
5508
2bda9cc5
JK
5509set print entry-values (both|compact|default|if-needed|no|only|preferred)
5510show print entry-values
5511 Set printing of frame argument values at function entry. In some cases
5512 GDB can determine the value of function argument which was passed by the
5513 function caller, even if the value was modified inside the called function.
5514
5515set debug entry-values
5516show debug entry-values
5517 Control display of debugging info for determining frame argument values at
5518 function entry and virtual tail call frames.
5519
c011a4f4
DE
5520set basenames-may-differ
5521show basenames-may-differ
5522 Set whether a source file may have multiple base names.
5523 (A "base name" is the name of a file with the directory part removed.
5524 Example: The base name of "/home/user/hello.c" is "hello.c".)
5525 If set, GDB will canonicalize file names (e.g., expand symlinks)
5526 before comparing them. Canonicalization is an expensive operation,
5527 but it allows the same file be known by more than one base name.
5528 If not set (the default), all source files are assumed to have just
5529 one base name, and gdb will do file name comparisons more efficiently.
5530
f196051f
SS
5531set trace-user
5532show trace-user
5533set trace-notes
5534show trace-notes
5535 Set a user name and notes for the current and any future trace runs.
5536 This is useful for long-running and/or disconnected traces, to
5537 inform others (or yourself) as to who is running the trace, supply
5538 contact information, or otherwise explain what is going on.
5539
5540set trace-stop-notes
5541show trace-stop-notes
5542 Set a note attached to the trace run, that is displayed when the
5543 trace has been stopped by a tstop command. This is useful for
5544 instance as an explanation, if you are stopping a trace run that was
5545 started by someone else.
5546
d248b706
KY
5547* New remote packets
5548
5549QTEnable
994bc098 5550
d248b706
KY
5551 Dynamically enable a tracepoint in a started trace experiment.
5552
5553QTDisable
5554
5555 Dynamically disable a tracepoint in a started trace experiment.
5556
f196051f
SS
5557QTNotes
5558
5559 Set the user and notes of the trace run.
5560
5561qTP
5562
5563 Query the current status of a tracepoint.
5564
405f8e94
SS
5565qTMinFTPILen
5566
5567 Query the minimum length of instruction at which a fast tracepoint may
5568 be placed.
5569
1a532630
PP
5570* Dcache size (number of lines) and line-size are now runtime-configurable
5571 via "set dcache line" and "set dcache line-size" commands.
5572
11315641
YQ
5573* New targets
5574
5575Texas Instruments TMS320C6x tic6x-*-*
5576
87326c78
DD
5577* New Simulators
5578
5579Renesas RL78 rl78-*-elf
5580
e8d56f18
JB
5581*** Changes in GDB 7.3.1
5582
5583* The build failure for NetBSD and OpenBSD targets have now been fixed.
5584
d6e00af6 5585*** Changes in GDB 7.3
797054e6 5586
60f98dde
MS
5587* GDB has a new command: "thread find [REGEXP]".
5588 It finds the thread id whose name, target id, or thread extra info
5589 matches the given regular expression.
5590
eee5b35e
DD
5591* The "catch syscall" command now works on mips*-linux* targets.
5592
b716877b
AB
5593* The -data-disassemble MI command now supports modes 2 and 3 for
5594 dumping the instruction opcodes.
5595
aae1c79a
DE
5596* New command line options
5597
5598-data-directory DIR Specify DIR as the "data-directory".
5599 This is mostly for testing purposes.
5600
a86caf66
DE
5601* The "maint set python auto-load on|off" command has been renamed to
5602 "set auto-load-scripts on|off".
5603
99e7ae30
DE
5604* GDB has a new command: "set directories".
5605 It is like the "dir" command except that it replaces the
5606 source path list instead of augmenting it.
5607
4694da01
TT
5608* GDB now understands thread names.
5609
5610 On GNU/Linux, "info threads" will display the thread name as set by
5611 prctl or pthread_setname_np.
5612
5613 There is also a new command, "thread name", which can be used to
5614 assign a name internally for GDB to display.
5615
f4b8a18d
KW
5616* OpenCL C
5617 Initial support for the OpenCL C language (http://www.khronos.org/opencl)
5618 has been integrated into GDB.
5619
585d1eb8
PM
5620* Python scripting
5621
da5d4055
PM
5622 ** The function gdb.Write now accepts an optional keyword 'stream'.
5623 This keyword, when provided, will direct the output to either
5624 stdout, stderr, or GDB's logging output.
5625
9a6f1302
PM
5626 ** Parameters can now be be sub-classed in Python, and in particular
5627 you may implement the get_set_doc and get_show_doc functions.
5628 This improves how Parameter set/show documentation is processed
5629 and allows for more dynamic content.
5630
29703da4
PM
5631 ** Symbols, Symbol Table, Symbol Table and Line, Object Files,
5632 Inferior, Inferior Thread, Blocks, and Block Iterator APIs now
5633 have an is_valid method.
5634
350c6c65
PM
5635 ** Breakpoints can now be sub-classed in Python, and in particular
5636 you may implement a 'stop' function that is executed each time
994bc098 5637 the inferior reaches that breakpoint.
350c6c65 5638
6e6fbe60
DE
5639 ** New function gdb.lookup_global_symbol looks up a global symbol.
5640
585d1eb8
PM
5641 ** GDB values in Python are now callable if the value represents a
5642 function. For example, if 'some_value' represents a function that
5643 takes two integer parameters and returns a value, you can call
5644 that function like so:
5645
5646 result = some_value (10,20)
5647
0e3509db
DE
5648 ** Module gdb.types has been added.
5649 It contains a collection of utilities for working with gdb.Types objects:
5650 get_basic_type, has_field, make_enum_dict.
5651
7b51bc51
DE
5652 ** Module gdb.printing has been added.
5653 It contains utilities for writing and registering pretty-printers.
5654 New classes: PrettyPrinter, SubPrettyPrinter,
5655 RegexpCollectionPrettyPrinter.
5656 New function: register_pretty_printer.
5657
5658 ** New commands "info pretty-printers", "enable pretty-printer" and
5659 "disable pretty-printer" have been added.
5660
99e7ae30
DE
5661 ** gdb.parameter("directories") is now available.
5662
d8e22779
TT
5663 ** New function gdb.newest_frame returns the newest frame in the
5664 selected thread.
5665
4694da01
TT
5666 ** The gdb.InferiorThread class has a new "name" attribute. This
5667 holds the thread's name.
5668
505500db
SW
5669 ** Python Support for Inferior events.
5670 Python scripts can add observers to be notified of events
824446ad 5671 occurring in the process being debugged.
c17a9e46
HZ
5672 The following events are currently supported:
5673 - gdb.events.cont Continue event.
5674 - gdb.events.exited Inferior exited event.
5675 - gdb.events.stop Signal received, and Breakpoint hit events.
5676
def98928
TT
5677* C++ Improvements:
5678
5679 ** GDB now puts template parameters in scope when debugging in an
5680 instantiation. For example, if you have:
5681
5682 template<int X> int func (void) { return X; }
5683
5684 then if you step into func<5>, "print X" will show "5". This
5685 feature requires proper debuginfo support from the compiler; it
5686 was added to GCC 4.5.
5687
66cb8159
TT
5688 ** The motion commands "next", "finish", "until", and "advance" now
5689 work better when exceptions are thrown. In particular, GDB will
5690 no longer lose control of the inferior; instead, the GDB will
5691 stop the inferior at the point at which the exception is caught.
5692 This functionality requires a change in the exception handling
5693 code that was introduced in GCC 4.5.
5694
4aac0db7
UW
5695* GDB now follows GCC's rules on accessing volatile objects when
5696 reading or writing target state during expression evaluation.
5697 One notable difference to prior behavior is that "print x = 0"
5698 no longer generates a read of x; the value of the assignment is
5699 now always taken directly from the value being assigned.
5700
283e6a52
TT
5701* GDB now has some support for using labels in the program's source in
5702 linespecs. For instance, you can use "advance label" to continue
5703 execution to a label.
5704
5705* GDB now has support for reading and writing a new .gdb_index
5706 section. This section holds a fast index of DWARF debugging
5707 information and can be used to greatly speed up GDB startup and
5708 operation. See the documentation for `save gdb-index' for details.
5709
b56df873 5710* The "watch" command now accepts an optional "-location" argument.
14c0d4e1 5711 When used, this causes GDB to watch the memory referred to by the
b56df873
TT
5712 expression. Such a watchpoint is never deleted due to it going out
5713 of scope.
5714
ae53ffa4
PA
5715* GDB now supports thread debugging of core dumps on GNU/Linux.
5716
5717 GDB now activates thread debugging using the libthread_db library
5718 when debugging GNU/Linux core dumps, similarly to when debugging
5719 live processes. As a result, when debugging a core dump file, GDB
5720 is now able to display pthread_t ids of threads. For example, "info
5721 threads" shows the same output as when debugging the process when it
5722 was live. In earlier releases, you'd see something like this:
5723
5724 (gdb) info threads
5725 * 1 LWP 6780 main () at main.c:10
5726
5727 While now you see this:
5728
5729 (gdb) info threads
5730 * 1 Thread 0x7f0f5712a700 (LWP 6780) main () at main.c:10
5731
5732 It is also now possible to inspect TLS variables when debugging core
5733 dumps.
5734
5735 When debugging a core dump generated on a machine other than the one
5736 used to run GDB, you may need to point GDB at the correct
5737 libthread_db library with the "set libthread-db-search-path"
5738 command. See the user manual for more details on this command.
5739
f1310107
TJB
5740* When natively debugging programs on PowerPC BookE processors running
5741 a Linux kernel version 2.6.34 or later, GDB supports ranged breakpoints,
5742 which stop execution of the inferior whenever it executes an instruction
5743 at any address within the specified range. See the "PowerPC Embedded"
5744 section in the user manual for more details.
5745
248c9dbc
JB
5746* New features in the GDB remote stub, GDBserver
5747
1aee7009
JB
5748 ** GDBserver is now supported on PowerPC LynxOS (versions 4.x and 5.x),
5749 and i686 LynxOS (version 5.x).
248c9dbc 5750
eb826dc6
MF
5751 ** GDBserver is now supported on Blackfin Linux.
5752
44603653
JB
5753* New native configurations
5754
5755ia64 HP-UX ia64-*-hpux*
5756
91021223
MF
5757* New targets:
5758
5759Analog Devices, Inc. Blackfin Processor bfin-*
5760
6e1bb179
JB
5761* Ada task switching is now supported on sparc-elf targets when
5762 debugging a program using the Ravenscar Profile. For more information,
5763 see the "Tasking Support when using the Ravenscar Profile" section
5764 in the GDB user manual.
5765
50c97f38
TT
5766* Guile support was removed.
5767
448a92bf
MF
5768* New features in the GNU simulator
5769
5770 ** The --map-info flag lists all known core mappings.
5771
66ee2731
MF
5772 ** CFI flashes may be simulated via the "cfi" device.
5773
76b8507d 5774*** Changes in GDB 7.2
bfbf3774 5775
ba25b921
PA
5776* Shared library support for remote targets by default
5777
5778 When GDB is configured for a generic, non-OS specific target, like
5779 for example, --target=arm-eabi or one of the many *-*-elf targets,
5780 GDB now queries remote stubs for loaded shared libraries using the
5781 `qXfer:libraries:read' packet. Previously, shared library support
5782 was always disabled for such configurations.
5783
4656f5c6
SW
5784* C++ Improvements:
5785
5786 ** Argument Dependent Lookup (ADL)
5787
5788 In C++ ADL lookup directs function search to the namespaces of its
5789 arguments even if the namespace has not been imported.
5790 For example:
5791 namespace A
994bc098
ES
5792 {
5793 class B { };
4656f5c6
SW
5794 void foo (B) { }
5795 }
5796 ...
5797 A::B b
5798 foo(b)
5799 Here the compiler will search for `foo' in the namespace of 'b'
5800 and find A::foo. GDB now supports this. This construct is commonly
5801 used in the Standard Template Library for operators.
5802
5803 ** Improved User Defined Operator Support
5804
5805 In addition to member operators, GDB now supports lookup of operators
5806 defined in a namespace and imported with a `using' directive, operators
5807 defined in the global scope, operators imported implicitly from an
5808 anonymous namespace, and the ADL operators mentioned in the previous
5809 entry.
5810 GDB now also supports proper overload resolution for all the previously
5811 mentioned flavors of operators.
5812
254e6b9e
DE
5813 ** static const class members
5814
5815 Printing of static const class members that are initialized in the
5816 class definition has been fixed.
5817
711e434b
PM
5818* Windows Thread Information Block access.
5819
5820 On Windows targets, GDB now supports displaying the Windows Thread
5821 Information Block (TIB) structure. This structure is visible either
5822 by using the new command `info w32 thread-information-block' or, by
5823 dereferencing the new convenience variable named `$_tlb', a
5824 thread-specific pointer to the TIB. This feature is also supported
5825 when remote debugging using GDBserver.
5826
0fb4aa4b
PA
5827* Static tracepoints
5828
5829 Static tracepoints are calls in the user program into a tracing
5830 library. One such library is a port of the LTTng kernel tracer to
5831 userspace --- UST (LTTng Userspace Tracer, http://lttng.org/ust).
5832 When debugging with GDBserver, GDB now supports combining the GDB
5833 tracepoint machinery with such libraries. For example: the user can
5834 use GDB to probe a static tracepoint marker (a call from the user
5835 program into the tracing library) with the new "strace" command (see
5836 "New commands" below). This creates a "static tracepoint" in the
5837 breakpoint list, that can be manipulated with the same feature set
5838 as fast and regular tracepoints. E.g., collect registers, local and
5839 global variables, collect trace state variables, and define
5840 tracepoint conditions. In addition, the user can collect extra
5841 static tracepoint marker specific data, by collecting the new
5842 $_sdata internal variable. When analyzing the trace buffer, you can
5843 inspect $_sdata like any other variable available to GDB. For more
5844 information, see the "Tracepoints" chapter in GDB user manual. New
5845 remote packets have been defined to support static tracepoints, see
5846 the "New remote packets" section below.
5847
ca11e899
SS
5848* Better reconstruction of tracepoints after disconnected tracing
5849
5850 GDB will attempt to download the original source form of tracepoint
5851 definitions when starting a trace run, and then will upload these
5852 upon reconnection to the target, resulting in a more accurate
5853 reconstruction of the tracepoints that are in use on the target.
5854
5855* Observer mode
5856
5857 You can now exercise direct control over the ways that GDB can
5858 affect your program. For instance, you can disallow the setting of
5859 breakpoints, so that the program can run continuously (assuming
5860 non-stop mode). In addition, the "observer" variable is available
5861 to switch all of the different controls; in observer mode, GDB
5862 cannot affect the target's behavior at all, which is useful for
5863 tasks like diagnosing live systems in the field.
5864
5865* The new convenience variable $_thread holds the number of the
5866 current thread.
5867
711e434b
PM
5868* New remote packets
5869
5870qGetTIBAddr
5871
5872 Return the address of the Windows Thread Information Block of a given thread.
5873
dde08ee1
PA
5874qRelocInsn
5875
5876 In response to several of the tracepoint packets, the target may now
5877 also respond with a number of intermediate `qRelocInsn' request
5878 packets before the final result packet, to have GDB handle
5879 relocating an instruction to execute at a different address. This
5880 is particularly useful for stubs that support fast tracepoints. GDB
5881 reports support for this feature in the qSupported packet.
5882
0fb4aa4b
PA
5883qTfSTM, qTsSTM
5884
5885 List static tracepoint markers in the target program.
5886
5887qTSTMat
5888
5889 List static tracepoint markers at a given address in the target
5890 program.
5891
5892qXfer:statictrace:read
5893
5894 Read the static trace data collected (by a `collect $_sdata'
5895 tracepoint action). The remote stub reports support for this packet
5896 to gdb's qSupported query.
5897
ca11e899
SS
5898QAllow
5899
5900 Send the current settings of GDB's permission flags.
5901
5902QTDPsrc
5903
5904 Send part of the source (textual) form of a tracepoint definition,
5905 which includes location, conditional, and action list.
5906
3f7b2faa
DE
5907* The source command now accepts a -s option to force searching for the
5908 script in the source search path even if the script name specifies
5909 a directory.
5910
d337e9f0
PA
5911* New features in the GDB remote stub, GDBserver
5912
0fb4aa4b
PA
5913 - GDBserver now support tracepoints (including fast tracepoints, and
5914 static tracepoints). The feature is currently supported by the
5915 i386-linux and amd64-linux builds. See the "Tracepoints support
5916 in gdbserver" section in the manual for more information.
5917
5918 GDBserver JIT compiles the tracepoint's conditional agent
5919 expression bytecode into native code whenever possible for low
5920 overhead dynamic tracepoints conditionals. For such tracepoints,
5921 an expression that examines program state is evaluated when the
5922 tracepoint is reached, in order to determine whether to capture
5923 trace data. If the condition is simple and false, processing the
5924 tracepoint finishes very quickly and no data is gathered.
5925
5926 GDBserver interfaces with the UST (LTTng Userspace Tracer) library
5927 for static tracepoints support.
d337e9f0 5928
c24d0242
PM
5929 - GDBserver now supports x86_64 Windows 64-bit debugging.
5930
c8d5aac9
L
5931* GDB now sends xmlRegisters= in qSupported packet to indicate that
5932 it understands register description.
5933
7c953934
TT
5934* The --batch flag now disables pagination and queries.
5935
8685c86f
L
5936* X86 general purpose registers
5937
5938 GDB now supports reading/writing byte, word and double-word x86
5939 general purpose registers directly. This means you can use, say,
5940 $ah or $ax to refer, respectively, to the byte register AH and
5941 16-bit word register AX that are actually portions of the 32-bit
5942 register EAX or 64-bit register RAX.
5943
95a42b64 5944* The `commands' command now accepts a range of breakpoints to modify.
86b17b60
PA
5945 A plain `commands' following a command that creates multiple
5946 breakpoints affects all the breakpoints set by that command. This
5947 applies to breakpoints set by `rbreak', and also applies when a
5948 single `break' command creates multiple breakpoints (e.g.,
5949 breakpoints on overloaded c++ functions).
95a42b64 5950
8bd10a10
CM
5951* The `rbreak' command now accepts a filename specification as part of
5952 its argument, limiting the functions selected by the regex to those
5953 in the specified file.
5954
ab38a727
PA
5955* Support for remote debugging Windows and SymbianOS shared libraries
5956 from Unix hosts has been improved. Non Windows GDB builds now can
5957 understand target reported file names that follow MS-DOS based file
5958 system semantics, such as file names that include drive letters and
5959 use the backslash character as directory separator. This makes it
5960 possible to transparently use the "set sysroot" and "set
5961 solib-search-path" on Unix hosts to point as host copies of the
5962 target's shared libraries. See the new command "set
5963 target-file-system-kind" described below, and the "Commands to
5964 specify files" section in the user manual for more information.
5965
6149aea9
PA
5966* New commands
5967
f1421989
HZ
5968eval template, expressions...
5969 Convert the values of one or more expressions under the control
5970 of the string template to a command line, and call it.
5971
ab38a727
PA
5972set target-file-system-kind unix|dos-based|auto
5973show target-file-system-kind
5974 Set or show the assumed file system kind for target reported file
5975 names.
5976
6149aea9
PA
5977save breakpoints <filename>
5978 Save all current breakpoint definitions to a file suitable for use
5979 in a later debugging session. To read the saved breakpoint
5980 definitions, use the `source' command.
5981
5982`save tracepoints' is a new alias for `save-tracepoints'. The latter
5983is now deprecated.
5984
0fb4aa4b
PA
5985info static-tracepoint-markers
5986 Display information about static tracepoint markers in the target.
5987
5988strace FN | FILE:LINE | *ADDR | -m MARKER_ID
5989 Define a static tracepoint by probing a marker at the given
5990 function, line, address, or marker ID.
5991
ca11e899
SS
5992set observer on|off
5993show observer
5994 Enable and disable observer mode.
5995
5996set may-write-registers on|off
5997set may-write-memory on|off
5998set may-insert-breakpoints on|off
5999set may-insert-tracepoints on|off
6000set may-insert-fast-tracepoints on|off
6001set may-interrupt on|off
6002 Set individual permissions for GDB effects on the target. Note that
6003 some of these settings can have undesirable or surprising
6004 consequences, particularly when changed in the middle of a session.
6005 For instance, disabling the writing of memory can prevent
6006 breakpoints from being inserted, cause single-stepping to fail, or
6007 even crash your program, if you disable after breakpoints have been
6008 inserted. However, GDB should not crash.
6009
6010set record memory-query on|off
6011show record memory-query
6012 Control whether to stop the inferior if memory changes caused
6013 by an instruction cannot be recorded.
6014
53a71c06
CR
6015* Changed commands
6016
6017disassemble
6018 The disassemble command now supports "start,+length" form of two arguments.
6019
f3e9a817
PM
6020* Python scripting
6021
9279c692
JB
6022** GDB now provides a new directory location, called the python directory,
6023 where Python scripts written for GDB can be installed. The location
6024 of that directory is <data-directory>/python, where <data-directory>
6025 is the GDB data directory. For more details, see section `Scripting
6026 GDB using Python' in the manual.
6027
adc36818 6028** The GDB Python API now has access to breakpoints, symbols, symbol
595939de
PM
6029 tables, program spaces, inferiors, threads and frame's code blocks.
6030 Additionally, GDB Parameters can now be created from the API, and
6031 manipulated via set/show in the CLI.
f870a310 6032
fa33c3cd 6033** New functions gdb.target_charset, gdb.target_wide_charset,
07ca107c
DE
6034 gdb.progspaces, gdb.current_progspace, and gdb.string_to_argv.
6035
6036** New exception gdb.GdbError.
fa33c3cd
DE
6037
6038** Pretty-printers are now also looked up in the current program space.
f3e9a817 6039
967cf477
DE
6040** Pretty-printers can now be individually enabled and disabled.
6041
8a1ea21f
DE
6042** GDB now looks for names of Python scripts to auto-load in a
6043 special section named `.debug_gdb_scripts', in addition to looking
6044 for a OBJFILE-gdb.py script when OBJFILE is read by the debugger.
6045
a7bdde9e
VP
6046* Tracepoint actions were unified with breakpoint commands. In particular,
6047there are no longer differences in "info break" output for breakpoints and
6048tracepoints and the "commands" command can be used for both tracepoints and
6049regular breakpoints.
6050
05071a4d
PA
6051* New targets
6052
6053ARM Symbian arm*-*-symbianelf*
6054
6aecb9c2
JB
6055* D language support.
6056 GDB now supports debugging programs written in the D programming
6057 language.
6058
431e49aa
TJB
6059* GDB now supports the extended ptrace interface for PowerPC which is
6060 available since Linux kernel version 2.6.34. This automatically enables
6061 any hardware breakpoints and additional hardware watchpoints available in
6062 the processor. The old ptrace interface exposes just one hardware
6063 watchpoint and no hardware breakpoints.
6064
6065* GDB is now able to use the Data Value Compare (DVC) register available on
6066 embedded PowerPC processors to implement in hardware simple watchpoint
6067 conditions of the form:
6068
6069 watch ADDRESS|VARIABLE if ADDRESS|VARIABLE == CONSTANT EXPRESSION
6070
6071 This works in native GDB running on Linux kernels with the extended ptrace
6072 interface mentioned above.
6073
bfbf3774 6074*** Changes in GDB 7.1
abc7453d 6075
4eef138c
TT
6076* C++ Improvements
6077
6078 ** Namespace Support
71dee663
SW
6079
6080 GDB now supports importing of namespaces in C++. This enables the
6081 user to inspect variables from imported namespaces. Support for
add18b78
TV
6082 namespace aliasing has also been added. So, if a namespace is
6083 aliased in the current scope (e.g. namespace C=A; ) the user can
71dee663
SW
6084 print variables using the alias (e.g. (gdb) print C::x).
6085
4eef138c
TT
6086 ** Bug Fixes
6087
6088 All known bugs relating to the printing of virtual base class were
6089 fixed. It is now possible to call overloaded static methods using a
6090 qualified name.
6091
6092 ** Cast Operators
6093
6094 The C++ cast operators static_cast<>, dynamic_cast<>, const_cast<>,
6095 and reinterpret_cast<> are now handled by the C++ expression parser.
6096
2d1c1221
ME
6097* New targets
6098
6099Xilinx MicroBlaze microblaze-*-*
34207b9e 6100Renesas RX rx-*-elf
2d1c1221
ME
6101
6102* New Simulators
6103
6104Xilinx MicroBlaze microblaze
34207b9e 6105Renesas RX rx
2d1c1221 6106
6c95b8df
PA
6107* Multi-program debugging.
6108
6109 GDB now has support for multi-program (a.k.a. multi-executable or
6110 multi-exec) debugging. This allows for debugging multiple inferiors
6111 simultaneously each running a different program under the same GDB
6112 session. See "Debugging Multiple Inferiors and Programs" in the
6113 manual for more information. This implied some user visible changes
6114 in the multi-inferior support. For example, "info inferiors" now
6115 lists inferiors that are not running yet or that have exited
6116 already. See also "New commands" and "New options" below.
6117
d5551862
SS
6118* New tracing features
6119
6120 GDB's tracepoint facility now includes several new features:
6121
6122 ** Trace state variables
f61e138d
SS
6123
6124 GDB tracepoints now include support for trace state variables, which
6125 are variables managed by the target agent during a tracing
6126 experiment. They are useful for tracepoints that trigger each
6127 other, so for instance one tracepoint can count hits in a variable,
6128 and then a second tracepoint has a condition that is true when the
6129 count reaches a particular value. Trace state variables share the
6130 $-syntax of GDB convenience variables, and can appear in both
6131 tracepoint actions and condition expressions. Use the "tvariable"
6132 command to create, and "info tvariables" to view; see "Trace State
6133 Variables" in the manual for more detail.
7a697b8d 6134
d5551862 6135 ** Fast tracepoints
7a697b8d
SS
6136
6137 GDB now includes an option for defining fast tracepoints, which
6138 targets may implement more efficiently, such as by installing a jump
6139 into the target agent rather than a trap instruction. The resulting
6140 speedup can be by two orders of magnitude or more, although the
6141 tradeoff is that some program locations on some target architectures
6142 might not allow fast tracepoint installation, for instance if the
6143 instruction to be replaced is shorter than the jump. To request a
6144 fast tracepoint, use the "ftrace" command, with syntax identical to
6145 the regular trace command.
6146
d5551862
SS
6147 ** Disconnected tracing
6148
6149 It is now possible to detach GDB from the target while it is running
6150 a trace experiment, then reconnect later to see how the experiment
6151 is going. In addition, a new variable disconnected-tracing lets you
6152 tell the target agent whether to continue running a trace if the
6153 connection is lost unexpectedly.
6154
00bf0b85
SS
6155 ** Trace files
6156
6157 GDB now has the ability to save the trace buffer into a file, and
6158 then use that file as a target, similarly to you can do with
6159 corefiles. You can select trace frames, print data that was
6160 collected in them, and use tstatus to display the state of the
6161 tracing run at the moment that it was saved. To create a trace
6162 file, use "tsave <filename>", and to use it, do "target tfile
6163 <name>".
4daf5ac0
SS
6164
6165 ** Circular trace buffer
6166
6167 You can ask the target agent to handle the trace buffer as a
6168 circular buffer, discarding the oldest trace frames to make room for
6169 newer ones, by setting circular-trace-buffer to on. This feature may
6170 not be available for all target agents.
6171
21a0512e
PP
6172* Changed commands
6173
6174disassemble
6175 The disassemble command, when invoked with two arguments, now requires
6176 the arguments to be comma-separated.
6177
0fe7935b
DJ
6178info variables
6179 The info variables command now displays variable definitions. Files
6180 which only declare a variable are not shown.
6181
fb2e7cb4
JB
6182source
6183 The source command is now capable of sourcing Python scripts.
6184 This feature is dependent on the debugger being build with Python
6185 support.
6186
6187 Related to this enhancement is also the introduction of a new command
6188 "set script-extension" (see below).
6189
6c95b8df
PA
6190* New commands (for set/show, see "New options" below)
6191
399cd161 6192record save [<FILENAME>]
994bc098 6193 Save a file (in core file format) containing the process record
399cd161
MS
6194 execution log for replay debugging at a later time.
6195
6196record restore <FILENAME>
6197 Restore the process record execution log that was saved at an
6198 earlier time, for replay debugging.
6199
6c95b8df
PA
6200add-inferior [-copies <N>] [-exec <FILENAME>]
6201 Add a new inferior.
6202
6203clone-inferior [-copies <N>] [ID]
6204 Make a new inferior ready to execute the same program another
6205 inferior has loaded.
6206
6207remove-inferior ID
6208 Remove an inferior.
6209
6210maint info program-spaces
6211 List the program spaces loaded into GDB.
6212
9a7071a8
JB
6213set remote interrupt-sequence [Ctrl-C | BREAK | BREAK-g]
6214show remote interrupt-sequence
6215 Allow the user to select one of ^C, a BREAK signal or BREAK-g
6216 as the sequence to the remote target in order to interrupt the execution.
6217 Ctrl-C is a default. Some system prefers BREAK which is high level of
6218 serial line for some certain time. Linux kernel prefers BREAK-g, a.k.a
6219 Magic SysRq g. It is BREAK signal and character 'g'.
6220
6221set remote interrupt-on-connect [on | off]
6222show remote interrupt-on-connect
6223 When interrupt-on-connect is ON, gdb sends interrupt-sequence to
6224 remote target when gdb connects to it. This is needed when you debug
6225 Linux kernel.
6226
6227set remotebreak [on | off]
6228show remotebreak
6229Deprecated. Use "set/show remote interrupt-sequence" instead.
6230
f61e138d
SS
6231tvariable $NAME [ = EXP ]
6232 Create or modify a trace state variable.
6233
6234info tvariables
6235 List trace state variables and their values.
6236
6237delete tvariable $NAME ...
6238 Delete one or more trace state variables.
6239
6da95a67
SS
6240teval EXPR, ...
6241 Evaluate the given expressions without collecting anything into the
6242 trace buffer. (Valid in tracepoint actions only.)
6243
7a697b8d
SS
6244ftrace FN / FILE:LINE / *ADDR
6245 Define a fast tracepoint at the given function, line, or address.
6246
b0f02ee9
JK
6247* New expression syntax
6248
6249 GDB now parses the 0b prefix of binary numbers the same way as GCC does.
6250 GDB now parses 0b101010 identically with 42.
6251
6c95b8df
PA
6252* New options
6253
6254set follow-exec-mode new|same
6255show follow-exec-mode
6256 Control whether GDB reuses the same inferior across an exec call or
6257 creates a new one. This is useful to be able to restart the old
6258 executable after the inferior having done an exec call.
6259
236f1d4d
SS
6260set default-collect EXPR, ...
6261show default-collect
6262 Define a list of expressions to be collected at each tracepoint.
6263 This is a useful way to ensure essential items are not overlooked,
6264 such as registers or a critical global variable.
6265
d5551862
SS
6266set disconnected-tracing
6267show disconnected-tracing
6268 If set to 1, the target is instructed to continue tracing if it
6269 loses its connection to GDB. If 0, the target is to stop tracing
6270 upon disconnection.
6271
4daf5ac0
SS
6272set circular-trace-buffer
6273show circular-trace-buffer
6274 If set to on, the target is instructed to use a circular trace buffer
6275 and discard the oldest trace frames instead of stopping the trace due
6276 to a full trace buffer. If set to off, the trace stops when the buffer
6277 fills up. Some targets may not support this.
6278
fb2e7cb4
JB
6279set script-extension off|soft|strict
6280show script-extension
6281 If set to "off", the debugger does not perform any script language
6282 recognition, and all sourced files are assumed to be GDB scripts.
6283 If set to "soft" (the default), files are sourced according to
6284 filename extension, falling back to GDB scripts if the first
6285 evaluation failed.
6286 If set to "strict", files are sourced according to filename extension.
6287
2b71fc8e
JB
6288set ada trust-PAD-over-XVS on|off
6289show ada trust-PAD-over-XVS
6290 If off, activate a workaround against a bug in the debugging information
6291 generated by the compiler for PAD types (see gcc/exp_dbug.ads in
6292 the GCC sources for more information about the GNAT encoding and
6293 PAD types in particular). It is always safe to set this option to
6294 off, but this introduces a slight performance penalty. The default
6295 is on.
6296
de2e5182
TT
6297* Python API Improvements
6298
6299 ** GDB provides the new class gdb.LazyString. This is useful in
6300 some pretty-printing cases. The new method gdb.Value.lazy_string
6301 provides a simple way to create objects of this type.
6302
6303 ** The fields returned by gdb.Type.fields now have an
6304 `is_base_class' attribute.
6305
6306 ** The new method gdb.Type.range returns the range of an array type.
6307
6308 ** The new method gdb.parse_and_eval can be used to parse and
6309 evaluate an expression.
6310
f61e138d
SS
6311* New remote packets
6312
6313QTDV
6314 Define a trace state variable.
6315
6316qTV
6317 Get the current value of a trace state variable.
6318
d5551862
SS
6319QTDisconnected
6320 Set desired tracing behavior upon disconnection.
6321
4daf5ac0
SS
6322QTBuffer:circular
6323 Set the trace buffer to be linear or circular.
6324
d5551862
SS
6325qTfP, qTsP
6326 Get data about the tracepoints currently in use.
6327
2d483d34
MS
6328* Bug fixes
6329
6330Process record now works correctly with hardware watchpoints.
6331
6e0e5977
JB
6332Multiple bug fixes have been made to the mips-irix port, making it
6333much more reliable. In particular:
6334 - Debugging threaded applications is now possible again. Previously,
6335 GDB would hang while starting the program, or while waiting for
6336 the program to stop at a breakpoint.
6337 - Attaching to a running process no longer hangs.
6338 - An error occurring while loading a core file has been fixed.
6339 - Changing the value of the PC register now works again. This fixes
6340 problems observed when using the "jump" command, or when calling
6341 a function from GDB, or even when assigning a new value to $pc.
6342 - With the "finish" and "return" commands, the return value for functions
6343 returning a small array is now correctly printed.
6344 - It is now possible to break on shared library code which gets executed
6345 during a shared library init phase (code executed while executing
6346 their .init section). Previously, the breakpoint would have no effect.
6347 - GDB is now able to backtrace through the signal handler for
6348 non-threaded programs.
6349
93c26624
JK
6350PIE (Position Independent Executable) programs debugging is now supported.
6351This includes debugging execution of PIC (Position Independent Code) shared
6352libraries although for that, it should be possible to run such libraries as an
6353executable program.
6354
abc7453d 6355*** Changes in GDB 7.0
75feb17d 6356
4efc6507
DE
6357* GDB now has an interface for JIT compilation. Applications that
6358dynamically generate code can create symbol files in memory and register
6359them with GDB. For users, the feature should work transparently, and
6360for JIT developers, the interface is documented in the GDB manual in the
6361"JIT Compilation Interface" chapter.
6362
782b2b07
SS
6363* Tracepoints may now be conditional. The syntax is as for
6364breakpoints; either an "if" clause appended to the "trace" command,
6365or the "condition" command is available. GDB sends the condition to
6366the target for evaluation using the same bytecode format as is used
6367for tracepoint actions.
6368
53a71c06
CR
6369* The disassemble command now supports: an optional /r modifier, print the
6370raw instructions in hex as well as in symbolic form, and an optional /m
6371modifier to print mixed source+assembly.
e6158f16 6372
e7a8dbfb
HZ
6373* Process record and replay
6374
6375 In a architecture environment that supports ``process record and
6376 replay'', ``process record and replay'' target can record a log of
6377 the process execution, and replay it with both forward and reverse
6378 execute commands.
6379
64644d9b
MS
6380* Reverse debugging: GDB now has new commands reverse-continue, reverse-
6381step, reverse-next, reverse-finish, reverse-stepi, reverse-nexti, and
6382set execution-direction {forward|reverse}, for targets that support
6383reverse execution.
6384
b9412953
DD
6385* GDB now supports hardware watchpoints on MIPS/Linux systems. This
6386feature is available with a native GDB running on kernel version
63872.6.28 or later.
6388
6c7a06a3
TT
6389* GDB now has support for multi-byte and wide character sets on the
6390target. Strings whose character type is wchar_t, char16_t, or
6391char32_t are now correctly printed. GDB supports wide- and unicode-
6392literals in C, that is, L'x', L"string", u'x', u"string", U'x', and
6393U"string" syntax. And, GDB allows the "%ls" and "%lc" formats in
6394`printf'. This feature requires iconv to work properly; if your
6395system does not have a working iconv, GDB can use GNU libiconv. See
6396the installation instructions for more information.
6397
f1838a98
UW
6398* GDB now supports automatic retrieval of shared library files from
6399remote targets. To use this feature, specify a system root that begins
6400with the `remote:' prefix, either via the `set sysroot' command or via
6401the `--with-sysroot' configure-time option.
6402
55333a84
DE
6403* "info sharedlibrary" now takes an optional regex of libraries to show,
6404and it now reports if a shared library has no debugging information.
6405
7f6a6314
PM
6406* Commands `set debug-file-directory', `set solib-search-path' and `set args'
6407now complete on file names.
6408
65d12d83
TT
6409* When completing in expressions, gdb will attempt to limit
6410completions to allowable structure or union fields, where appropriate.
6411For instance, consider:
6412
6413 # struct example { int f1; double f2; };
6414 # struct example variable;
6415 (gdb) p variable.
6416
6417If the user types TAB at the end of this command line, the available
6418completions will be "f1" and "f2".
6419
edb3359d
DJ
6420* Inlined functions are now supported. They show up in backtraces, and
6421the "step", "next", and "finish" commands handle them automatically.
6422
2fae03e8
TT
6423* GDB now supports the token-splicing (##) and stringification (#)
6424operators when expanding macros. It also supports variable-arity
6425macros.
6426
47a3467a 6427* GDB now supports inspecting extra signal information, exported by
58d6951d
DJ
6428the new $_siginfo convenience variable. The feature is currently
6429implemented on linux ARM, i386 and amd64.
6430
6431* GDB can now display the VFP floating point registers and NEON vector
6432registers on ARM targets. Both ARM GNU/Linux native GDB and gdbserver
6433can provide these registers (requires Linux 2.6.30 or later). Remote
6434and simulator targets may also provide them.
47a3467a 6435
08388c79
DE
6436* New remote packets
6437
6438qSearch:memory:
6439 Search memory for a sequence of bytes.
6440
a6f3e723
SL
6441QStartNoAckMode
6442 Turn off `+'/`-' protocol acknowledgments to permit more efficient
6443 operation over reliable transport links. Use of this packet is
6444 controlled by the `set remote noack-packet' command.
6445
d7713ae0
EZ
6446vKill
6447 Kill the process with the specified process ID. Use this in preference
6448 to `k' when multiprocess protocol extensions are supported.
6449
07e059b5
VP
6450qXfer:osdata:read
6451 Obtains additional operating system information
6452
47a3467a
PA
6453qXfer:siginfo:read
6454qXfer:siginfo:write
6455 Read or write additional signal information.
6456
060871df
PA
6457* Removed remote protocol undocumented extension
6458
6459 An undocumented extension to the remote protocol's `S' stop reply
82f06518 6460 packet that permitted the stub to pass a process id was removed.
060871df
PA
6461 Remote servers should use the `T' stop reply packet instead.
6462
c055b101 6463* GDB now supports multiple function calling conventions according to the
a0ef4274 6464DWARF-2 DW_AT_calling_convention function attribute.
994bc098 6465
c055b101 6466* The SH target utilizes the aforementioned change to distinguish between gcc
a0ef4274
DJ
6467and Renesas calling convention. It also adds the new CLI commands
6468`set/show sh calling-convention'.
c055b101 6469
31fffb02
CS
6470* GDB can now read compressed debug sections, as produced by GNU gold
6471with the --compress-debug-sections=zlib flag.
6472
88d8a8e0
JB
6473* 64-bit core files are now supported on AIX.
6474
7f99b190
JB
6475* Thread switching is now supported on Tru64.
6476
ccd213ac
DJ
6477* Watchpoints can now be set on unreadable memory locations, e.g. addresses
6478which will be allocated using malloc later in program execution.
6479
82f06518 6480* The qXfer:libraries:read remote protocol packet now allows passing a
31fffb02 6481list of section offsets.
1fddbabb 6482
a0ef4274
DJ
6483* On GNU/Linux, GDB can now attach to stopped processes. Several race
6484conditions handling signals delivered during attach or thread creation
6485have also been fixed.
6486
bfb8797a 6487* GDB now supports the use of DWARF boolean types for Ada's type Boolean.
158c7665
PH
6488From the user's standpoint, all unqualified instances of True and False
6489are treated as the standard definitions, regardless of context.
bfb8797a 6490
71c25dea
TT
6491* GDB now parses C++ symbol and type names more flexibly. For
6492example, given:
6493
6494 template<typename T> class C { };
6495 C<char const *> c;
6496
6497GDB will now correctly handle all of:
6498
6499 ptype C<char const *>
6500 ptype C<char const*>
6501 ptype C<const char *>
6502 ptype C<const char*>
6503
ccd213ac
DJ
6504* New features in the GDB remote stub, gdbserver
6505
6506 - The "--wrapper" command-line argument tells gdbserver to use a
6507 wrapper program to launch programs for debugging.
6508
7ae0e2a2
UW
6509 - On PowerPC and S/390 targets, it is now possible to use a single
6510 gdbserver executable to debug both 32-bit and 64-bit programs.
6511 (This requires gdbserver itself to be built as a 64-bit executable.)
6512
a6f3e723
SL
6513 - gdbserver uses the new noack protocol mode for TCP connections to
6514 reduce communications latency, if also supported and enabled in GDB.
6515
da8bd9a3
DJ
6516 - Support for the sparc64-linux-gnu target is now included in
6517 gdbserver.
6518
d70e31dd
DE
6519 - The amd64-linux build of gdbserver now supports debugging both
6520 32-bit and 64-bit programs.
6521
6522 - The i386-linux, amd64-linux, and i386-win32 builds of gdbserver
6523 now support hardware watchpoints, and will use them automatically
6524 as appropriate.
6525
d57a3c85
TJB
6526* Python scripting
6527
6528 GDB now has support for scripting using Python. Whether this is
6529 available is determined at configure time.
6530
d8906c6f
TJB
6531 New GDB commands can now be written in Python.
6532
aadc346a
JB
6533* Ada tasking support
6534
6535 Ada tasks can now be inspected in GDB. The following commands have
6536 been introduced:
6537
6538 info tasks
6539 Print the list of Ada tasks.
6540 info task N
6541 Print detailed information about task number N.
6542 task
6543 Print the task number of the current task.
6544 task N
6545 Switch the context of debugging to task number N.
6546
adb483fe
DJ
6547* Support for user-defined prefixed commands. The "define" command can
6548add new commands to existing prefixes, e.g. "target".
6549
2277426b
PA
6550* Multi-inferior, multi-process debugging.
6551
6552 GDB now has generalized support for multi-inferior debugging. See
6553 "Debugging Multiple Inferiors" in the manual for more information.
6554 Although availability still depends on target support, the command
6555 set is more uniform now. The GNU/Linux specific multi-forks support
6556 has been migrated to this new framework. This implied some user
6557 visible changes; see "New commands" and also "Removed commands"
6558 below.
6559
08d16641
PA
6560* Target descriptions can now describe the target OS ABI. See the
6561"Target Description Format" section in the user manual for more
6562information.
6563
e35359c5
UW
6564* Target descriptions can now describe "compatible" architectures
6565to indicate that the target can execute applications for a different
6566architecture in addition to those for the main target architecture.
6567See the "Target Description Format" section in the user manual for
6568more information.
6569
85e747d2
UW
6570* Multi-architecture debugging.
6571
6572 GDB now includes general supports for debugging applications on
6573 hybrid systems that use more than one single processor architecture
6574 at the same time. Each such hybrid architecture still requires
6575 specific support to be added. The only hybrid architecture supported
6576 in this version of GDB is the Cell Broadband Engine.
6577
6578* GDB now supports integrated debugging of Cell/B.E. applications that
6579use both the PPU and SPU architectures. To enable support for hybrid
6580Cell/B.E. debugging, you need to configure GDB to support both the
6581powerpc-linux or powerpc64-linux and the spu-elf targets, using the
6582--enable-targets configure option.
6583
11ade57a
PA
6584* Non-stop mode debugging.
6585
6586 For some targets, GDB now supports an optional mode of operation in
6587 which you can examine stopped threads while other threads continue
6588 to execute freely. This is referred to as non-stop mode, with the
6589 old mode referred to as all-stop mode. See the "Non-Stop Mode"
6590 section in the user manual for more information.
6591
6592 To be able to support remote non-stop debugging, a remote stub needs
6593 to implement the non-stop mode remote protocol extensions, as
6594 described in the "Remote Non-Stop" section of the user manual. The
6595 GDB remote stub, gdbserver, has been adjusted to support these
6596 extensions on linux targets.
6597
d7713ae0 6598* New commands (for set/show, see "New options" below)
75feb17d 6599
a96d9b2e
SDJ
6600catch syscall [NAME(S) | NUMBER(S)]
6601 Catch system calls. Arguments, which should be names of system
6602 calls or their numbers, mean catch only those syscalls. Without
6603 arguments, every syscall will be caught. When the inferior issues
6604 any of the specified syscalls, GDB will stop and announce the system
6605 call, both when it is called and when its call returns. This
6606 feature is currently available with a native GDB running on the
6607 Linux Kernel, under the following architectures: x86, x86_64,
6608 PowerPC and PowerPC64.
6609
08388c79
DE
6610find [/size-char] [/max-count] start-address, end-address|+search-space-size,
6611 val1 [, val2, ...]
6612 Search memory for a sequence of bytes.
6613
d57a3c85
TJB
6614maint set python print-stack
6615maint show python print-stack
6616 Show a stack trace when an error is encountered in a Python script.
6617
6618python [CODE]
6619 Invoke CODE by passing it to the Python interpreter.
6620
d7713ae0
EZ
6621macro define
6622macro list
6623macro undef
6624 These allow macros to be defined, undefined, and listed
6625 interactively.
6626
6627info os processes
6628 Show operating system information about processes.
6629
2277426b
PA
6630info inferiors
6631 List the inferiors currently under GDB's control.
6632
6633inferior NUM
6634 Switch focus to inferior number NUM.
6635
6636detach inferior NUM
6637 Detach from inferior number NUM.
6638
6639kill inferior NUM
6640 Kill inferior number NUM.
6641
d7713ae0
EZ
6642* New options
6643
3285f3fe
UW
6644set spu stop-on-load
6645show spu stop-on-load
6646 Control whether to stop for new SPE threads during Cell/B.E. debugging.
6647
ff1a52c6
UW
6648set spu auto-flush-cache
6649show spu auto-flush-cache
6650 Control whether to automatically flush the software-managed cache
6651 during Cell/B.E. debugging.
6652
d7713ae0
EZ
6653set sh calling-convention
6654show sh calling-convention
6655 Control the calling convention used when calling SH target functions.
6656
e0a3ce09 6657set debug timestamp
75feb17d 6658show debug timestamp
d7713ae0
EZ
6659 Control display of timestamps with GDB debugging output.
6660
6661set disassemble-next-line
6662show disassemble-next-line
6663 Control display of disassembled source lines or instructions when
6664 the debuggee stops.
6665
6666set remote noack-packet
6667show remote noack-packet
6668 Set/show the use of remote protocol QStartNoAckMode packet. See above
6669 under "New remote packets."
6670
6671set remote query-attached-packet
6672show remote query-attached-packet
6673 Control use of remote protocol `qAttached' (query-attached) packet.
6674
6675set remote read-siginfo-object
6676show remote read-siginfo-object
6677 Control use of remote protocol `qXfer:siginfo:read' (read-siginfo-object)
6678 packet.
6679
6680set remote write-siginfo-object
6681show remote write-siginfo-object
6682 Control use of remote protocol `qXfer:siginfo:write' (write-siginfo-object)
6683 packet.
6684
40ab02ce
MS
6685set remote reverse-continue
6686show remote reverse-continue
6687 Control use of remote protocol 'bc' (reverse-continue) packet.
6688
6689set remote reverse-step
6690show remote reverse-step
6691 Control use of remote protocol 'bs' (reverse-step) packet.
6692
d7713ae0
EZ
6693set displaced-stepping
6694show displaced-stepping
6695 Control displaced stepping mode. Displaced stepping is a way to
6696 single-step over breakpoints without removing them from the debuggee.
6697 Also known as "out-of-line single-stepping".
6698
6699set debug displaced
6700show debug displaced
6701 Control display of debugging info for displaced stepping.
6702
6703maint set internal-error
6704maint show internal-error
6705 Control what GDB does when an internal error is detected.
6706
6707maint set internal-warning
6708maint show internal-warning
6709 Control what GDB does when an internal warning is detected.
75feb17d 6710
ccd213ac
DJ
6711set exec-wrapper
6712show exec-wrapper
6713unset exec-wrapper
6714 Use a wrapper program to launch programs for debugging.
fa4727a6 6715
aad4b048
JB
6716set multiple-symbols (all|ask|cancel)
6717show multiple-symbols
6718 The value of this variable can be changed to adjust the debugger behavior
6719 when an expression or a breakpoint location contains an ambiguous symbol
6720 name (an overloaded function name, for instance).
994bc098 6721
74960c60
VP
6722set breakpoint always-inserted
6723show breakpoint always-inserted
6724 Keep breakpoints always inserted in the target, as opposed to inserting
6725 them when resuming the target, and removing them when the target stops.
6726 This option can improve debugger performance on slow remote targets.
6727
0428b8f5
DJ
6728set arm fallback-mode (arm|thumb|auto)
6729show arm fallback-mode
6730set arm force-mode (arm|thumb|auto)
6731show arm force-mode
6732 These commands control how ARM GDB determines whether instructions
6733 are ARM or Thumb. The default for both settings is auto, which uses
6734 the current CPSR value for instructions without symbols; previous
6735 versions of GDB behaved as if "set arm fallback-mode arm".
6736
ef273377
CL
6737set arm unwind-secure-frames
6738 Enable unwinding from Non-secure to Secure mode on Cortex-M with
6739 Security extension.
6740 This can trigger security exceptions when unwinding exception stacks.
6741
10568435
JK
6742set disable-randomization
6743show disable-randomization
6744 Standalone programs run with the virtual address space randomization enabled
6745 by default on some platforms. This option keeps the addresses stable across
6746 multiple debugging sessions.
6747
d7713ae0
EZ
6748set non-stop
6749show non-stop
6750 Control whether other threads are stopped or not when some thread hits
6751 a breakpoint.
6752
b3eb342c 6753set target-async
d7713ae0 6754show target-async
b3eb342c
VP
6755 Requests that asynchronous execution is enabled in the target, if available.
6756 In this case, it's possible to resume target in the background, and interact
6757 with GDB while the target is running. "show target-async" displays the
6758 current state of asynchronous execution of the target.
6759
6c7a06a3
TT
6760set target-wide-charset
6761show target-wide-charset
6762 The target-wide-charset is the name of the character set that GDB
6763 uses when printing characters whose type is wchar_t.
6764
84603566
SL
6765set tcp auto-retry (on|off)
6766show tcp auto-retry
6767set tcp connect-timeout
6768show tcp connect-timeout
6769 These commands allow GDB to retry failed TCP connections to a remote stub
6770 with a specified timeout period; this is useful if the stub is launched
6771 in parallel with GDB but may not be ready to accept connections immediately.
6772
17a37d48
PP
6773set libthread-db-search-path
6774show libthread-db-search-path
6775 Control list of directories which GDB will search for appropriate
6776 libthread_db.
6777
d4db2f36
PA
6778set schedule-multiple (on|off)
6779show schedule-multiple
6780 Allow GDB to resume all threads of all processes or only threads of
6781 the current process.
6782
4e5d721f
DE
6783set stack-cache
6784show stack-cache
6785 Use more aggressive caching for accesses to the stack. This improves
6786 performance of remote debugging (particularly backtraces) without
6787 affecting correctness.
6788
910c5da8
JB
6789set interactive-mode (on|off|auto)
6790show interactive-mode
6791 Control whether GDB runs in interactive mode (on) or not (off).
6792 When in interactive mode, GDB waits for the user to answer all
6793 queries. Otherwise, GDB does not wait and assumes the default
6794 answer. When set to auto (the default), GDB determines which
6795 mode to use based on the stdin settings.
6796
2277426b
PA
6797* Removed commands
6798
6799info forks
6800 For program forks, this is replaced by the new more generic `info
6801 inferiors' command. To list checkpoints, you can still use the
6802 `info checkpoints' command, which was an alias for the `info forks'
6803 command.
6804
6805fork NUM
6806 Replaced by the new `inferior' command. To switch between
6807 checkpoints, you can still use the `restart' command, which was an
6808 alias for the `fork' command.
6809
6810process PID
6811 This is removed, since some targets don't have a notion of
6812 processes. To switch between processes, you can still use the
6813 `inferior' command using GDB's own inferior number.
6814
6815delete fork NUM
6816 For program forks, this is replaced by the new more generic `kill
6817 inferior' command. To delete a checkpoint, you can still use the
6818 `delete checkpoint' command, which was an alias for the `delete
6819 fork' command.
6820
6821detach fork NUM
6822 For program forks, this is replaced by the new more generic `detach
6823 inferior' command. To detach a checkpoint, you can still use the
6824 `detach checkpoint' command, which was an alias for the `detach
6825 fork' command.
6826
a80b95ba
TG
6827* New native configurations
6828
6829x86/x86_64 Darwin i[34567]86-*-darwin*
6830
b8bfd3ed
JB
6831x86_64 MinGW x86_64-*-mingw*
6832
75a2d5e7
TT
6833* New targets
6834
c28c63d8 6835Lattice Mico32 lm32-*
75a2d5e7 6836x86 DICOS i[34567]86-*-dicos*
4c1d2973 6837x86_64 DICOS x86_64-*-dicos*
5f814c3b 6838S+core 3 score-*-*
75a2d5e7 6839
6de3146c
PA
6840* The GDB remote stub, gdbserver, now supports x86 Windows CE
6841 (mingw32ce) debugging.
6842
d5cbbe6e
JB
6843* Removed commands
6844
6845catch load
6846catch unload
6847 These commands were actually not implemented on any target.
6848
75feb17d 6849*** Changes in GDB 6.8
f9ed52be 6850
af5ca30d
NH
6851* New native configurations
6852
6853NetBSD/hppa hppa*-*netbsd*
94a0e877 6854Xtensa GNU/Linux xtensa*-*-linux*
af5ca30d
NH
6855
6856* New targets
6857
6858NetBSD/hppa hppa*-*-netbsd*
82f06518 6859Xtensa GNU/Linux xtensa*-*-linux*
af5ca30d 6860
7a404eba
PA
6861* Change in command line behavior -- corefiles vs. process ids.
6862
6863 When the '-p NUMBER' or '--pid NUMBER' options are used, and
6864 attaching to process NUMBER fails, GDB no longer attempts to open a
6865 core file named NUMBER. Attaching to a program using the -c option
6866 is no longer supported. Instead, use the '-p' or '--pid' options.
6867
430ebac9
PA
6868* GDB can now be built as a native debugger for debugging Windows x86
6869(mingw32) Portable Executable (PE) programs.
6870
fe6fbf8b 6871* Pending breakpoints no longer change their number when their address
8d5f9c6f 6872is resolved.
fe6fbf8b
VP
6873
6874* GDB now supports breakpoints with multiple locations,
8d5f9c6f
DJ
6875including breakpoints on C++ constructors, inside C++ templates,
6876and in inlined functions.
fe6fbf8b 6877
10665d76
JB
6878* GDB's ability to debug optimized code has been improved. GDB more
6879accurately identifies function bodies and lexical blocks that occupy
6880more than one contiguous range of addresses.
6881
7cc46491
DJ
6882* Target descriptions can now describe registers for PowerPC.
6883
d71340b8
DJ
6884* The GDB remote stub, gdbserver, now supports the AltiVec and SPE
6885registers on PowerPC targets.
6886
523c4513
DJ
6887* The GDB remote stub, gdbserver, now supports thread debugging on GNU/Linux
6888targets even when the libthread_db library is not available.
6889
a6b151f1
DJ
6890* The GDB remote stub, gdbserver, now supports the new file transfer
6891commands (remote put, remote get, and remote delete).
6892
2d717e4f
DJ
6893* The GDB remote stub, gdbserver, now supports run and attach in
6894extended-remote mode.
6895
24a836bd 6896* hppa*64*-*-hpux11* target broken
d001be7a
DJ
6897The debugger is unable to start a program and fails with the following
6898error: "Error trying to get information about dynamic linker".
6899The gdb-6.7 release is also affected.
24a836bd 6900
d0c678e6
UW
6901* GDB now supports the --enable-targets= configure option to allow
6902building a single GDB executable that supports multiple remote
6903target architectures.
6904
d64a946d
TJB
6905* GDB now supports debugging C and C++ programs which use the
6906Decimal Floating Point extension. In addition, the PowerPC target
6907now has a set of pseudo-registers to inspect decimal float values
6908stored in two consecutive float registers.
6909
ee163bf5
VP
6910* The -break-insert MI command can optionally create pending
6911breakpoints now.
6912
b93b6ca7 6913* Improved support for debugging Ada
d001be7a
DJ
6914Many improvements to the Ada language support have been made. These
6915include:
b93b6ca7
JB
6916 - Better support for Ada2005 interface types
6917 - Improved handling of arrays and slices in general
6918 - Better support for Taft-amendment types
6919 - The '{type} ADDRESS' expression is now allowed on the left hand-side
6920 of an assignment
6921 - Improved command completion in Ada
6922 - Several bug fixes
6923
d001be7a
DJ
6924* GDB on GNU/Linux and HP/UX can now debug through "exec" of a new
6925process.
6926
a6b151f1
DJ
6927* New commands
6928
6d53d0af
JB
6929set print frame-arguments (all|scalars|none)
6930show print frame-arguments
6931 The value of this variable can be changed to control which argument
6932 values should be printed by the debugger when displaying a frame.
6933
a6b151f1
DJ
6934remote put
6935remote get
6936remote delete
6937 Transfer files to and from a remote target, and delete remote files.
6938
6939* New MI commands
6940
6941-target-file-put
6942-target-file-get
6943-target-file-delete
6944 Transfer files to and from a remote target, and delete remote files.
6945
6946* New remote packets
6947
6948vFile:open:
6949vFile:close:
6950vFile:pread:
6951vFile:pwrite:
6952vFile:unlink:
6953 Open, close, read, write, and delete files on the remote system.
d0c678e6 6954
2d717e4f
DJ
6955vAttach
6956 Attach to an existing process on the remote system, in extended-remote
6957 mode.
6958
6959vRun
6960 Run a new process on the remote system, in extended-remote mode.
6961
8d5f9c6f 6962*** Changes in GDB 6.7
6dd09645 6963
994bc098 6964* Resolved 101 resource leaks, null pointer dereferences, etc. in gdb,
19d378fc
MS
6965bfd, libiberty and opcodes, as revealed by static analysis donated by
6966Coverity, Inc. (http://scan.coverity.com).
6967
3a40aaa0
UW
6968* When looking up multiply-defined global symbols, GDB will now prefer the
6969symbol definition in the current shared library if it was built using the
6970-Bsymbolic linker option.
6971
a6ec25f2
BW
6972* When the Text User Interface (TUI) is not configured, GDB will now
6973recognize the -tui command-line option and print a message that the TUI
6974is not supported.
6975
994bc098 6976* The GDB remote stub, gdbserver, now has lower overhead for high
6dd09645
JB
6977frequency signals (e.g. SIGALRM) via the QPassSignals packet.
6978
c9bb8148
DJ
6979* GDB for MIPS targets now autodetects whether a remote target provides
698032-bit or 64-bit register values.
6981
0d5de010
DJ
6982* Support for C++ member pointers has been improved.
6983
23181151
DJ
6984* GDB now understands XML target descriptions, which specify the
6985target's overall architecture. GDB can read a description from
6986a local file or over the remote serial protocol.
6987
ea37ba09
DJ
6988* Vectors of single-byte data use a new integer type which is not
6989automatically displayed as character or string data.
6990
6991* The /s format now works with the print command. It displays
6992arrays of single-byte integers and pointers to single-byte integers
6993as strings.
e1f48ead 6994
123dc839
DJ
6995* Target descriptions can now describe target-specific registers,
6996for architectures which have implemented the support (currently
8d5f9c6f 6997only ARM, M68K, and MIPS).
123dc839 6998
05a4558a
DJ
6999* GDB and the GDB remote stub, gdbserver, now support the XScale
7000iWMMXt coprocessor.
fb1e4ffc 7001
7c963485
PA
7002* The GDB remote stub, gdbserver, has been updated to support
7003ARM Windows CE (mingw32ce) debugging, and GDB Windows CE support
7004has been rewritten to use the standard GDB remote protocol.
7005
b18be20d
DJ
7006* GDB can now step into C++ functions which are called through thunks.
7007
0ca420ce
UW
7008* GDB for the Cell/B.E. SPU now supports overlay debugging.
7009
31d99776
DJ
7010* The GDB remote protocol "qOffsets" packet can now honor ELF segment
7011layout. It also supports a TextSeg= and DataSeg= response when only
7012segment base addresses (rather than offsets) are available.
7013
994bc098 7014* The /i format now outputs any trailing branch delay slot instructions
a4642986
MR
7015immediately following the last instruction within the count specified.
7016
cfa9d6d9
DJ
7017* The GDB remote protocol "T" stop reply packet now supports a
7018"library" response. Combined with the new "qXfer:libraries:read"
7019packet, this response allows GDB to debug shared libraries on targets
7020where the operating system manages the list of loaded libraries (e.g.
7021Windows and SymbianOS).
255e7678
DJ
7022
7023* The GDB remote stub, gdbserver, now supports dynamic link libraries
7024(DLLs) on Windows and Windows CE targets.
f5db8714
JK
7025
7026* GDB now supports a faster verification that a .debug file matches its binary
7027according to its build-id signature, if the signature is present.
cfa9d6d9 7028
c9bb8148
DJ
7029* New commands
7030
23776285
MR
7031set remoteflow
7032show remoteflow
7033 Enable or disable hardware flow control (RTS/CTS) on the serial port
7034 when debugging using remote targets.
7035
c9bb8148
DJ
7036set mem inaccessible-by-default
7037show mem inaccessible-by-default
7038 If the target supplies a memory map, for instance via the remote
7039 protocol's "qXfer:memory-map:read" packet, setting this variable
7040 prevents GDB from accessing memory outside the memory map. This
7041 is useful for targets with memory mapped registers or which react
7042 badly to accesses of unmapped address space.
7043
7044set breakpoint auto-hw
7045show breakpoint auto-hw
7046 If the target supplies a memory map, for instance via the remote
7047 protocol's "qXfer:memory-map:read" packet, setting this variable
7048 lets GDB use hardware breakpoints automatically for memory regions
7049 where it can not use software breakpoints. This covers both the
7050 "break" command and internal breakpoints used for other commands
7051 including "next" and "finish".
7052
0e420bd8
JB
7053catch exception
7054catch exception unhandled
7055 Stop the program execution when Ada exceptions are raised.
7056
7057catch assert
7058 Stop the program execution when an Ada assertion failed.
7059
f822c95b
DJ
7060set sysroot
7061show sysroot
7062 Set an alternate system root for target files. This is a more
7063 general version of "set solib-absolute-prefix", which is now
7064 an alias to "set sysroot".
7065
83cc5c53
UW
7066info spu
7067 Provide extended SPU facility status information. This set of
7068 commands is available only when debugging the Cell/B.E. SPU
7069 architecture.
7070
bd372731
MK
7071* New native configurations
7072
7073OpenBSD/sh sh*-*openbsd*
7074
23181151
DJ
7075set tdesc filename
7076unset tdesc filename
7077show tdesc filename
7078 Use the specified local file as an XML target description, and do
7079 not query the target for its built-in description.
7080
c9bb8148
DJ
7081* New targets
7082
54fe9172 7083OpenBSD/sh sh*-*-openbsd*
c9bb8148 7084MIPS64 GNU/Linux (gdbserver) mips64-linux-gnu
c077150c 7085Toshiba Media Processor mep-elf
c9bb8148 7086
6dd09645
JB
7087* New remote packets
7088
7089QPassSignals:
7090 Ignore the specified signals; pass them directly to the debugged program
7091 without stopping other threads or reporting them to GDB.
7092
23181151
DJ
7093qXfer:features:read:
7094 Read an XML target description from the target, which describes its
7095 features.
6dd09645 7096
83cc5c53
UW
7097qXfer:spu:read:
7098qXfer:spu:write:
7099 Read or write contents of an spufs file on the target system. These
7100 packets are available only on the Cell/B.E. SPU architecture.
7101
cfa9d6d9
DJ
7102qXfer:libraries:read:
7103 Report the loaded shared libraries. Combined with new "T" packet
7104 response, this packet allows GDB to debug shared libraries on
7105 targets where the operating system manages the list of loaded
7106 libraries (e.g. Windows and SymbianOS).
7107
483367ee
DJ
7108* Removed targets
7109
7110Support for these obsolete configurations has been removed.
7111
d08950c4
UW
7112alpha*-*-osf1*
7113alpha*-*-osf2*
7ce59000 7114d10v-*-*
483367ee
DJ
7115hppa*-*-hiux*
7116i[34567]86-ncr-*
7117i[34567]86-*-dgux*
7118i[34567]86-*-lynxos*
7119i[34567]86-*-netware*
7120i[34567]86-*-sco3.2v5*
7121i[34567]86-*-sco3.2v4*
7122i[34567]86-*-sco*
7123i[34567]86-*-sysv4.2*
7124i[34567]86-*-sysv4*
7125i[34567]86-*-sysv5*
7126i[34567]86-*-unixware2*
7127i[34567]86-*-unixware*
7128i[34567]86-*-sysv*
7129i[34567]86-*-isc*
7130m68*-cisco*-*
7131m68*-tandem-*
ad527d2e 7132mips*-*-pe
483367ee 7133rs6000-*-lynxos*
ad527d2e 7134sh*-*-pe
483367ee 7135
7ce59000
DJ
7136* Other removed features
7137
7138target abug
7139target cpu32bug
7140target est
7141target rom68k
7142
7143 Various m68k-only ROM monitors.
7144
ea35711c
DJ
7145target hms
7146target e7000
7147target sh3
7148target sh3e
7149
7150 Various Renesas ROM monitors and debugging interfaces for SH and
7151 H8/300.
7152
7153target ocd
7154
7155 Support for a Macraigor serial interface to on-chip debugging.
7156 GDB does not directly support the newer parallel or USB
7157 interfaces.
7158
7ce59000
DJ
7159DWARF 1 support
7160
994bc098 7161 A debug information format. The predecessor to DWARF 2 and
7ce59000
DJ
7162 DWARF 3, which are still supported.
7163
54d61198
DJ
7164Support for the HP aCC compiler on HP-UX/PA-RISC
7165
7166 SOM-encapsulated symbolic debugging information, automatic
7167 invocation of pxdb, and the aCC custom C++ ABI. This does not
7168 affect HP-UX for Itanium or GCC for HP-UX/PA-RISC. Code compiled
7169 with aCC can still be debugged on an assembly level.
7170
ea35711c
DJ
7171MIPS ".pdr" sections
7172
7173 A MIPS-specific format used to describe stack frame layout
7174 in debugging information.
7175
7176Scheme support
7177
7178 GDB could work with an older version of Guile to debug
7179 the interpreter and Scheme programs running in it.
7180
1a69e1e4
DJ
7181set mips stack-arg-size
7182set mips saved-gpreg-size
7183
7184 Use "set mips abi" to control parameter passing for MIPS.
7185
6dd09645 7186*** Changes in GDB 6.6
e374b601 7187
ca3bf3bd
DJ
7188* New targets
7189
7190Xtensa xtensa-elf
9c309e77 7191Cell Broadband Engine SPU spu-elf
ca3bf3bd 7192
6aec2e11
DJ
7193* GDB can now be configured as a cross-debugger targeting native Windows
7194(mingw32) or Cygwin. It can communicate with a remote debugging stub
7195running on a Windows system over TCP/IP to debug Windows programs.
7196
7197* The GDB remote stub, gdbserver, has been updated to support Windows and
7198Cygwin debugging. Both single-threaded and multi-threaded programs are
7199supported.
7200
17218d91
DJ
7201* The "set trust-readonly-sections" command works again. This command was
7202broken in GDB 6.3, 6.4, and 6.5.
7203
9ebce043
DJ
7204* The "load" command now supports writing to flash memory, if the remote
7205stub provides the required support.
7206
7d3d3ece
DJ
7207* Support for GNU/Linux Thread Local Storage (TLS, per-thread variables) no
7208longer requires symbolic debug information (e.g. DWARF-2).
7209
4f8253f3
JB
7210* New commands
7211
7212set substitute-path
7213unset substitute-path
7214show substitute-path
7215 Manage a list of substitution rules that GDB uses to rewrite the name
7216 of the directories where the sources are located. This can be useful
7217 for instance when the sources were moved to a different location
7218 between compilation and debugging.
7219
9fa66fd7
AS
7220set trace-commands
7221show trace-commands
7222 Print each CLI command as it is executed. Each command is prefixed with
7223 a number of `+' symbols representing the nesting depth.
7224 The source command now has a `-v' option to enable the same feature.
7225
1f5befc1
DJ
7226* REMOVED features
7227
7228The ARM Demon monitor support (RDP protocol, "target rdp").
7229
2ec3381a
DJ
7230Kernel Object Display, an embedded debugging feature which only worked with
7231an obsolete version of Cisco IOS.
7232
3d00d119
DJ
7233The 'set download-write-size' and 'show download-write-size' commands.
7234
be2a5f71
DJ
7235* New remote packets
7236
7237qSupported:
7238 Tell a stub about GDB client features, and request remote target features.
7239 The first feature implemented is PacketSize, which allows the target to
7240 specify the size of packets it can handle - to minimize the number of
7241 packets required and improve performance when connected to a remote
7242 target.
7243
0876f84a 7244qXfer:auxv:read:
8f6606b6 7245 Fetch an OS auxiliary vector from the remote stub. This packet is a
0876f84a
DJ
7246 more efficient replacement for qPart:auxv:read.
7247
9ebce043
DJ
7248qXfer:memory-map:read:
7249 Fetch a memory map from the remote stub, including information about
7250 RAM, ROM, and flash memory devices.
7251
7252vFlashErase:
7253vFlashWrite:
7254vFlashDone:
7255 Erase and program a flash memory device.
7256
0876f84a
DJ
7257* Removed remote packets
7258
7259qPart:auxv:read:
7260 This packet has been replaced by qXfer:auxv:read. Only GDB 6.4 and 6.5
7261 used it, and only gdbserver implemented it.
7262
e374b601 7263*** Changes in GDB 6.5
53e5f3cf 7264
96309189
MS
7265* New targets
7266
7267Renesas M32C/M16C m32c-elf
7268
7269Morpho Technologies ms1 ms1-elf
7270
53e5f3cf
AS
7271* New commands
7272
7273init-if-undefined Initialize a convenience variable, but
7274 only if it doesn't already have a value.
7275
ac264b3b
MS
7276The following commands are presently only implemented for native GNU/Linux:
7277
7278checkpoint Save a snapshot of the program state.
7279
994bc098 7280restart <n> Return the program state to a
ac264b3b
MS
7281 previously saved state.
7282
7283info checkpoints List currently saved checkpoints.
7284
7285delete-checkpoint <n> Delete a previously saved checkpoint.
7286
7287set|show detach-on-fork Tell gdb whether to detach from a newly
7288 forked process, or to keep debugging it.
7289
7290info forks List forks of the user program that
7291 are available to be debugged.
7292
7293fork <n> Switch to debugging one of several
7294 forks of the user program that are
7295 available to be debugged.
7296
7297delete-fork <n> Delete a fork from the list of forks
7298 that are available to be debugged (and
7299 kill the forked process).
7300
7301detach-fork <n> Delete a fork from the list of forks
7302 that are available to be debugged (and
7303 allow the process to continue).
7304
3950dc3f
NS
7305* New architecture
7306
7307Morpho Technologies ms2 ms1-elf
7308
0ea3f30e
DJ
7309* Improved Windows host support
7310
7311GDB now builds as a cross debugger hosted on i686-mingw32, including
7312native console support, and remote communications using either
7313network sockets or serial ports.
7314
f79daebb
GM
7315* Improved Modula-2 language support
7316
7317GDB can now print most types in the Modula-2 syntax. This includes:
7318basic types, set types, record types, enumerated types, range types,
7319pointer types and ARRAY types. Procedure var parameters are correctly
7320printed and hexadecimal addresses and character constants are also
7321written in the Modula-2 syntax. Best results can be obtained by using
7322GNU Modula-2 together with the -gdwarf-2 command line option.
7323
acab6ab2
MM
7324* REMOVED features
7325
7326The ARM rdi-share module.
7327
f4267320
DJ
7328The Netware NLM debug server.
7329
53e5f3cf 7330*** Changes in GDB 6.4
156a53ca 7331
e0ecbda1
MK
7332* New native configurations
7333
02a677ac 7334OpenBSD/arm arm*-*-openbsd*
e0ecbda1
MK
7335OpenBSD/mips64 mips64-*-openbsd*
7336
d64a6579
KB
7337* New targets
7338
7339Morpho Technologies ms1 ms1-elf
7340
b33a6190
AS
7341* New command line options
7342
7343--batch-silent As for --batch, but totally silent.
7344--return-child-result The debugger will exist with the same value
7345 the child (debugged) program exited with.
7346--eval-command COMMAND, -ex COMMAND
7347 Execute a single GDB CLI command. This may be
7348 specified multiple times and in conjunction
7349 with the --command (-x) option.
7350
11dced61
AC
7351* Deprecated commands removed
7352
7353The following commands, that were deprecated in 2000, have been
7354removed:
7355
7356 Command Replacement
7357 set|show arm disassembly-flavor set|show arm disassembler
7358 othernames set arm disassembler
7359 set|show remotedebug set|show debug remote
7360 set|show archdebug set|show debug arch
7361 set|show eventdebug set|show debug event
7362 regs info registers
7363
6fe85783
MK
7364* New BSD user-level threads support
7365
7366It is now possible to debug programs using the user-level threads
7367library on OpenBSD and FreeBSD. Currently supported (target)
7368configurations are:
7369
7370FreeBSD/amd64 x86_64-*-freebsd*
7371FreeBSD/i386 i386-*-freebsd*
7372OpenBSD/i386 i386-*-openbsd*
7373
7374Note that the new kernel threads libraries introduced in FreeBSD 5.x
7375are not yet supported.
7376
5260ca71
MS
7377* New support for Matsushita MN10300 w/sim added
7378(Work in progress). mn10300-elf.
7379
e84ecc99
AC
7380* REMOVED configurations and files
7381
7382VxWorks and the XDR protocol *-*-vxworks
9445aa30 7383Motorola MCORE mcore-*-*
9445aa30 7384National Semiconductor NS32000 ns32k-*-*
156a53ca 7385
31e35378
JB
7386* New "set print array-indexes" command
7387
7388After turning this setting "on", GDB prints the index of each element
7389when displaying arrays. The default is "off" to preserve the previous
7390behavior.
7391
e85e5c83
MK
7392* VAX floating point support
7393
7394GDB now supports the not-quite-ieee VAX F and D floating point formats.
7395
d91e9901
AS
7396* User-defined command support
7397
7398In addition to using $arg0..$arg9 for argument passing, it is now possible
7399to use $argc to determine now many arguments have been passed. See the
7400section on user-defined commands in the user manual for more information.
7401
f2cb65ca
MC
7402*** Changes in GDB 6.3:
7403
f47b1503
AS
7404* New command line option
7405
7406GDB now accepts -l followed by a number to set the timeout for remote
7407debugging.
7408
f2cb65ca
MC
7409* GDB works with GCC -feliminate-dwarf2-dups
7410
7411GDB now supports a more compact representation of DWARF-2 debug
7412information using DW_FORM_ref_addr references. These are produced
7413by GCC with the option -feliminate-dwarf2-dups and also by some
7414proprietary compilers. With GCC, you must use GCC 3.3.4 or later
7415to use -feliminate-dwarf2-dups.
860660cb 7416
d08c0230
AC
7417* Internationalization
7418
7419When supported by the host system, GDB will be built with
7420internationalization (libintl). The task of marking up the sources is
7421continued, we're looking forward to our first translation.
7422
117ea3cf
PH
7423* Ada
7424
994bc098
ES
7425Initial support for debugging programs compiled with the GNAT
7426implementation of the Ada programming language has been integrated
117ea3cf
PH
7427into GDB. In this release, support is limited to expression evaluation.
7428
d08c0230
AC
7429* New native configurations
7430
7431GNU/Linux/m32r m32r-*-linux-gnu
7432
7433* Remote 'p' packet
7434
7435GDB's remote protocol now includes support for the 'p' packet. This
7436packet is used to fetch individual registers from a remote inferior.
7437
7438* END-OF-LIFE registers[] compatibility module
7439
7440GDB's internal register infrastructure has been completely rewritten.
7441The new infrastructure making possible the implementation of key new
7442features including 32x64 (e.g., 64-bit amd64 GDB debugging a 32-bit
7443i386 application).
7444
09f2921c 7445GDB 6.3 will be the last release to include the registers[]
d08c0230
AC
7446compatibility module that allowed out-of-date configurations to
7447continue to work. This change directly impacts the following
7448configurations:
7449
7450hppa-*-hpux
7451ia64-*-aix
7452mips-*-irix*
7453*-*-lynx
7454mips-*-linux-gnu
7455sds protocol
7456xdr protocol
7457powerpc bdm protocol
7458
7459Unless there is activity to revive these configurations, they will be
7460made OBSOLETE in GDB 6.4, and REMOVED from GDB 6.5.
7461
7462* OBSOLETE configurations and files
7463
7464Configurations that have been declared obsolete in this release have
7465been commented out. Unless there is activity to revive these
7466configurations, the next release of GDB will have their sources
7467permanently REMOVED.
7468
7469h8300-*-*
7470mcore-*-*
7471mn10300-*-*
7472ns32k-*-*
7473sh64-*-*
7474v850-*-*
7475
ebb7c577
AC
7476*** Changes in GDB 6.2.1:
7477
7478* MIPS `break main; run' gave an heuristic-fence-post warning
7479
7480When attempting to run even a simple program, a warning about
7481heuristic-fence-post being hit would be reported. This problem has
7482been fixed.
7483
7484* MIPS IRIX 'long double' crashed GDB
7485
7486When examining a long double variable, GDB would get a segmentation
7487fault. The crash has been fixed (but GDB 6.2 cannot correctly examine
7488IRIX long double values).
7489
7490* VAX and "next"
7491
7492A bug in the VAX stack code was causing problems with the "next"
7493command. This problem has been fixed.
7494
860660cb 7495*** Changes in GDB 6.2:
faae5abe 7496
0dea2468
AC
7497* Fix for ``many threads''
7498
7499On GNU/Linux systems that use the NPTL threads library, a program
7500rapidly creating and deleting threads would confuse GDB leading to the
7501error message:
7502
7503 ptrace: No such process.
7504 thread_db_get_info: cannot get thread info: generic error
7505
7506This problem has been fixed.
7507
2c07db7a
AC
7508* "-async" and "-noasync" options removed.
7509
7510Support for the broken "-noasync" option has been removed (it caused
7511GDB to dump core).
7512
c23968a2
JB
7513* New ``start'' command.
7514
82f06518 7515This command runs the program until the beginning of the main procedure.
c23968a2 7516
71009278
MK
7517* New BSD Kernel Data Access Library (libkvm) interface
7518
7519Using ``target kvm'' it is now possible to debug kernel core dumps and
7520live kernel memory images on various FreeBSD, NetBSD and OpenBSD
7521platforms. Currently supported (native-only) configurations are:
7522
7523FreeBSD/amd64 x86_64-*-freebsd*
7524FreeBSD/i386 i?86-*-freebsd*
7525NetBSD/i386 i?86-*-netbsd*
7526NetBSD/m68k m68*-*-netbsd*
7527NetBSD/sparc sparc-*-netbsd*
7528OpenBSD/amd64 x86_64-*-openbsd*
7529OpenBSD/i386 i?86-*-openbsd*
7530OpenBSD/m68k m68*-openbsd*
7531OpenBSD/sparc sparc-*-openbsd*
7532
3c0b7db2
AC
7533* Signal trampoline code overhauled
7534
7535Many generic problems with GDB's signal handling code have been fixed.
7536These include: backtraces through non-contiguous stacks; recognition
7537of sa_sigaction signal trampolines; backtrace from a NULL pointer
7538call; backtrace through a signal trampoline; step into and out of
7539signal handlers; and single-stepping in the signal trampoline.
7540
73cc75f3
AC
7541Please note that kernel bugs are a limiting factor here. These
7542features have been shown to work on an s390 GNU/Linux system that
7543include a 2.6.8-rc1 kernel. Ref PR breakpoints/1702.
3c0b7db2 7544
7243600a
BF
7545* Cygwin support for DWARF 2 added.
7546
6f606e1c
MK
7547* New native configurations
7548
97dc871c 7549GNU/Linux/hppa hppa*-*-linux*
0e56aeaf 7550OpenBSD/hppa hppa*-*-openbsd*
bf2ca189
MK
7551OpenBSD/m68k m68*-*-openbsd*
7552OpenBSD/m88k m88*-*-openbsd*
d195bc9f 7553OpenBSD/powerpc powerpc-*-openbsd*
6f606e1c 7554NetBSD/vax vax-*-netbsd*
9f076e7a 7555OpenBSD/vax vax-*-openbsd*
6f606e1c 7556
a1b461bf
AC
7557* END-OF-LIFE frame compatibility module
7558
7559GDB's internal frame infrastructure has been completely rewritten.
7560The new infrastructure making it possible to support key new features
7561including DWARF 2 Call Frame Information. To aid in the task of
7562migrating old configurations to this new infrastructure, a
7563compatibility module, that allowed old configurations to continue to
7564work, was also included.
7565
7566GDB 6.2 will be the last release to include this frame compatibility
7567module. This change directly impacts the following configurations:
7568
7569h8300-*-*
7570mcore-*-*
7571mn10300-*-*
7572ns32k-*-*
7573sh64-*-*
7574v850-*-*
7575xstormy16-*-*
7576
7577Unless there is activity to revive these configurations, they will be
7578made OBSOLETE in GDB 6.3, and REMOVED from GDB 6.4.
7579
3c7012f5
AC
7580* REMOVED configurations and files
7581
7582Sun 3, running SunOS 3 m68*-*-sunos3*
7583Sun 3, running SunOS 4 m68*-*-sunos4*
7584Sun 2, running SunOS 3 m68000-*-sunos3*
7585Sun 2, running SunOS 4 m68000-*-sunos4*
7586Motorola 680x0 running LynxOS m68*-*-lynxos*
7587AT&T 3b1/Unix pc m68*-att-*
7588Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
7589decstation mips-dec-* mips-little-*
7590riscos mips-*-riscos* mips-*-sysv*
7591sonymips mips-sony-*
7592sysv mips*-*-sysv4* (IRIX 5/6 not included)
7593
e5fe55f7
AC
7594*** Changes in GDB 6.1.1:
7595
7596* TUI (Text-mode User Interface) built-in (also included in GDB 6.1)
7597
7598The TUI (Text-mode User Interface) is now built as part of a default
7599GDB configuration. It is enabled by either selecting the TUI with the
7600command line option "-i=tui" or by running the separate "gdbtui"
7601program. For more information on the TUI, see the manual "Debugging
7602with GDB".
7603
7604* Pending breakpoint support (also included in GDB 6.1)
7605
7606Support has been added to allow you to specify breakpoints in shared
7607libraries that have not yet been loaded. If a breakpoint location
7608cannot be found, and the "breakpoint pending" option is set to auto,
7609GDB queries you if you wish to make the breakpoint pending on a future
7610shared-library load. If and when GDB resolves the breakpoint symbol,
7611the pending breakpoint is removed as one or more regular breakpoints
7612are created.
7613
7614Pending breakpoints are very useful for GCJ Java debugging.
7615
7616* Fixed ISO-C build problems
7617
7618The files bfd/elf-bfd.h, gdb/dictionary.c and gdb/types.c contained
7619non ISO-C code that stopped them being built using a more strict ISO-C
7620compiler (e.g., IBM's C compiler).
7621
7622* Fixed build problem on IRIX 5
7623
7624Due to header problems with <sys/proc.h>, the file gdb/proc-api.c
7625wasn't able to compile compile on an IRIX 5 system.
7626
7627* Added execute permission to gdb/gdbserver/configure
7628
7629The shell script gdb/testsuite/gdb.stabs/configure lacked execute
7630permission. This bug would cause configure to fail on a number of
7631systems (Solaris, IRIX). Ref: server/519.
7632
7633* Fixed build problem on hpux2.0w-hp-hpux11.00 using the HP ANSI C compiler
7634
7635Older HPUX ANSI C compilers did not accept variable array sizes. somsolib.c
7636has been updated to use constant array sizes.
7637
7638* Fixed a panic in the DWARF Call Frame Info code on Solaris 2.7
7639
7640GCC 3.3.2, on Solaris 2.7, includes the DW_EH_PE_funcrel encoding in
7641its generated DWARF Call Frame Info. This encoding was causing GDB to
7642panic, that panic has been fixed. Ref: gdb/1628.
7643
7644* Fixed a problem when examining parameters in shared library code.
7645
7646When examining parameters in optimized shared library code generated
7647by a mainline GCC, GDB would incorrectly report ``Variable "..." is
7648not available''. GDB now correctly displays the variable's value.
7649
faae5abe 7650*** Changes in GDB 6.1:
f2c06f52 7651
9175c9a3
MC
7652* Removed --with-mmalloc
7653
7654Support for the mmalloc memory manager has been removed, as it
7655conflicted with the internal gdb byte cache.
7656
3cc87ec0
MK
7657* Changes in AMD64 configurations
7658
7659The AMD64 target now includes the %cs and %ss registers. As a result
7660the AMD64 remote protocol has changed; this affects the floating-point
7661and SSE registers. If you rely on those registers for your debugging,
7662you should upgrade gdbserver on the remote side.
7663
f0424ef6
MK
7664* Revised SPARC target
7665
7666The SPARC target has been completely revised, incorporating the
7667FreeBSD/sparc64 support that was added for GDB 6.0. As a result
03cebad2
MK
7668support for LynxOS and SunOS 4 has been dropped. Calling functions
7669from within GDB on operating systems with a non-executable stack
7670(Solaris, OpenBSD) now works.
f0424ef6 7671
59659be2
ILT
7672* New C++ demangler
7673
7674GDB has a new C++ demangler which does a better job on the mangled
7675names generated by current versions of g++. It also runs faster, so
7676with this and other changes gdb should now start faster on large C++
7677programs.
7678
9e08b29b
DJ
7679* DWARF 2 Location Expressions
7680
7681GDB support for location expressions has been extended to support function
7682arguments and frame bases. Older versions of GDB could crash when they
7683encountered these.
7684
8dfe8985
DC
7685* C++ nested types and namespaces
7686
7687GDB's support for nested types and namespaces in C++ has been
7688improved, especially if you use the DWARF 2 debugging format. (This
7689is the default for recent versions of GCC on most platforms.)
7690Specifically, if you have a class "Inner" defined within a class or
7691namespace "Outer", then GDB realizes that the class's name is
7692"Outer::Inner", not simply "Inner". This should greatly reduce the
7693frequency of complaints about not finding RTTI symbols. In addition,
7694if you are stopped at inside of a function defined within a namespace,
7695GDB modifies its name lookup accordingly.
7696
cced5e27
MK
7697* New native configurations
7698
7699NetBSD/amd64 x86_64-*-netbsd*
27d1e716 7700OpenBSD/amd64 x86_64-*-openbsd*
2031c21a 7701OpenBSD/alpha alpha*-*-openbsd*
f2cab569
MK
7702OpenBSD/sparc sparc-*-openbsd*
7703OpenBSD/sparc64 sparc64-*-openbsd*
cced5e27 7704
b4b4b794
KI
7705* New debugging protocols
7706
7707M32R with SDI protocol m32r-*-elf*
7708
7989c619
AC
7709* "set prompt-escape-char" command deleted.
7710
7711The command "set prompt-escape-char" has been deleted. This command,
82f06518 7712and its very obscure effect on GDB's prompt, was never documented,
7989c619
AC
7713tested, nor mentioned in the NEWS file.
7714
5994185b
AC
7715* OBSOLETE configurations and files
7716
7717Configurations that have been declared obsolete in this release have
7718been commented out. Unless there is activity to revive these
7719configurations, the next release of GDB will have their sources
7720permanently REMOVED.
7721
7722Sun 3, running SunOS 3 m68*-*-sunos3*
7723Sun 3, running SunOS 4 m68*-*-sunos4*
7724Sun 2, running SunOS 3 m68000-*-sunos3*
7725Sun 2, running SunOS 4 m68000-*-sunos4*
7726Motorola 680x0 running LynxOS m68*-*-lynxos*
7727AT&T 3b1/Unix pc m68*-att-*
7728Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
0748d941
AC
7729decstation mips-dec-* mips-little-*
7730riscos mips-*-riscos* mips-*-sysv*
7731sonymips mips-sony-*
7732sysv mips*-*-sysv4* (IRIX 5/6 not included)
5994185b 7733
0ddabb4c
AC
7734* REMOVED configurations and files
7735
7736SGI Irix-4.x mips-sgi-irix4 or iris4
7737SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris
4a8269c0
AC
7738Z8000 simulator z8k-zilog-none or z8ksim
7739Matsushita MN10200 w/simulator mn10200-*-*
7740H8/500 simulator h8500-hitachi-hms or h8500hms
7741HP/PA running BSD hppa*-*-bsd*
7742HP/PA running OSF/1 hppa*-*-osf*
7743HP/PA Pro target hppa*-*-pro*
7744PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
cf7c5c23 7745386BSD i[3456]86-*-bsd*
4a8269c0
AC
7746Sequent family i[3456]86-sequent-sysv4*
7747 i[3456]86-sequent-sysv*
7748 i[3456]86-sequent-bsd*
f0424ef6
MK
7749SPARC running LynxOS sparc-*-lynxos*
7750SPARC running SunOS 4 sparc-*-sunos4*
4a8269c0
AC
7751Tsqware Sparclet sparclet-*-*
7752Fujitsu SPARClite sparclite-fujitsu-none or sparclite
0ddabb4c 7753
c7f1390e
DJ
7754*** Changes in GDB 6.0:
7755
1fe43d45
AC
7756* Objective-C
7757
7758Support for debugging the Objective-C programming language has been
7759integrated into GDB.
7760
e6beb428
AC
7761* New backtrace mechanism (includes DWARF 2 Call Frame Information).
7762
7763DWARF 2's Call Frame Information makes available compiler generated
7764information that more exactly describes the program's run-time stack.
7765By using this information, GDB is able to provide more robust stack
7766backtraces.
7767
7768The i386, amd64 (nee, x86-64), Alpha, m68hc11, ia64, and m32r targets
7769have been updated to use a new backtrace mechanism which includes
7770DWARF 2 CFI support.
7771
7772* Hosted file I/O.
7773
7774GDB's remote protocol has been extended to include support for hosted
7775file I/O (where the remote target uses GDB's file system). See GDB's
7776remote protocol documentation for details.
7777
7778* All targets using the new architecture framework.
7779
7780All of GDB's targets have been updated to use the new internal
7781architecture framework. The way is now open for future GDB releases
7782to include cross-architecture native debugging support (i386 on amd64,
7783ppc32 on ppc64).
7784
7785* GNU/Linux's Thread Local Storage (TLS)
7786
7787GDB now includes support for for the GNU/Linux implementation of
7788per-thread variables.
7789
7790* GNU/Linux's Native POSIX Thread Library (NPTL)
7791
7792GDB's thread code has been updated to work with either the new
7793GNU/Linux NPTL thread library or the older "LinuxThreads" library.
7794
7795* Separate debug info.
7796
7797GDB, in conjunction with BINUTILS, now supports a mechanism for
7798automatically loading debug information from a separate file. Instead
7799of shipping full debug and non-debug versions of system libraries,
7800system integrators can now instead ship just the stripped libraries
7801and optional debug files.
7802
7803* DWARF 2 Location Expressions
7804
7805DWARF 2 Location Expressions allow the compiler to more completely
7806describe the location of variables (even in optimized code) to the
7807debugger.
7808
7809GDB now includes preliminary support for location expressions (support
7810for DW_OP_piece is still missing).
7811
7812* Java
7813
7814A number of long standing bugs that caused GDB to die while starting a
7815Java application have been fixed. GDB's Java support is now
1305119a 7816considered "usable".
e6beb428 7817
85f8f974
DJ
7818* GNU/Linux support for fork, vfork, and exec.
7819
7820The "catch fork", "catch exec", "catch vfork", and "set follow-fork-mode"
7821commands are now implemented for GNU/Linux. They require a 2.5.x or later
7822kernel.
7823
0fac0b41
DJ
7824* GDB supports logging output to a file
7825
7826There are two new commands, "set logging" and "show logging", which can be
7827used to capture GDB's output to a file.
f2c06f52 7828
6ad8ae5c
DJ
7829* The meaning of "detach" has changed for gdbserver
7830
7831The "detach" command will now resume the application, as documented. To
7832disconnect from gdbserver and leave it stopped, use the new "disconnect"
7833command.
7834
e286caf2 7835* d10v, m68hc11 `regs' command deprecated
5f601589
AC
7836
7837The `info registers' command has been updated so that it displays the
7838registers using a format identical to the old `regs' command.
7839
d28f9cdf
DJ
7840* Profiling support
7841
7842A new command, "maint set profile on/off", has been added. This command can
7843be used to enable or disable profiling while running GDB, to profile a
7844session or a set of commands. In addition there is a new configure switch,
7845"--enable-profiling", which will cause GDB to be compiled with profiling
7846data, for more informative profiling results.
7847
da0f9dcd
AC
7848* Default MI syntax changed to "mi2".
7849
7850The default MI (machine interface) syntax, enabled by the command line
7851option "-i=mi", has been changed to "mi2". The previous MI syntax,
b68767c1 7852"mi1", can be enabled by specifying the option "-i=mi1".
da0f9dcd
AC
7853
7854Support for the original "mi0" syntax (included in GDB 5.0) has been
7855removed.
7856
fb9b6b35
JJ
7857Fix for gdb/192: removed extraneous space when displaying frame level.
7858Fix for gdb/672: update changelist is now output in mi list format.
7859Fix for gdb/702: a -var-assign that updates the value now shows up
7860 in a subsequent -var-update.
7861
954a4db8
MK
7862* New native configurations.
7863
7864FreeBSD/amd64 x86_64-*-freebsd*
7865
6760f9e6
JB
7866* Multi-arched targets.
7867
b4263afa 7868HP/PA HPUX11 hppa*-*-hpux*
85a453d5 7869Renesas M32R/D w/simulator m32r-*-elf*
6760f9e6 7870
1b831c93
AC
7871* OBSOLETE configurations and files
7872
7873Configurations that have been declared obsolete in this release have
7874been commented out. Unless there is activity to revive these
7875configurations, the next release of GDB will have their sources
7876permanently REMOVED.
7877
8b0e5691 7878Z8000 simulator z8k-zilog-none or z8ksim
67f16606 7879Matsushita MN10200 w/simulator mn10200-*-*
fd2299bd 7880H8/500 simulator h8500-hitachi-hms or h8500hms
56056df7
AC
7881HP/PA running BSD hppa*-*-bsd*
7882HP/PA running OSF/1 hppa*-*-osf*
7883HP/PA Pro target hppa*-*-pro*
78c43945 7884PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
2fbce691
AC
7885Sequent family i[3456]86-sequent-sysv4*
7886 i[3456]86-sequent-sysv*
7887 i[3456]86-sequent-bsd*
f81824a9
AC
7888Tsqware Sparclet sparclet-*-*
7889Fujitsu SPARClite sparclite-fujitsu-none or sparclite
fd2299bd 7890
5835abe7
NC
7891* REMOVED configurations and files
7892
994bc098 7893V850EA ISA
1b831c93
AC
7894Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
7895IBM AIX PS/2 i[3456]86-*-aix
7896i386 running Mach 3.0 i[3456]86-*-mach3*
7897i386 running Mach i[3456]86-*-mach*
7898i386 running OSF/1 i[3456]86-*osf1mk*
7899HP/Apollo 68k Family m68*-apollo*-sysv*,
7900 m68*-apollo*-bsd*,
7901 m68*-hp-bsd*, m68*-hp-hpux*
7902Argonaut Risc Chip (ARC) arc-*-*
7903Mitsubishi D30V d30v-*-*
7904Fujitsu FR30 fr30-*-elf*
7905OS/9000 i[34]86-*-os9k
7906I960 with MON960 i960-*-coff
5835abe7 7907
a094c6fb
AC
7908* MIPS $fp behavior changed
7909
7910The convenience variable $fp, for the MIPS, now consistently returns
7911the address of the current frame's base. Previously, depending on the
7912context, $fp could refer to either $sp or the current frame's base
7913address. See ``8.10 Registers'' in the manual ``Debugging with GDB:
7914The GNU Source-Level Debugger''.
7915
299ffc64 7916*** Changes in GDB 5.3:
37057839 7917
46248966
AC
7918* GNU/Linux shared library multi-threaded performance improved.
7919
7920When debugging a multi-threaded application on GNU/Linux, GDB now uses
7921`/proc', in preference to `ptrace' for memory reads. This may result
7922in an improvement in the start-up time of multi-threaded, shared
7923library applications when run under GDB. One GDB user writes: ``loads
7924shared libs like mad''.
7925
b9d14705 7926* ``gdbserver'' now supports multi-threaded applications on some targets
6da02953 7927
994bc098 7928Support for debugging multi-threaded applications which use
b9d14705
DJ
7929the GNU/Linux LinuxThreads package has been added for
7930arm*-*-linux*-gnu*, i[3456]86-*-linux*-gnu*, mips*-*-linux*-gnu*,
7931powerpc*-*-linux*-gnu*, and sh*-*-linux*-gnu*.
6da02953 7932
e0e9281e
JB
7933* GDB now supports C/C++ preprocessor macros.
7934
7935GDB now expands preprocessor macro invocations in C/C++ expressions,
7936and provides various commands for showing macro definitions and how
7937they expand.
7938
dd73b9bb
AC
7939The new command `macro expand EXPRESSION' expands any macro
7940invocations in expression, and shows the result.
7941
7942The new command `show macro MACRO-NAME' shows the definition of the
7943macro named MACRO-NAME, and where it was defined.
7944
e0e9281e
JB
7945Most compilers don't include information about macros in the debugging
7946information by default. In GCC 3.1, for example, you need to compile
7947your program with the options `-gdwarf-2 -g3'. If the macro
7948information is present in the executable, GDB will read it.
7949
2250ee0c
CV
7950* Multi-arched targets.
7951
6e3ba3b8
JT
7952DEC Alpha (partial) alpha*-*-*
7953DEC VAX (partial) vax-*-*
2250ee0c 7954NEC V850 v850-*-*
6e3ba3b8 7955National Semiconductor NS32000 (partial) ns32k-*-*
a1789893
GS
7956Motorola 68000 (partial) m68k-*-*
7957Motorola MCORE mcore-*-*
2250ee0c 7958
cd9bfe15 7959* New targets.
e33ce519 7960
456f8b9d
DB
7961Fujitsu FRV architecture added by Red Hat frv*-*-*
7962
e33ce519 7963
da8ca43d
JT
7964* New native configurations
7965
7966Alpha NetBSD alpha*-*-netbsd*
029923d4 7967SH NetBSD sh*-*-netbsdelf*
45888261 7968MIPS NetBSD mips*-*-netbsd*
9ce5c36a 7969UltraSPARC NetBSD sparc64-*-netbsd*
da8ca43d 7970
cd9bfe15
AC
7971* OBSOLETE configurations and files
7972
7973Configurations that have been declared obsolete in this release have
7974been commented out. Unless there is activity to revive these
7975configurations, the next release of GDB will have their sources
7976permanently REMOVED.
7977
92eb23c5 7978Mitsubishi D30V d30v-*-*
a99a9e1b 7979OS/9000 i[34]86-*-os9k
1c7cc583 7980IBM AIX PS/2 i[3456]86-*-aix
7a3085c1 7981Fujitsu FR30 fr30-*-elf*
7fb623f7 7982Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
eb4c54a2 7983Argonaut Risc Chip (ARC) arc-*-*
d8ee244c
MK
7984i386 running Mach 3.0 i[3456]86-*-mach3*
7985i386 running Mach i[3456]86-*-mach*
7986i386 running OSF/1 i[3456]86-*osf1mk*
822e978b
AC
7987HP/Apollo 68k Family m68*-apollo*-sysv*,
7988 m68*-apollo*-bsd*,
7989 m68*-hp-bsd*, m68*-hp-hpux*
4d210288 7990I960 with MON960 i960-*-coff
92eb23c5 7991
db034ac5
AC
7992* OBSOLETE languages
7993
7994CHILL, a Pascal like language used by telecommunications companies.
7995
cd9bfe15
AC
7996* REMOVED configurations and files
7997
7998AMD 29k family via UDI a29k-amd-udi, udi29k
7999A29K VxWorks a29k-*-vxworks
8000AMD 29000 embedded, using EBMON a29k-none-none
8001AMD 29000 embedded with COFF a29k-none-coff
8002AMD 29000 embedded with a.out a29k-none-aout
8003
8004testsuite/gdb.hp/gdb.threads-hp/ directory
8005
20f01a46
DH
8006* New command "set max-user-call-depth <nnn>"
8007
8008This command allows the user to limit the call depth of user-defined
8009commands. The default is 1024.
8010
a5941fbf
MK
8011* Changes in FreeBSD/i386 native debugging.
8012
8013Support for the "generate-core-file" has been added.
8014
89743e04
MS
8015* New commands "dump", "append", and "restore".
8016
8017These commands allow data to be copied from target memory
8018to a bfd-format or binary file (dump and append), and back
8019from a file into memory (restore).
37057839 8020
9fb14e79
JB
8021* Improved "next/step" support on multi-processor Alpha Tru64.
8022
8023The previous single-step mechanism could cause unpredictable problems,
8024including the random appearance of SIGSEGV or SIGTRAP signals. The use
8025of a software single-step mechanism prevents this.
8026
2037aebb
AC
8027*** Changes in GDB 5.2.1:
8028
8029* New targets.
8030
8031Atmel AVR avr*-*-*
8032
8033* Bug fixes
8034
8035gdb/182: gdb/323: gdb/237: On alpha, gdb was reporting:
8036mdebugread.c:2443: gdb-internal-error: sect_index_data not initialized
8037Fix, by Joel Brobecker imported from mainline.
8038
8039gdb/439: gdb/291: On some ELF object files, gdb was reporting:
8040dwarf2read.c:1072: gdb-internal-error: sect_index_text not initialize
8041Fix, by Fred Fish, imported from mainline.
8042
994bc098 8043Dwarf2 .debug_frame & .eh_frame handler improved in many ways.
2037aebb
AC
8044Surprisingly enough, it works now.
8045By Michal Ludvig, imported from mainline.
8046
994bc098 8047i386 hardware watchpoint support:
2037aebb
AC
8048avoid misses on second run for some targets.
8049By Pierre Muller, imported from mainline.
8050
37057839 8051*** Changes in GDB 5.2:
eb7cedd9 8052
1a703748
MS
8053* New command "set trust-readonly-sections on[off]".
8054
8055This command is a hint that tells gdb that read-only sections
8056really are read-only (ie. that their contents will not change).
8057In this mode, gdb will go to the object file rather than the
8058target to read memory from read-only sections (such as ".text").
8059This can be a significant performance improvement on some
8060(notably embedded) targets.
8061
cefd4ef5
MS
8062* New command "generate-core-file" (or "gcore").
8063
55241689
AC
8064This new gdb command allows the user to drop a core file of the child
8065process state at any time. So far it's been implemented only for
8066GNU/Linux and Solaris, but should be relatively easily ported to other
8067hosts. Argument is core file name (defaults to core.<pid>).
cefd4ef5 8068
352ed7b4
MS
8069* New command line option
8070
994bc098 8071GDB now accepts --pid or -p followed by a process id.
352ed7b4
MS
8072
8073* Change in command line behavior -- corefiles vs. process ids.
8074
994bc098 8075There is a subtle behavior in the way in which GDB handles
352ed7b4
MS
8076command line arguments. The first non-flag argument is always
8077a program to debug, but the second non-flag argument may either
8078be a corefile or a process id. Previously, GDB would attempt to
8079open the second argument as a corefile, and if that failed, would
8080issue a superfluous error message and then attempt to attach it as
994bc098
ES
8081a process. Now, if the second argument begins with a non-digit,
8082it will be treated as a corefile. If it begins with a digit,
352ed7b4
MS
8083GDB will attempt to attach it as a process, and if no such process
8084is found, will then attempt to open it as a corefile.
8085
fe419ffc
RE
8086* Changes in ARM configurations.
8087
8088Multi-arch support is enabled for all ARM configurations. The ARM/NetBSD
8089configuration is fully multi-arch.
8090
eb7cedd9
MK
8091* New native configurations
8092
fe419ffc 8093ARM NetBSD arm*-*-netbsd*
eb7cedd9 8094x86 OpenBSD i[3456]86-*-openbsd*
55241689 8095AMD x86-64 running GNU/Linux x86_64-*-linux-*
768f0842 8096Sparc64 running FreeBSD sparc64-*-freebsd*
eb7cedd9 8097
c9f63e6b
CV
8098* New targets
8099
8100Sanyo XStormy16 xstormy16-elf
8101
9b4ff276
AC
8102* OBSOLETE configurations and files
8103
8104Configurations that have been declared obsolete in this release have
8105been commented out. Unless there is activity to revive these
8106configurations, the next release of GDB will have their sources
8107permanently REMOVED.
8108
8109AMD 29k family via UDI a29k-amd-udi, udi29k
8110A29K VxWorks a29k-*-vxworks
8111AMD 29000 embedded, using EBMON a29k-none-none
8112AMD 29000 embedded with COFF a29k-none-coff
8113AMD 29000 embedded with a.out a29k-none-aout
8114
b4ceaee6 8115testsuite/gdb.hp/gdb.threads-hp/ directory
9b4ff276 8116
e2caac18
AC
8117* REMOVED configurations and files
8118
8119TI TMS320C80 tic80-*-*
7bc65f05 8120WDC 65816 w65-*-*
7768dd6c
AC
8121PowerPC Solaris powerpcle-*-solaris*
8122PowerPC Windows NT powerpcle-*-cygwin32
8123PowerPC Netware powerpc-*-netware*
5e734e1f 8124Harris/CXUX m88k m88*-harris-cxux*
1406caf7
AC
8125Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-*
8126 ns32k-utek-sysv* ns32k-utek-*
7e24f0b1 8127SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
9b567150 8128Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
3680c638
AC
8129Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
8130ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
a752853e 8131Apple Macintosh (MPW) host and target N/A host, powerpc-*-macos*
e2caac18 8132
c2a727fa
TT
8133* Changes to command line processing
8134
8135The new `--args' feature can be used to specify command-line arguments
8136for the inferior from gdb's command line.
8137
467d8519
TT
8138* Changes to key bindings
8139
8140There is a new `operate-and-get-next' function bound to `C-o'.
8141
994bc098 8142*** Changes in GDB 5.1.1
7072a954
AC
8143
8144Fix compile problem on DJGPP.
8145
8146Fix a problem with floating-point registers on the i386 being
8147corrupted.
8148
8149Fix to stop GDB crashing on .debug_str debug info.
8150
8151Numerous documentation fixes.
8152
8153Numerous testsuite fixes.
8154
34f47bc4 8155*** Changes in GDB 5.1:
139760b7
MK
8156
8157* New native configurations
8158
8159Alpha FreeBSD alpha*-*-freebsd*
8160x86 FreeBSD 3.x and 4.x i[3456]86*-freebsd[34]*
55241689 8161MIPS GNU/Linux mips*-*-linux*
e23194cb
EZ
8162MIPS SGI Irix 6.x mips*-sgi-irix6*
8163ia64 AIX ia64-*-aix*
55241689 8164s390 and s390x GNU/Linux {s390,s390x}-*-linux*
139760b7 8165
bf64bfd6
AC
8166* New targets
8167
def90278 8168Motorola 68HC11 and 68HC12 m68hc11-elf
24be5c34 8169CRIS cris-axis
55241689 8170UltraSparc running GNU/Linux sparc64-*-linux*
def90278 8171
17e78a56 8172* OBSOLETE configurations and files
bf64bfd6 8173
994bc098 8174x86 FreeBSD before 2.2 i[3456]86*-freebsd{1,2.[01]}*,
9b9c068d 8175Harris/CXUX m88k m88*-harris-cxux*
bb19ff3b
AC
8176Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-*
8177 ns32k-utek-sysv* ns32k-utek-*
76f4ea53
AC
8178TI TMS320C80 tic80-*-*
8179WDC 65816 w65-*-*
4a1968f4 8180Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
1b2b2c16
AC
8181PowerPC Solaris powerpcle-*-solaris*
8182PowerPC Windows NT powerpcle-*-cygwin32
8183PowerPC Netware powerpc-*-netware*
24f89b68 8184SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
514e603d
AC
8185Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
8186ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
d036b4d9 8187Apple Macintosh (MPW) host N/A
bf64bfd6 8188
17e78a56
AC
8189stuff.c (Program to stuff files into a specially prepared space in kdb)
8190kdb-start.c (Main loop for the standalone kernel debugger)
8191
7fcca85b
AC
8192Configurations that have been declared obsolete in this release have
8193been commented out. Unless there is activity to revive these
8194configurations, the next release of GDB will have their sources
8195permanently REMOVED.
8196
a196c81c 8197* REMOVED configurations and files
7fcca85b
AC
8198
8199Altos 3068 m68*-altos-*
8200Convex c1-*-*, c2-*-*
8201Pyramid pyramid-*-*
8202ARM RISCix arm-*-* (as host)
8203Tahoe tahoe-*-*
a196c81c 8204ser-ocd.c *-*-*
bf64bfd6 8205
6d6b80e5 8206* GDB has been converted to ISO C.
e23194cb 8207
6d6b80e5 8208GDB's source code has been converted to ISO C. In particular, the
e23194cb
EZ
8209sources are fully protoized, and rely on standard headers being
8210present.
8211
bf64bfd6
AC
8212* Other news:
8213
e23194cb
EZ
8214* "info symbol" works on platforms which use COFF, ECOFF, XCOFF, and NLM.
8215
8216* The MI enabled by default.
8217
8218The new machine oriented interface (MI) introduced in GDB 5.0 has been
8219revised and enabled by default. Packages which use GDB as a debugging
8220engine behind a UI or another front end are encouraged to switch to
8221using the GDB/MI interface, instead of the old annotations interface
8222which is now deprecated.
8223
8224* Support for debugging Pascal programs.
8225
8226GDB now includes support for debugging Pascal programs. The following
8227main features are supported:
8228
8229 - Pascal-specific data types such as sets;
8230
8231 - automatic recognition of Pascal sources based on file-name
8232 extension;
8233
8234 - Pascal-style display of data types, variables, and functions;
8235
8236 - a Pascal expression parser.
8237
8238However, some important features are not yet supported.
8239
8240 - Pascal string operations are not supported at all;
8241
8242 - there are some problems with boolean types;
8243
8244 - Pascal type hexadecimal constants are not supported
8245 because they conflict with the internal variables format;
8246
8247 - support for Pascal objects and classes is not full yet;
8248
8249 - unlike Pascal, GDB is case-sensitive for symbol names.
8250
8251* Changes in completion.
8252
8253Commands such as `shell', `run' and `set args', which pass arguments
8254to inferior programs, now complete on file names, similar to what
8255users expect at the shell prompt.
8256
8257Commands which accept locations, such as `disassemble', `print',
8258`breakpoint', `until', etc. now complete on filenames as well as
8259program symbols. Thus, if you type "break foob TAB", and the source
8260files linked into the programs include `foobar.c', that file name will
8261be one of the candidates for completion. However, file names are not
8262considered for completion after you typed a colon that delimits a file
8263name from a name of a function in that file, as in "break foo.c:bar".
8264
8265`set demangle-style' completes on available demangling styles.
8266
8267* New platform-independent commands:
8268
8269It is now possible to define a post-hook for a command as well as a
8270hook that runs before the command. For more details, see the
8271documentation of `hookpost' in the GDB manual.
8272
8273* Changes in GNU/Linux native debugging.
8274
d7275149
MK
8275Support for debugging multi-threaded programs has been completely
8276revised for all platforms except m68k and sparc. You can now debug as
8277many threads as your system allows you to have.
8278
e23194cb
EZ
8279Attach/detach is supported for multi-threaded programs.
8280
d7275149
MK
8281Support for SSE registers was added for x86. This doesn't work for
8282multi-threaded programs though.
e23194cb
EZ
8283
8284* Changes in MIPS configurations.
bf64bfd6
AC
8285
8286Multi-arch support is enabled for all MIPS configurations.
8287
e23194cb
EZ
8288GDB can now be built as native debugger on SGI Irix 6.x systems for
8289debugging n32 executables. (Debugging 64-bit executables is not yet
8290supported.)
8291
8292* Unified support for hardware watchpoints in all x86 configurations.
8293
8294Most (if not all) native x86 configurations support hardware-assisted
8295breakpoints and watchpoints in a unified manner. This support
8296implements debug register sharing between watchpoints, which allows to
8297put a virtually infinite number of watchpoints on the same address,
8298and also supports watching regions up to 16 bytes with several debug
8299registers.
8300
8301The new maintenance command `maintenance show-debug-regs' toggles
8302debugging print-outs in functions that insert, remove, and test
8303watchpoints and hardware breakpoints.
8304
8305* Changes in the DJGPP native configuration.
8306
8307New command ``info dos sysinfo'' displays assorted information about
8308the CPU, OS, memory, and DPMI server.
8309
8310New commands ``info dos gdt'', ``info dos ldt'', and ``info dos idt''
8311display information about segment descriptors stored in GDT, LDT, and
8312IDT.
8313
8314New commands ``info dos pde'' and ``info dos pte'' display entries
8315from Page Directory and Page Tables (for now works with CWSDPMI only).
8316New command ``info dos address-pte'' displays the Page Table entry for
8317a given linear address.
8318
8319GDB can now pass command lines longer than 126 characters to the
8320program being debugged (requires an update to the libdbg.a library
8321which is part of the DJGPP development kit).
8322
8323DWARF2 debug info is now supported.
8324
6c56c069
EZ
8325It is now possible to `step' and `next' through calls to `longjmp'.
8326
e23194cb
EZ
8327* Changes in documentation.
8328
8329All GDB documentation was converted to GFDL, the GNU Free
8330Documentation License.
8331
8332Tracepoints-related commands are now fully documented in the GDB
8333manual.
8334
8335TUI, the Text-mode User Interface, is now documented in the manual.
8336
8337Tracepoints-related commands are now fully documented in the GDB
8338manual.
8339
8340The "GDB Internals" manual now has an index. It also includes
8341documentation of `ui_out' functions, GDB coding standards, x86
8342hardware watchpoints, and memory region attributes.
8343
5d6640b1
AC
8344* GDB's version number moved to ``version.in''
8345
8346The Makefile variable VERSION has been replaced by the file
8347``version.in''. People creating GDB distributions should update the
8348contents of this file.
8349
1a1d8446
AC
8350* gdba.el deleted
8351
8352GUD support is now a standard part of the EMACS distribution.
139760b7 8353
9debab2f 8354*** Changes in GDB 5.0:
7a292a7a 8355
c63ce875
EZ
8356* Improved support for debugging FP programs on x86 targets
8357
8358Unified and much-improved support for debugging floating-point
8359programs on all x86 targets. In particular, ``info float'' now
8360displays the FP registers in the same format on all x86 targets, with
8361greater level of detail.
8362
8363* Improvements and bugfixes in hardware-assisted watchpoints
8364
8365It is now possible to watch array elements, struct members, and
8366bitfields with hardware-assisted watchpoints. Data-read watchpoints
8367on x86 targets no longer erroneously trigger when the address is
8368written.
8369
8370* Improvements in the native DJGPP version of GDB
8371
8372The distribution now includes all the scripts and auxiliary files
8373necessary to build the native DJGPP version on MS-DOS/MS-Windows
8374machines ``out of the box''.
8375
8376The DJGPP version can now debug programs that use signals. It is
8377possible to catch signals that happened in the debuggee, deliver
8378signals to it, interrupt it with Ctrl-C, etc. (Previously, a signal
8379would kill the program being debugged.) Programs that hook hardware
8380interrupts (keyboard, timer, etc.) can also be debugged.
8381
8382It is now possible to debug DJGPP programs that redirect their
8383standard handles or switch them to raw (as opposed to cooked) mode, or
8384even close them. The command ``run < foo > bar'' works as expected,
8385and ``info terminal'' reports useful information about the debuggee's
8386terminal, including raw/cooked mode, redirection, etc.
8387
8388The DJGPP version now uses termios functions for console I/O, which
8389enables debugging graphics programs. Interrupting GDB with Ctrl-C
8390also works.
8391
8392DOS-style file names with drive letters are now fully supported by
8393GDB.
8394
8395It is now possible to debug DJGPP programs that switch their working
8396directory. It is also possible to rerun the debuggee any number of
8397times without restarting GDB; thus, you can use the same setup,
8398breakpoints, etc. for many debugging sessions.
8399
ed9a39eb
JM
8400* New native configurations
8401
8402ARM GNU/Linux arm*-*-linux*
afc05dd4 8403PowerPC GNU/Linux powerpc-*-linux*
ed9a39eb 8404
7a292a7a
SS
8405* New targets
8406
96baa820 8407Motorola MCore mcore-*-*
adf40b2e
JM
8408x86 VxWorks i[3456]86-*-vxworks*
8409PowerPC VxWorks powerpc-*-vxworks*
7a292a7a
SS
8410TI TMS320C80 tic80-*-*
8411
085dd6e6
JM
8412* OBSOLETE configurations
8413
8414Altos 3068 m68*-altos-*
8415Convex c1-*-*, c2-*-*
9846de1b 8416Pyramid pyramid-*-*
ed9a39eb 8417ARM RISCix arm-*-* (as host)
104c1213 8418Tahoe tahoe-*-*
7a292a7a 8419
9debab2f
AC
8420Configurations that have been declared obsolete will be commented out,
8421but the code will be left in place. If there is no activity to revive
8422these configurations before the next release of GDB, the sources will
8423be permanently REMOVED.
8424
5330533d
SS
8425* Gould support removed
8426
8427Support for the Gould PowerNode and NP1 has been removed.
8428
bc9e5bbf
AC
8429* New features for SVR4
8430
8431On SVR4 native platforms (such as Solaris), if you attach to a process
8432without first loading a symbol file, GDB will now attempt to locate and
8433load symbols from the running process's executable file.
8434
8435* Many C++ enhancements
8436
8437C++ support has been greatly improved. Overload resolution now works properly
8438in almost all cases. RTTI support is on the way.
8439
adf40b2e
JM
8440* Remote targets can connect to a sub-program
8441
8442A popen(3) style serial-device has been added. This device starts a
8443sub-process (such as a stand-alone simulator) and then communicates
8444with that. The sub-program to run is specified using the syntax
8445``|<program> <args>'' vis:
8446
8447 (gdb) set remotedebug 1
8448 (gdb) target extended-remote |mn10300-elf-sim program-args
8449
43e526b9
JM
8450* MIPS 64 remote protocol
8451
8452A long standing bug in the mips64 remote protocol where by GDB
8f6606b6 8453expected certain 32 bit registers (ex SR) to be transferred as 32
43e526b9
JM
8454instead of 64 bits has been fixed.
8455
8456The command ``set remote-mips64-transfers-32bit-regs on'' has been
8457added to provide backward compatibility with older versions of GDB.
8458
96baa820
JM
8459* ``set remotebinarydownload'' replaced by ``set remote X-packet''
8460
8461The command ``set remotebinarydownload'' command has been replaced by
8462``set remote X-packet''. Other commands in ``set remote'' family
8463include ``set remote P-packet''.
8464
11cf8741
JM
8465* Breakpoint commands accept ranges.
8466
8467The breakpoint commands ``enable'', ``disable'', and ``delete'' now
8468accept a range of breakpoints, e.g. ``5-7''. The tracepoint command
8469``tracepoint passcount'' also accepts a range of tracepoints.
8470
7876dd43
DB
8471* ``apropos'' command added.
8472
8473The ``apropos'' command searches through command names and
8474documentation strings, printing out matches, making it much easier to
8475try to find a command that does what you are looking for.
8476
bc9e5bbf
AC
8477* New MI interface
8478
8479A new machine oriented interface (MI) has been added to GDB. This
8480interface is designed for debug environments running GDB as a separate
7162c0ca
EZ
8481process. This is part of the long term libGDB project. See the
8482"GDB/MI" chapter of the GDB manual for further information. It can be
8483enabled by configuring with:
bc9e5bbf
AC
8484
8485 .../configure --enable-gdbmi
8486
c906108c
SS
8487*** Changes in GDB-4.18:
8488
8489* New native configurations
8490
8491HP-UX 10.20 hppa*-*-hpux10.20
8492HP-UX 11.x hppa*-*-hpux11.0*
55241689 8493M68K GNU/Linux m68*-*-linux*
c906108c
SS
8494
8495* New targets
8496
8497Fujitsu FR30 fr30-*-elf*
8498Intel StrongARM strongarm-*-*
8499Mitsubishi D30V d30v-*-*
8500
8501* OBSOLETE configurations
8502
8503Gould PowerNode, NP1 np1-*-*, pn-*-*
8504
8505Configurations that have been declared obsolete will be commented out,
8506but the code will be left in place. If there is no activity to revive
8507these configurations before the next release of GDB, the sources will
8508be permanently REMOVED.
8509
8510* ANSI/ISO C
8511
8512As a compatibility experiment, GDB's source files buildsym.h and
8513buildsym.c have been converted to pure standard C, no longer
8514containing any K&R compatibility code. We believe that all systems in
8515use today either come with a standard C compiler, or have a GCC port
8516available. If this is not true, please report the affected
8517configuration to bug-gdb@gnu.org immediately. See the README file for
8518information about getting a standard C compiler if you don't have one
8519already.
8520
8521* Readline 2.2
8522
8523GDB now uses readline 2.2.
8524
8525* set extension-language
8526
8527You can now control the mapping between filename extensions and source
8528languages by using the `set extension-language' command. For instance,
8529you can ask GDB to treat .c files as C++ by saying
8530 set extension-language .c c++
8531The command `info extensions' lists all of the recognized extensions
8532and their associated languages.
8533
8534* Setting processor type for PowerPC and RS/6000
8535
8536When GDB is configured for a powerpc*-*-* or an rs6000*-*-* target,
8537you can use the `set processor' command to specify what variant of the
8538PowerPC family you are debugging. The command
8539
8540 set processor NAME
8541
8542sets the PowerPC/RS6000 variant to NAME. GDB knows about the
8543following PowerPC and RS6000 variants:
8544
8545 ppc-uisa PowerPC UISA - a PPC processor as viewed by user-level code
8546 rs6000 IBM RS6000 ("POWER") architecture, user-level view
8547 403 IBM PowerPC 403
8548 403GC IBM PowerPC 403GC
8549 505 Motorola PowerPC 505
8550 860 Motorola PowerPC 860 or 850
8551 601 Motorola PowerPC 601
8552 602 Motorola PowerPC 602
8553 603 Motorola/IBM PowerPC 603 or 603e
8554 604 Motorola PowerPC 604 or 604e
8555 750 Motorola/IBM PowerPC 750 or 750
8556
8557At the moment, this command just tells GDB what to name the
8558special-purpose processor registers. Since almost all the affected
8559registers are inaccessible to user-level programs, this command is
8560only useful for remote debugging in its present form.
8561
8562* HP-UX support
8563
8564Thanks to a major code donation from Hewlett-Packard, GDB now has much
8565more extensive support for HP-UX. Added features include shared
8566library support, kernel threads and hardware watchpoints for 11.00,
8567support for HP's ANSI C and C++ compilers, and a compatibility mode
8568for xdb and dbx commands.
8569
8570* Catchpoints
8571
8572HP's donation includes the new concept of catchpoints, which is a
8573generalization of the old catch command. On HP-UX, it is now possible
8574to catch exec, fork, and vfork, as well as library loading.
8575
8576This means that the existing catch command has changed; its first
8577argument now specifies the type of catch to be set up. See the
8578output of "help catch" for a list of catchpoint types.
8579
8580* Debugging across forks
8581
8582On HP-UX, you can choose which process to debug when a fork() happens
8583in the inferior.
8584
8585* TUI
8586
8587HP has donated a curses-based terminal user interface (TUI). To get
8588it, build with --enable-tui. Although this can be enabled for any
8589configuration, at present it only works for native HP debugging.
8590
8591* GDB remote protocol additions
8592
8593A new protocol packet 'X' that writes binary data is now available.
8594Default behavior is to try 'X', then drop back to 'M' if the stub
8595fails to respond. The settable variable `remotebinarydownload'
8596allows explicit control over the use of 'X'.
8597
8598For 64-bit targets, the memory packets ('M' and 'm') can now contain a
8599full 64-bit address. The command
8600
8601 set remoteaddresssize 32
8602
ac51afb5 8603can be used to revert to the old behavior. For existing remote stubs
c906108c
SS
8604the change should not be noticed, as the additional address information
8605will be discarded.
8606
8607In order to assist in debugging stubs, you may use the maintenance
8608command `packet' to send any text string to the stub. For instance,
8609
8610 maint packet heythere
8611
8612sends the packet "$heythere#<checksum>". Note that it is very easy to
8613disrupt a debugging session by sending the wrong packet at the wrong
8614time.
8615
8616The compare-sections command allows you to compare section data on the
8617target to what is in the executable file without uploading or
8618downloading, by comparing CRC checksums.
8619
8620* Tracing can collect general expressions
8621
8622You may now collect general expressions at tracepoints. This requires
8623further additions to the target-side stub; see tracepoint.c and
8624doc/agentexpr.texi for further details.
8625
8626* mask-address variable for Mips
8627
8628For Mips targets, you may control the zeroing of the upper 32 bits of
8629a 64-bit address by entering `set mask-address on'. This is mainly
8630of interest to users of embedded R4xxx and R5xxx processors.
8631
8632* Higher serial baud rates
8633
8634GDB's serial code now allows you to specify baud rates 57600, 115200,
8635230400, and 460800 baud. (Note that your host system may not be able
8636to achieve all of these rates.)
8637
8638* i960 simulator
8639
8640The i960 configuration now includes an initial implementation of a
8641builtin simulator, contributed by Jim Wilson.
8642
8643
8644*** Changes in GDB-4.17:
8645
8646* New native configurations
8647
8648Alpha GNU/Linux alpha*-*-linux*
8649Unixware 2.x i[3456]86-unixware2*
8650Irix 6.x mips*-sgi-irix6*
8651PowerPC GNU/Linux powerpc-*-linux*
8652PowerPC Solaris powerpcle-*-solaris*
8653Sparc GNU/Linux sparc-*-linux*
8654Motorola sysV68 R3V7.1 m68k-motorola-sysv
8655
8656* New targets
8657
8658Argonaut Risc Chip (ARC) arc-*-*
8659Hitachi H8/300S h8300*-*-*
8660Matsushita MN10200 w/simulator mn10200-*-*
8661Matsushita MN10300 w/simulator mn10300-*-*
8662MIPS NEC VR4100 mips64*vr4100*{,el}-*-elf*
8663MIPS NEC VR5000 mips64*vr5000*{,el}-*-elf*
8664MIPS Toshiba TX39 mips64*tx39*{,el}-*-elf*
8665Mitsubishi D10V w/simulator d10v-*-*
8666Mitsubishi M32R/D w/simulator m32r-*-elf*
8667Tsqware Sparclet sparclet-*-*
8668NEC V850 w/simulator v850-*-*
8669
8670* New debugging protocols
8671
8672ARM with RDI protocol arm*-*-*
8673M68K with dBUG monitor m68*-*-{aout,coff,elf}
8674DDB and LSI variants of PMON protocol mips*-*-*
8675PowerPC with DINK32 monitor powerpc{,le}-*-eabi
8676PowerPC with SDS protocol powerpc{,le}-*-eabi
8677Macraigor OCD (Wiggler) devices powerpc{,le}-*-eabi
8678
8679* DWARF 2
8680
8681All configurations can now understand and use the DWARF 2 debugging
8682format. The choice is automatic, if the symbol file contains DWARF 2
8683information.
8684
8685* Java frontend
8686
8687GDB now includes basic Java language support. This support is
8688only useful with Java compilers that produce native machine code.
8689
8690* solib-absolute-prefix and solib-search-path
8691
8692For SunOS and SVR4 shared libraries, you may now set the prefix for
8693loading absolute shared library symbol files, and the search path for
8694locating non-absolute shared library symbol files.
8695
8696* Live range splitting
8697
8698GDB can now effectively debug code for which GCC has performed live
8699range splitting as part of its optimization. See gdb/doc/LRS for
8700more details on the expected format of the stabs information.
8701
8702* Hurd support
8703
8704GDB's support for the GNU Hurd, including thread debugging, has been
8705updated to work with current versions of the Hurd.
8706
8707* ARM Thumb support
8708
8709GDB's ARM target configuration now handles the ARM7T (Thumb) 16-bit
8710instruction set. ARM GDB automatically detects when Thumb
8711instructions are in use, and adjusts disassembly and backtracing
8712accordingly.
8713
8714* MIPS16 support
8715
8716GDB's MIPS target configurations now handle the MIP16 16-bit
8717instruction set.
8718
8719* Overlay support
8720
8721GDB now includes support for overlays; if an executable has been
8722linked such that multiple sections are based at the same address, GDB
8723will decide which section to use for symbolic info. You can choose to
8724control the decision manually, using overlay commands, or implement
8725additional target-side support and use "overlay load-target" to bring
8726in the overlay mapping. Do "help overlay" for more detail.
8727
8728* info symbol
8729
8730The command "info symbol <address>" displays information about
8731the symbol at the specified address.
8732
8733* Trace support
8734
8735The standard remote protocol now includes an extension that allows
8736asynchronous collection and display of trace data. This requires
8737extensive support in the target-side debugging stub. Tracing mode
8738includes a new interaction mode in GDB and new commands: see the
8739file tracepoint.c for more details.
8740
8741* MIPS simulator
8742
8743Configurations for embedded MIPS now include a simulator contributed
8744by Cygnus Solutions. The simulator supports the instruction sets
8745of most MIPS variants.
8746
8747* Sparc simulator
8748
8749Sparc configurations may now include the ERC32 simulator contributed
8750by the European Space Agency. The simulator is not built into
8751Sparc targets by default; configure with --enable-sim to include it.
8752
8753* set architecture
8754
8755For target configurations that may include multiple variants of a
8756basic architecture (such as MIPS and SH), you may now set the
8757architecture explicitly. "set arch" sets, "info arch" lists
8758the possible architectures.
8759
8760*** Changes in GDB-4.16:
8761
8762* New native configurations
8763
8764Windows 95, x86 Windows NT i[345]86-*-cygwin32
8765M68K NetBSD m68k-*-netbsd*
8766PowerPC AIX 4.x powerpc-*-aix*
8767PowerPC MacOS powerpc-*-macos*
8768PowerPC Windows NT powerpcle-*-cygwin32
8769RS/6000 AIX 4.x rs6000-*-aix4*
8770
8771* New targets
8772
8773ARM with RDP protocol arm-*-*
8774I960 with MON960 i960-*-coff
8775MIPS VxWorks mips*-*-vxworks*
8776MIPS VR4300 with PMON mips64*vr4300{,el}-*-elf*
8777PowerPC with PPCBUG monitor powerpc{,le}-*-eabi*
8778Hitachi SH3 sh-*-*
8779Matra Sparclet sparclet-*-*
8780
8781* PowerPC simulator
8782
8783The powerpc-eabi configuration now includes the PSIM simulator,
8784contributed by Andrew Cagney, with assistance from Mike Meissner.
8785PSIM is a very elaborate model of the PowerPC, including not only
8786basic instruction set execution, but also details of execution unit
8787performance and I/O hardware. See sim/ppc/README for more details.
8788
8789* Solaris 2.5
8790
8791GDB now works with Solaris 2.5.
8792
8793* Windows 95/NT native
8794
8795GDB will now work as a native debugger on Windows 95 and Windows NT.
8796To build it from source, you must use the "gnu-win32" environment,
8797which uses a DLL to emulate enough of Unix to run the GNU tools.
8798Further information, binaries, and sources are available at
8799ftp.cygnus.com, under pub/gnu-win32.
8800
8801* dont-repeat command
8802
8803If a user-defined command includes the command `dont-repeat', then the
8804command will not be repeated if the user just types return. This is
8805useful if the command is time-consuming to run, so that accidental
8806extra keystrokes don't run the same command many times.
8807
8808* Send break instead of ^C
8809
8810The standard remote protocol now includes an option to send a break
8811rather than a ^C to the target in order to interrupt it. By default,
8812GDB will send ^C; to send a break, set the variable `remotebreak' to 1.
8813
8814* Remote protocol timeout
8815
8816The standard remote protocol includes a new variable `remotetimeout'
8817that allows you to set the number of seconds before GDB gives up trying
8818to read from the target. The default value is 2.
8819
8820* Automatic tracking of dynamic object loading (HPUX and Solaris only)
8821
8822By default GDB will automatically keep track of objects as they are
8823loaded and unloaded by the dynamic linker. By using the command `set
8824stop-on-solib-events 1' you can arrange for GDB to stop the inferior
8825when shared library events occur, thus allowing you to set breakpoints
8826in shared libraries which are explicitly loaded by the inferior.
8827
8828Note this feature does not work on hpux8. On hpux9 you must link
8829/usr/lib/end.o into your program. This feature should work
8830automatically on hpux10.
8831
8832* Irix 5.x hardware watchpoint support
8833
8834Irix 5 configurations now support the use of hardware watchpoints.
8835
8836* Mips protocol "SYN garbage limit"
8837
8838When debugging a Mips target using the `target mips' protocol, you
8839may set the number of characters that GDB will ignore by setting
8840the `syn-garbage-limit'. A value of -1 means that GDB will ignore
8841every character. The default value is 1050.
8842
8843* Recording and replaying remote debug sessions
8844
8845If you set `remotelogfile' to the name of a file, gdb will write to it
8846a recording of a remote debug session. This recording may then be
8847replayed back to gdb using "gdbreplay". See gdbserver/README for
8848details. This is useful when you have a problem with GDB while doing
8849remote debugging; you can make a recording of the session and send it
8850to someone else, who can then recreate the problem.
8851
8852* Speedups for remote debugging
8853
8854GDB includes speedups for downloading and stepping MIPS systems using
8855the IDT monitor, fast downloads to the Hitachi SH E7000 emulator,
8856and more efficient S-record downloading.
8857
8858* Memory use reductions and statistics collection
8859
8860GDB now uses less memory and reports statistics about memory usage.
8861Try the `maint print statistics' command, for example.
8862
8863*** Changes in GDB-4.15:
8864
8865* Psymtabs for XCOFF
8866
8867The symbol reader for AIX GDB now uses partial symbol tables. This
8868can greatly improve startup time, especially for large executables.
8869
8870* Remote targets use caching
8871
8872Remote targets now use a data cache to speed up communication with the
8873remote side. The data cache could lead to incorrect results because
8874it doesn't know about volatile variables, thus making it impossible to
8875debug targets which use memory mapped I/O devices. `set remotecache
09f2921c 8876off' turns the data cache off.
c906108c
SS
8877
8878* Remote targets may have threads
8879
8880The standard remote protocol now includes support for multiple threads
8881in the target system, using new protocol commands 'H' and 'T'. See
8882gdb/remote.c for details.
8883
8884* NetROM support
8885
8886If GDB is configured with `--enable-netrom', then it will include
8887support for the NetROM ROM emulator from XLNT Designs. The NetROM
8888acts as though it is a bank of ROM on the target board, but you can
8889write into it over the network. GDB's support consists only of
8890support for fast loading into the emulated ROM; to debug, you must use
8891another protocol, such as standard remote protocol. The usual
8892sequence is something like
8893
8894 target nrom <netrom-hostname>
8895 load <prog>
8896 target remote <netrom-hostname>:1235
8897
8898* Macintosh host
8899
8900GDB now includes support for the Apple Macintosh, as a host only. It
8901may be run as either an MPW tool or as a standalone application, and
8902it can debug through the serial port. All the usual GDB commands are
8903available, but to the target command, you must supply "serial" as the
8904device type instead of "/dev/ttyXX". See mpw-README in the main
8905directory for more information on how to build. The MPW configuration
8906scripts */mpw-config.in support only a few targets, and only the
8907mips-idt-ecoff target has been tested.
8908
8909* Autoconf
8910
8911GDB configuration now uses autoconf. This is not user-visible,
8912but does simplify configuration and building.
8913
8914* hpux10
8915
8916GDB now supports hpux10.
8917
8918*** Changes in GDB-4.14:
8919
8920* New native configurations
8921
8922x86 FreeBSD i[345]86-*-freebsd
8923x86 NetBSD i[345]86-*-netbsd
8924NS32k NetBSD ns32k-*-netbsd
8925Sparc NetBSD sparc-*-netbsd
8926
8927* New targets
8928
8929A29K VxWorks a29k-*-vxworks
8930HP PA PRO embedded (WinBond W89K & Oki OP50N) hppa*-*-pro*
8931CPU32 EST-300 emulator m68*-*-est*
8932PowerPC ELF powerpc-*-elf
8933WDC 65816 w65-*-*
8934
8935* Alpha OSF/1 support for procfs
8936
8937GDB now supports procfs under OSF/1-2.x and higher, which makes it
8938possible to attach to running processes. As the mounting of the /proc
8939filesystem is optional on the Alpha, GDB automatically determines
8940the availability of /proc during startup. This can lead to problems
8941if /proc is unmounted after GDB has been started.
8942
8943* Arguments to user-defined commands
8944
8945User commands may accept up to 10 arguments separated by whitespace.
8946Arguments are accessed within the user command via $arg0..$arg9. A
8947trivial example:
8948define adder
8949 print $arg0 + $arg1 + $arg2
8950
8951To execute the command use:
8952adder 1 2 3
8953
8954Defines the command "adder" which prints the sum of its three arguments.
8955Note the arguments are text substitutions, so they may reference variables,
8956use complex expressions, or even perform inferior function calls.
8957
8958* New `if' and `while' commands
8959
8960This makes it possible to write more sophisticated user-defined
8961commands. Both commands take a single argument, which is the
8962expression to evaluate, and must be followed by the commands to
8963execute, one per line, if the expression is nonzero, the list being
8964terminated by the word `end'. The `if' command list may include an
8965`else' word, which causes the following commands to be executed only
8966if the expression is zero.
8967
8968* Fortran source language mode
8969
8970GDB now includes partial support for Fortran 77. It will recognize
8971Fortran programs and can evaluate a subset of Fortran expressions, but
8972variables and functions may not be handled correctly. GDB will work
8973with G77, but does not yet know much about symbols emitted by other
8974Fortran compilers.
8975
8976* Better HPUX support
8977
8978Most debugging facilities now work on dynamic executables for HPPAs
8979running hpux9 or later. You can attach to running dynamically linked
8980processes, but by default the dynamic libraries will be read-only, so
8981for instance you won't be able to put breakpoints in them. To change
8982that behavior do the following before running the program:
8983
8984 adb -w a.out
8985 __dld_flags?W 0x5
8986 control-d
8987
8988This will cause the libraries to be mapped private and read-write.
8989To revert to the normal behavior, do this:
8990
8991 adb -w a.out
8992 __dld_flags?W 0x4
8993 control-d
8994
8995You cannot set breakpoints or examine data in the library until after
8996the library is loaded if the function/data symbols do not have
8997external linkage.
8998
8999GDB can now also read debug symbols produced by the HP C compiler on
9000HPPAs (sorry, no C++, Fortran or 68k support).
9001
9002* Target byte order now dynamically selectable
9003
9004You can choose which byte order to use with a target system, via the
9005commands "set endian big" and "set endian little", and you can see the
9006current setting by using "show endian". You can also give the command
9007"set endian auto", in which case GDB will use the byte order
9008associated with the executable. Currently, only embedded MIPS
9009configurations support dynamic selection of target byte order.
9010
9011* New DOS host serial code
9012
9013This version uses DPMI interrupts to handle buffered I/O, so you
9014no longer need to run asynctsr when debugging boards connected to
9015a PC's serial port.
9016
9017*** Changes in GDB-4.13:
9018
9019* New "complete" command
9020
9021This lists all the possible completions for the rest of the line, if it
9022were to be given as a command itself. This is intended for use by emacs.
9023
9024* Trailing space optional in prompt
9025
9026"set prompt" no longer adds a space for you after the prompt you set. This
9027allows you to set a prompt which ends in a space or one that does not.
9028
9029* Breakpoint hit counts
9030
9031"info break" now displays a count of the number of times the breakpoint
9032has been hit. This is especially useful in conjunction with "ignore"; you
9033can ignore a large number of breakpoint hits, look at the breakpoint info
9034to see how many times the breakpoint was hit, then run again, ignoring one
9035less than that number, and this will get you quickly to the last hit of
9036that breakpoint.
9037
9038* Ability to stop printing at NULL character
9039
9040"set print null-stop" will cause GDB to stop printing the characters of
9041an array when the first NULL is encountered. This is useful when large
9042arrays actually contain only short strings.
9043
9044* Shared library breakpoints
9045
9046In SunOS 4.x, SVR4, and Alpha OSF/1 configurations, you can now set
9047breakpoints in shared libraries before the executable is run.
9048
9049* Hardware watchpoints
9050
9051There is a new hardware breakpoint for the watch command for sparclite
9052targets. See gdb/sparclite/hw_breakpoint.note.
9053
55241689 9054Hardware watchpoints are also now supported under GNU/Linux.
994bc098 9055
c906108c
SS
9056* Annotations
9057
9058Annotations have been added. These are for use with graphical interfaces,
9059and are still experimental. Currently only gdba.el uses these.
9060
9061* Improved Irix 5 support
9062
9063GDB now works properly with Irix 5.2.
9064
9065* Improved HPPA support
9066
9067GDB now works properly with the latest GCC and GAS.
9068
9069* New native configurations
9070
9071Sequent PTX4 i[34]86-sequent-ptx4
9072HPPA running OSF/1 hppa*-*-osf*
9073Atari TT running SVR4 m68*-*-sysv4*
9074RS/6000 LynxOS rs6000-*-lynxos*
9075
9076* New targets
9077
9078OS/9000 i[34]86-*-os9k
9079MIPS R4000 mips64*{,el}-*-{ecoff,elf}
9080Sparc64 sparc64-*-*
9081
9082* Hitachi SH7000 and E7000-PC ICE support
9083
9084There is now support for communicating with the Hitachi E7000-PC ICE.
9085This is available automatically when GDB is configured for the SH.
9086
9087* Fixes
9088
9089As usual, a variety of small fixes and improvements, both generic
9090and configuration-specific. See the ChangeLog for more detail.
9091
9092*** Changes in GDB-4.12:
9093
9094* Irix 5 is now supported
9095
9096* HPPA support
9097
9098GDB-4.12 on the HPPA has a number of changes which make it unable
9099to debug the output from the currently released versions of GCC and
9100GAS (GCC 2.5.8 and GAS-2.2 or PAGAS-1.36). Until the next major release
9101of GCC and GAS, versions of these tools designed to work with GDB-4.12
9102can be retrieved via anonymous ftp from jaguar.cs.utah.edu:/dist.
9103
9104
9105*** Changes in GDB-4.11:
9106
9107* User visible changes:
9108
9109* Remote Debugging
9110
9111The "set remotedebug" option is now consistent between the mips remote
9112target, remote targets using the gdb-specific protocol, UDI (AMD's
9113debug protocol for the 29k) and the 88k bug monitor. It is now an
9114integer specifying a debug level (normally 0 or 1, but 2 means more
9115debugging info for the mips target).
9116
9117* DEC Alpha native support
9118
9119GDB now works on the DEC Alpha. GCC 2.4.5 does not produce usable
9120debug info, but GDB works fairly well with the DEC compiler and should
9121work with a future GCC release. See the README file for a few
9122Alpha-specific notes.
9123
9124* Preliminary thread implementation
9125
9126GDB now has preliminary thread support for both SGI/Irix and LynxOS.
9127
9128* LynxOS native and target support for 386
9129
9130This release has been hosted on LynxOS 2.2, and also can be configured
9131to remotely debug programs running under LynxOS (see gdb/gdbserver/README
9132for details).
9133
9134* Improvements in C++ mangling/demangling.
9135
994bc098 9136This release has much better g++ debugging, specifically in name
c906108c
SS
9137mangling/demangling, virtual function calls, print virtual table,
9138call methods, ...etc.
9139
9140*** Changes in GDB-4.10:
9141
9142 * User visible changes:
9143
9144Remote debugging using the GDB-specific (`target remote') protocol now
9145supports the `load' command. This is only useful if you have some
9146other way of getting the stub to the target system, and you can put it
9147somewhere in memory where it won't get clobbered by the download.
9148
9149Filename completion now works.
9150
9151When run under emacs mode, the "info line" command now causes the
9152arrow to point to the line specified. Also, "info line" prints
9153addresses in symbolic form (as well as hex).
9154
9155All vxworks based targets now support a user settable option, called
9156vxworks-timeout. This option represents the number of seconds gdb
9157should wait for responses to rpc's. You might want to use this if
9158your vxworks target is, perhaps, a slow software simulator or happens
9159to be on the far side of a thin network line.
9160
9161 * DEC alpha support
9162
9163This release contains support for using a DEC alpha as a GDB host for
9164cross debugging. Native alpha debugging is not supported yet.
9165
9166
9167*** Changes in GDB-4.9:
9168
9169 * Testsuite
9170
9171This is the first GDB release which is accompanied by a matching testsuite.
9172The testsuite requires installation of dejagnu, which should be available
9173via ftp from most sites that carry GNU software.
9174
9175 * C++ demangling
9176
9177'Cfront' style demangling has had its name changed to 'ARM' style, to
9178emphasize that it was written from the specifications in the C++ Annotated
9179Reference Manual, not necessarily to be compatible with AT&T cfront. Despite
9180disclaimers, it still generated too much confusion with users attempting to
9181use gdb with AT&T cfront.
9182
9183 * Simulators
9184
9185GDB now uses a standard remote interface to a simulator library.
9186So far, the library contains simulators for the Zilog Z8001/2, the
9187Hitachi H8/300, H8/500 and Super-H.
9188
9189 * New targets supported
9190
9191H8/300 simulator h8300-hitachi-hms or h8300hms
9192H8/500 simulator h8500-hitachi-hms or h8500hms
9193SH simulator sh-hitachi-hms or sh
9194Z8000 simulator z8k-zilog-none or z8ksim
9195IDT MIPS board over serial line mips-idt-ecoff
9196
9197Cross-debugging to GO32 targets is supported. It requires a custom
994bc098 9198version of the i386-stub.c module which is integrated with the
c906108c
SS
9199GO32 memory extender.
9200
9201 * New remote protocols
9202
9203MIPS remote debugging protocol.
9204
9205 * New source languages supported
9206
9207This version includes preliminary support for Chill, a Pascal like language
9208used by telecommunications companies. Chill support is also being integrated
8f6606b6 9209into the GNU compiler, but we don't know when it will be publicly available.
c906108c
SS
9210
9211
9212*** Changes in GDB-4.8:
9213
9214 * HP Precision Architecture supported
9215
9216GDB now supports HP PA-RISC machines running HPUX. A preliminary
9217version of this support was available as a set of patches from the
9218University of Utah. GDB does not support debugging of programs
9219compiled with the HP compiler, because HP will not document their file
9220format. Instead, you must use GCC (version 2.3.2 or later) and PA-GAS
9221(as available from jaguar.cs.utah.edu:/dist/pa-gas.u4.tar.Z).
9222
9223Many problems in the preliminary version have been fixed.
9224
9225 * Faster and better demangling
9226
9227We have improved template demangling and fixed numerous bugs in the GNU style
9228demangler. It can now handle type modifiers such as `static' or `const'. Wide
9229character types (wchar_t) are now supported. Demangling of each symbol is now
9230only done once, and is cached when the symbol table for a file is read in.
9231This results in a small increase in memory usage for C programs, a moderate
9232increase in memory usage for C++ programs, and a fantastic speedup in
9233symbol lookups.
9234
9235`Cfront' style demangling still doesn't work with AT&T cfront. It was written
9236from the specifications in the Annotated Reference Manual, which AT&T's
9237compiler does not actually implement.
9238
9239 * G++ multiple inheritance compiler problem
9240
9241In the 2.3.2 release of gcc/g++, how the compiler resolves multiple
9242inheritance lattices was reworked to properly discover ambiguities. We
9243recently found an example which causes this new algorithm to fail in a
9244very subtle way, producing bad debug information for those classes.
9245The file 'gcc.patch' (in this directory) can be applied to gcc to
9246circumvent the problem. A future GCC release will contain a complete
9247fix.
9248
9249The previous G++ debug info problem (mentioned below for the gdb-4.7
9250release) is fixed in gcc version 2.3.2.
9251
9252 * Improved configure script
9253
9254The `configure' script will now attempt to guess your system type if
9255you don't supply a host system type. The old scheme of supplying a
9256host system triplet is preferable over using this. All the magic is
9257done in the new `config.guess' script. Examine it for details.
9258
9259We have also brought our configure script much more in line with the FSF's
9260version. It now supports the --with-xxx options. In particular,
9261`--with-minimal-bfd' can be used to make the GDB binary image smaller.
9262The resulting GDB will not be able to read arbitrary object file formats --
9263only the format ``expected'' to be used on the configured target system.
9264We hope to make this the default in a future release.
9265
9266 * Documentation improvements
9267
9268There's new internal documentation on how to modify GDB, and how to
9269produce clean changes to the code. We implore people to read it
9270before submitting changes.
9271
9272The GDB manual uses new, sexy Texinfo conditionals, rather than arcane
9273M4 macros. The new texinfo.tex is provided in this release. Pre-built
9274`info' files are also provided. To build `info' files from scratch,
9275you will need the latest `makeinfo' release, which will be available in
9276a future texinfo-X.Y release.
9277
9278*NOTE* The new texinfo.tex can cause old versions of TeX to hang.
9279We're not sure exactly which versions have this problem, but it has
9280been seen in 3.0. We highly recommend upgrading to TeX version 3.141
9281or better. If that isn't possible, there is a patch in
9282`texinfo/tex3patch' that will modify `texinfo/texinfo.tex' to work
9283around this problem.
9284
9285 * New features
9286
9287GDB now supports array constants that can be used in expressions typed in by
9288the user. The syntax is `{element, element, ...}'. Ie: you can now type
9289`print {1, 2, 3}', and it will build up an array in memory malloc'd in
9290the target program.
9291
9292The new directory `gdb/sparclite' contains a program that demonstrates
9293how the sparc-stub.c remote stub runs on a Fujitsu SPARClite processor.
9294
9295 * New native hosts supported
9296
9297HP/PA-RISC under HPUX using GNU tools hppa1.1-hp-hpux
9298386 CPUs running SCO Unix 3.2v4 i386-unknown-sco3.2v4
9299
9300 * New targets supported
9301
9302AMD 29k family via UDI a29k-amd-udi or udi29k
9303
9304 * New file formats supported
9305
9306BFD now supports reading HP/PA-RISC executables (SOM file format?),
9307HPUX core files, and SCO 3.2v2 core files.
9308
9309 * Major bug fixes
9310
9311Attaching to processes now works again; thanks for the many bug reports.
9312
9313We have also stomped on a bunch of core dumps caused by
9314printf_filtered("%s") problems.
9315
9316We eliminated a copyright problem on the rpc and ptrace header files
9317for VxWorks, which was discovered at the last minute during the 4.7
9318release. You should now be able to build a VxWorks GDB.
9319
9320You can now interrupt gdb while an attached process is running. This
9321will cause the attached process to stop, and give control back to GDB.
9322
9323We fixed problems caused by using too many file descriptors
9324for reading symbols from object files and libraries. This was
9325especially a problem for programs that used many (~100) shared
9326libraries.
9327
9328The `step' command now only enters a subroutine if there is line number
9329information for the subroutine. Otherwise it acts like the `next'
9330command. Previously, `step' would enter subroutines if there was
9331any debugging information about the routine. This avoids problems
9332when using `cc -g1' on MIPS machines.
9333
9334 * Internal improvements
9335
9336GDB's internal interfaces have been improved to make it easier to support
9337debugging of multiple languages in the future.
9338
9339GDB now uses a common structure for symbol information internally.
9340Minimal symbols (derived from linkage symbols in object files), partial
9341symbols (from a quick scan of debug information), and full symbols
9342contain a common subset of information, making it easier to write
9343shared code that handles any of them.
9344
9345 * New command line options
9346
9347We now accept --silent as an alias for --quiet.
9348
9349 * Mmalloc licensing
9350
9351The memory-mapped-malloc library is now licensed under the GNU Library
9352General Public License.
9353
9354*** Changes in GDB-4.7:
9355
9356 * Host/native/target split
9357
9358GDB has had some major internal surgery to untangle the support for
9359hosts and remote targets. Now, when you configure GDB for a remote
9360target, it will no longer load in all of the support for debugging
9361local programs on the host. When fully completed and tested, this will
9362ensure that arbitrary host/target combinations are possible.
9363
9364The primary conceptual shift is to separate the non-portable code in
9365GDB into three categories. Host specific code is required any time GDB
9366is compiled on that host, regardless of the target. Target specific
9367code relates to the peculiarities of the target, but can be compiled on
9368any host. Native specific code is everything else: it can only be
9369built when the host and target are the same system. Child process
9370handling and core file support are two common `native' examples.
9371
9372GDB's use of /proc for controlling Unix child processes is now cleaner.
9373It has been split out into a single module under the `target_ops' vector,
9374plus two native-dependent functions for each system that uses /proc.
9375
9376 * New hosts supported
9377
9378HP/Apollo 68k (under the BSD domain) m68k-apollo-bsd or apollo68bsd
9379386 CPUs running various BSD ports i386-unknown-bsd or 386bsd
9380386 CPUs running SCO Unix i386-unknown-scosysv322 or i386sco
9381
9382 * New targets supported
9383
9384Fujitsu SPARClite sparclite-fujitsu-none or sparclite
938568030 and CPU32 m68030-*-*, m68332-*-*
9386
9387 * New native hosts supported
9388
9389386 CPUs running various BSD ports i386-unknown-bsd or 386bsd
9390 (386bsd is not well tested yet)
9391386 CPUs running SCO Unix i386-unknown-scosysv322 or sco
9392
9393 * New file formats supported
9394
9395BFD now supports COFF files for the Zilog Z8000 microprocessor. It
9396supports reading of `a.out.adobe' object files, which are an a.out
9397format extended with minimal information about multiple sections.
9398
9399 * New commands
9400
9401`show copying' is the same as the old `info copying'.
9402`show warranty' is the same as `info warrantee'.
9403These were renamed for consistency. The old commands continue to work.
9404
9405`info handle' is a new alias for `info signals'.
9406
9407You can now define pre-command hooks, which attach arbitrary command
9408scripts to any command. The commands in the hook will be executed
9409prior to the user's command. You can also create a hook which will be
9410executed whenever the program stops. See gdb.texinfo.
9411
9412 * C++ improvements
9413
9414We now deal with Cfront style name mangling, and can even extract type
9415info from mangled symbols. GDB can automatically figure out which
9416symbol mangling style your C++ compiler uses.
9417
9418Calling of methods and virtual functions has been improved as well.
9419
9420 * Major bug fixes
9421
82f06518 9422The crash that occurred when debugging Sun Ansi-C compiled binaries is
c906108c
SS
9423fixed. This was due to mishandling of the extra N_SO stabs output
9424by the compiler.
9425
9426We also finally got Ultrix 4.2 running in house, and fixed core file
9427support, with help from a dozen people on the net.
9428
9429John M. Farrell discovered that the reason that single-stepping was so
9430slow on all of the Mips based platforms (primarily SGI and DEC) was
9431that we were trying to demangle and lookup a symbol used for internal
9432purposes on every instruction that was being stepped through. Changing
9433the name of that symbol so that it couldn't be mistaken for a C++
9434mangled symbol sped things up a great deal.
9435
9436Rich Pixley sped up symbol lookups in general by getting much smarter
9437about when C++ symbol mangling is necessary. This should make symbol
9438completion (TAB on the command line) much faster. It's not as fast as
9439we'd like, but it's significantly faster than gdb-4.6.
9440
9441 * AMD 29k support
9442
9443A new user controllable variable 'call_scratch_address' can
9444specify the location of a scratch area to be used when GDB
9445calls a function in the target. This is necessary because the
9446usual method of putting the scratch area on the stack does not work
9447in systems that have separate instruction and data spaces.
9448
9449We integrated changes to support the 29k UDI (Universal Debugger
9450Interface), but discovered at the last minute that we didn't have all
9451of the appropriate copyright paperwork. We are working with AMD to
9452resolve this, and hope to have it available soon.
9453
9454 * Remote interfaces
9455
9456We have sped up the remote serial line protocol, especially for targets
9457with lots of registers. It now supports a new `expedited status' ('T')
9458message which can be used in place of the existing 'S' status message.
9459This allows the remote stub to send only the registers that GDB
9460needs to make a quick decision about single-stepping or conditional
9461breakpoints, eliminating the need to fetch the entire register set for
9462each instruction being stepped through.
9463
9464The GDB remote serial protocol now implements a write-through cache for
9465registers, only re-reading the registers if the target has run.
9466
9467There is also a new remote serial stub for SPARC processors. You can
9468find it in gdb-4.7/gdb/sparc-stub.c. This was written to support the
9469Fujitsu SPARClite processor, but will run on any stand-alone SPARC
9470processor with a serial port.
9471
9472 * Configuration
9473
9474Configure.in files have become much easier to read and modify. A new
9475`table driven' format makes it more obvious what configurations are
9476supported, and what files each one uses.
9477
9478 * Library changes
9479
9480There is a new opcodes library which will eventually contain all of the
9481disassembly routines and opcode tables. At present, it only contains
9482Sparc and Z8000 routines. This will allow the assembler, debugger, and
9483disassembler (binutils/objdump) to share these routines.
9484
9485The libiberty library is now copylefted under the GNU Library General
9486Public License. This allows more liberal use, and was done so libg++
9487can use it. This makes no difference to GDB, since the Library License
9488grants all the rights from the General Public License.
9489
9490 * Documentation
9491
9492The file gdb-4.7/gdb/doc/stabs.texinfo is a (relatively) complete
9493reference to the stabs symbol info used by the debugger. It is (as far
9494as we know) the only published document on this fascinating topic. We
9495encourage you to read it, compare it to the stabs information on your
9496system, and send improvements on the document in general (to
9497bug-gdb@prep.ai.mit.edu).
9498
9499And, of course, many bugs have been fixed.
9500
9501
9502*** Changes in GDB-4.6:
9503
9504 * Better support for C++ function names
9505
9506GDB now accepts as input the "demangled form" of C++ overloaded function
9507names and member function names, and can do command completion on such names
9508(using TAB, TAB-TAB, and ESC-?). The names have to be quoted with a pair of
9509single quotes. Examples are 'func (int, long)' and 'obj::operator==(obj&)'.
9510Make use of command completion, it is your friend.
9511
9512GDB also now accepts a variety of C++ mangled symbol formats. They are
9513the GNU g++ style, the Cfront (ARM) style, and the Lucid (lcc) style.
9514You can tell GDB which format to use by doing a 'set demangle-style {gnu,
9515lucid, cfront, auto}'. 'gnu' is the default. Do a 'set demangle-style foo'
9516for the list of formats.
9517
9518 * G++ symbol mangling problem
9519
9520Recent versions of gcc have a bug in how they emit debugging information for
9521C++ methods (when using dbx-style stabs). The file 'gcc.patch' (in this
9522directory) can be applied to gcc to fix the problem. Alternatively, if you
82f06518 9523can't fix gcc, you can #define GCC_MANGLE_BUG when compiling gdb/symtab.c. The
c906108c
SS
9524usual symptom is difficulty with setting breakpoints on methods. GDB complains
9525about the method being non-existent. (We believe that version 2.2.2 of GCC has
9526this problem.)
9527
9528 * New 'maintenance' command
9529
9530All of the commands related to hacking GDB internals have been moved out of
9531the main command set, and now live behind the 'maintenance' command. This
9532can also be abbreviated as 'mt'. The following changes were made:
9533
9534 dump-me -> maintenance dump-me
9535 info all-breakpoints -> maintenance info breakpoints
9536 printmsyms -> maintenance print msyms
9537 printobjfiles -> maintenance print objfiles
9538 printpsyms -> maintenance print psymbols
9539 printsyms -> maintenance print symbols
9540
9541The following commands are new:
9542
9543 maintenance demangle Call internal GDB demangler routine to
9544 demangle a C++ link name and prints the result.
9545 maintenance print type Print a type chain for a given symbol
9546
9547 * Change to .gdbinit file processing
9548
9549We now read the $HOME/.gdbinit file before processing the argv arguments
9550(e.g. reading symbol files or core files). This allows global parameters to
9551be set, which will apply during the symbol reading. The ./.gdbinit is still
9552read after argv processing.
9553
9554 * New hosts supported
9555
9556Solaris-2.0 !!! sparc-sun-solaris2 or sun4sol2
9557
55241689 9558GNU/Linux support i386-unknown-linux or linux
c906108c
SS
9559
9560We are also including code to support the HP/PA running BSD and HPUX. This
9561is almost guaranteed not to work, as we didn't have time to test or build it
9562for this release. We are including it so that the more adventurous (or
9563masochistic) of you can play with it. We also had major problems with the
9564fact that the compiler that we got from HP doesn't support the -g option.
9565It costs extra.
9566
9567 * New targets supported
9568
9569Hitachi H8/300 h8300-hitachi-hms or h8300hms
9570
9571 * More smarts about finding #include files
9572
9573GDB now remembers the compilation directory for all include files, and for
9574all files from which C is generated (like yacc and lex sources). This
9575greatly improves GDB's ability to find yacc/lex sources, and include files,
9576especially if you are debugging your program from a directory different from
9577the one that contains your sources.
9578
9579We also fixed a bug which caused difficulty with listing and setting
9580breakpoints in include files which contain C code. (In the past, you had to
9581try twice in order to list an include file that you hadn't looked at before.)
9582
9583 * Interesting infernals change
9584
9585GDB now deals with arbitrary numbers of sections, where the symbols for each
9586section must be relocated relative to that section's landing place in the
9587target's address space. This work was needed to support ELF with embedded
9588stabs used by Solaris-2.0.
9589
9590 * Bug fixes (of course!)
9591
9592There have been loads of fixes for the following things:
9593 mips, rs6000, 29k/udi, m68k, g++, type handling, elf/dwarf, m88k,
9594 i960, stabs, DOS(GO32), procfs, etc...
9595
9596See the ChangeLog for details.
9597
9598*** Changes in GDB-4.5:
9599
9600 * New machines supported (host and target)
9601
9602IBM RS6000 running AIX rs6000-ibm-aix or rs6000
9603
9604SGI Irix-4.x mips-sgi-irix4 or iris4
9605
9606 * New malloc package
9607
9608GDB now uses a new memory manager called mmalloc, based on gmalloc.
82f06518 9609Mmalloc is capable of handling multiple heaps of memory. It is also
c906108c
SS
9610capable of saving a heap to a file, and then mapping it back in later.
9611This can be used to greatly speedup the startup of GDB by using a
9612pre-parsed symbol table which lives in a mmalloc managed heap. For
9613more details, please read mmalloc/mmalloc.texi.
9614
9615 * info proc
9616
9617The 'info proc' command (SVR4 only) has been enhanced quite a bit. See
9618'help info proc' for details.
9619
9620 * MIPS ecoff symbol table format
9621
9622The code that reads MIPS symbol table format is now supported on all hosts.
9623Thanks to MIPS for releasing the sym.h and symconst.h files to make this
9624possible.
9625
9626 * File name changes for MS-DOS
9627
9628Many files in the config directories have been renamed to make it easier to
9629support GDB on MS-DOSe systems (which have very restrictive file name
9630conventions :-( ). MS-DOSe host support (under DJ Delorie's GO32
9631environment) is close to working but has some remaining problems. Note
9632that debugging of DOS programs is not supported, due to limitations
9633in the ``operating system'', but it can be used to host cross-debugging.
9634
9635 * Cross byte order fixes
9636
9637Many fixes have been made to support cross debugging of Sparc and MIPS
9638targets from hosts whose byte order differs.
9639
9640 * New -mapped and -readnow options
9641
9642If memory-mapped files are available on your system through the 'mmap'
9643system call, you can use the -mapped option on the `file' or
9644`symbol-file' commands to cause GDB to write the symbols from your
9645program into a reusable file. If the program you are debugging is
9646called `/path/fred', the mapped symbol file will be `./fred.syms'.
9647Future GDB debugging sessions will notice the presence of this file,
9648and will quickly map in symbol information from it, rather than reading
9649the symbol table from the executable program. Using the '-mapped'
9650option in a GDB `file' or `symbol-file' command has the same effect as
9651starting GDB with the '-mapped' command-line option.
9652
9653You can cause GDB to read the entire symbol table immediately by using
9654the '-readnow' option with any of the commands that load symbol table
9655information (or on the GDB command line). This makes the command
9656slower, but makes future operations faster.
9657
9658The -mapped and -readnow options are typically combined in order to
9659build a `fred.syms' file that contains complete symbol information.
9660A simple GDB invocation to do nothing but build a `.syms' file for future
9661use is:
9662
9663 gdb -batch -nx -mapped -readnow programname
9664
9665The `.syms' file is specific to the host machine on which GDB is run.
9666It holds an exact image of GDB's internal symbol table. It cannot be
9667shared across multiple host platforms.
9668
9669 * longjmp() handling
9670
9671GDB is now capable of stepping and nexting over longjmp(), _longjmp(), and
9672siglongjmp() without losing control. This feature has not yet been ported to
9673all systems. It currently works on many 386 platforms, all MIPS-based
9674platforms (SGI, DECstation, etc), and Sun3/4.
9675
9676 * Solaris 2.0
9677
9678Preliminary work has been put in to support the new Solaris OS from Sun. At
9679this time, it can control and debug processes, but it is not capable of
9680reading symbols.
9681
9682 * Bug fixes
9683
9684As always, many many bug fixes. The major areas were with g++, and mipsread.
9685People using the MIPS-based platforms should experience fewer mysterious
9686crashes and trashed symbol tables.
9687
9688*** Changes in GDB-4.4:
9689
9690 * New machines supported (host and target)
9691
9692SCO Unix on i386 IBM PC clones i386-sco-sysv or i386sco
9693 (except core files)
9694BSD Reno on Vax vax-dec-bsd
9695Ultrix on Vax vax-dec-ultrix
9696
9697 * New machines supported (target)
9698
9699AMD 29000 embedded, using EBMON a29k-none-none
9700
9701 * C++ support
9702
9703GDB continues to improve its handling of C++. `References' work better.
9704The demangler has also been improved, and now deals with symbols mangled as
9705per the Annotated C++ Reference Guide.
9706
9707GDB also now handles `stabs' symbol information embedded in MIPS
9708`ecoff' symbol tables. Since the ecoff format was not easily
9709extensible to handle new languages such as C++, this appeared to be a
9710good way to put C++ debugging info into MIPS binaries. This option
9711will be supported in the GNU C compiler, version 2, when it is
9712released.
9713
9714 * New features for SVR4
9715
9716GDB now handles SVR4 shared libraries, in the same fashion as SunOS
9717shared libraries. Debugging dynamically linked programs should present
9718only minor differences from debugging statically linked programs.
9719
9720The `info proc' command will print out information about any process
9721on an SVR4 system (including the one you are debugging). At the moment,
9722it prints the address mappings of the process.
9723
9724If you bring up GDB on another SVR4 system, please send mail to
add18b78 9725bug-gdb@prep.ai.mit.edu to let us know what changes were required (if any).
c906108c
SS
9726
9727 * Better dynamic linking support in SunOS
9728
9729Reading symbols from shared libraries which contain debugging symbols
9730now works properly. However, there remain issues such as automatic
9731skipping of `transfer vector' code during function calls, which
9732make it harder to debug code in a shared library, than to debug the
9733same code linked statically.
9734
9735 * New Getopt
9736
9737GDB is now using the latest `getopt' routines from the FSF. This
9738version accepts the -- prefix for options with long names. GDB will
9739continue to accept the old forms (-option and +option) as well.
add18b78 9740Various single letter abbreviations for options have been explicitly
c906108c
SS
9741added to the option table so that they won't get overshadowed in the
9742future by other options that begin with the same letter.
9743
9744 * Bugs fixed
9745
9746The `cleanup_undefined_types' bug that many of you noticed has been squashed.
9747Many assorted bugs have been handled. Many more remain to be handled.
9748See the various ChangeLog files (primarily in gdb and bfd) for details.
9749
9750
9751*** Changes in GDB-4.3:
9752
9753 * New machines supported (host and target)
9754
9755Amiga 3000 running Amix m68k-cbm-svr4 or amix
9756NCR 3000 386 running SVR4 i386-ncr-svr4 or ncr3000
9757Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
9758
9759 * Almost SCO Unix support
9760
9761We had hoped to support:
9762SCO Unix on i386 IBM PC clones i386-sco-sysv or i386sco
9763(except for core file support), but we discovered very late in the release
9764that it has problems with process groups that render gdb unusable. Sorry
9765about that. I encourage people to fix it and post the fixes.
9766
9767 * Preliminary ELF and DWARF support
9768
9769GDB can read ELF object files on System V Release 4, and can handle
9770debugging records for C, in DWARF format, in ELF files. This support
9771is preliminary. If you bring up GDB on another SVR4 system, please
9772send mail to bug-gdb@prep.ai.mit.edu to let us know what changes were
add18b78 9773required (if any).
c906108c
SS
9774
9775 * New Readline
9776
9777GDB now uses the latest `readline' library. One user-visible change
9778is that two tabs will list possible command completions, which previously
9779required typing M-? (meta-question mark, or ESC ?).
9780
9781 * Bugs fixed
9782
9783The `stepi' bug that many of you noticed has been squashed.
9784Many bugs in C++ have been handled. Many more remain to be handled.
9785See the various ChangeLog files (primarily in gdb and bfd) for details.
9786
9787 * State of the MIPS world (in case you wondered):
9788
9789GDB can understand the symbol tables emitted by the compilers
9790supplied by most vendors of MIPS-based machines, including DEC. These
9791symbol tables are in a format that essentially nobody else uses.
9792
9793Some versions of gcc come with an assembler post-processor called
9794mips-tfile. This program is required if you want to do source-level
9795debugging of gcc-compiled programs. I believe FSF does not ship
9796mips-tfile with gcc version 1, but it will eventually come with gcc
9797version 2.
9798
9799Debugging of g++ output remains a problem. g++ version 1.xx does not
9800really support it at all. (If you're lucky, you should be able to get
9801line numbers and stack traces to work, but no parameters or local
9802variables.) With some work it should be possible to improve the
9803situation somewhat.
9804
9805When gcc version 2 is released, you will have somewhat better luck.
9806However, even then you will get confusing results for inheritance and
9807methods.
9808
9809We will eventually provide full debugging of g++ output on
9810DECstations. This will probably involve some kind of stabs-in-ecoff
9811encapulation, but the details have not been worked out yet.
9812
9813
9814*** Changes in GDB-4.2:
9815
9816 * Improved configuration
9817
9818Only one copy of `configure' exists now, and it is not self-modifying.
994bc098 9819Porting BFD is simpler.
c906108c
SS
9820
9821 * Stepping improved
9822
9823The `step' and `next' commands now only stop at the first instruction
9824of a source line. This prevents the multiple stops that used to occur
9825in switch statements, for-loops, etc. `Step' continues to stop if a
9826function that has debugging information is called within the line.
9827
9828 * Bug fixing
9829
9830Lots of small bugs fixed. More remain.
9831
9832 * New host supported (not target)
9833
9834Intel 386 PC clone running Mach i386-none-mach
9835
9836
9837*** Changes in GDB-4.1:
9838
9839 * Multiple source language support
9840
9841GDB now has internal scaffolding to handle several source languages.
9842It determines the type of each source file from its filename extension,
9843and will switch expression parsing and number formatting to match the
9844language of the function in the currently selected stack frame.
9845You can also specifically set the language to be used, with
9846`set language c' or `set language modula-2'.
9847
9848 * GDB and Modula-2
9849
9850GDB now has preliminary support for the GNU Modula-2 compiler,
9851currently under development at the State University of New York at
9852Buffalo. Development of both GDB and the GNU Modula-2 compiler will
9853continue through the fall of 1991 and into 1992.
9854
9855Other Modula-2 compilers are currently not supported, and attempting to
9856debug programs compiled with them will likely result in an error as the
9857symbol table is read. Feel free to work on it, though!
9858
9859There are hooks in GDB for strict type checking and range checking,
9860in the `Modula-2 philosophy', but they do not currently work.
9861
9862 * set write on/off
9863
9864GDB can now write to executable and core files (e.g. patch
9865a variable's value). You must turn this switch on, specify
9866the file ("exec foo" or "core foo"), *then* modify it, e.g.
9867by assigning a new value to a variable. Modifications take
9868effect immediately.
9869
9870 * Automatic SunOS shared library reading
9871
9872When you run your program, GDB automatically determines where its
9873shared libraries (if any) have been loaded, and reads their symbols.
9874The `share' command is no longer needed. This also works when
9875examining core files.
9876
9877 * set listsize
9878
9879You can specify the number of lines that the `list' command shows.
9880The default is 10.
9881
9882 * New machines supported (host and target)
9883
9884SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris
9885Sony NEWS (68K) running NEWSOS 3.x: m68k-sony-sysv or news
9886Ultracomputer (29K) running Sym1: a29k-nyu-sym1 or ultra3
9887
9888 * New hosts supported (not targets)
9889
9890IBM RT/PC: romp-ibm-aix or rtpc
9891
9892 * New targets supported (not hosts)
9893
9894AMD 29000 embedded with COFF a29k-none-coff
9895AMD 29000 embedded with a.out a29k-none-aout
9896Ultracomputer remote kernel debug a29k-nyu-kern
9897
9898 * New remote interfaces
9899
9900AMD 29000 Adapt
9901AMD 29000 Minimon
9902
9903
9904*** Changes in GDB-4.0:
9905
9906 * New Facilities
9907
9908Wide output is wrapped at good places to make the output more readable.
9909
9910Gdb now supports cross-debugging from a host machine of one type to a
9911target machine of another type. Communication with the target system
9912is over serial lines. The ``target'' command handles connecting to the
9913remote system; the ``load'' command will download a program into the
9914remote system. Serial stubs for the m68k and i386 are provided. Gdb
9915also supports debugging of realtime processes running under VxWorks,
9916using SunRPC Remote Procedure Calls over TCP/IP to talk to a debugger
9917stub on the target system.
9918
9919New CPUs supported include the AMD 29000 and Intel 960.
9920
994bc098 9921GDB now reads object files and symbol tables via a ``binary file''
c906108c
SS
9922library, which allows a single copy of GDB to debug programs of multiple
9923object file types such as a.out and coff.
9924
9925There is now a GDB reference card in "doc/refcard.tex". (Make targets
9926refcard.dvi and refcard.ps are available to format it).
9927
9928
9929 * Control-Variable user interface simplified
9930
9931All variables that control the operation of the debugger can be set
9932by the ``set'' command, and displayed by the ``show'' command.
9933
9934For example, ``set prompt new-gdb=>'' will change your prompt to new-gdb=>.
9935``Show prompt'' produces the response:
9936Gdb's prompt is new-gdb=>.
9937
9938What follows are the NEW set commands. The command ``help set'' will
9939print a complete list of old and new set commands. ``help set FOO''
9940will give a longer description of the variable FOO. ``show'' will show
9941all of the variable descriptions and their current settings.
9942
9943confirm on/off: Enables warning questions for operations that are
9944 hard to recover from, e.g. rerunning the program while
9945 it is already running. Default is ON.
9946
994bc098
ES
9947editing on/off: Enables EMACS style command line editing
9948 of input. Previous lines can be recalled with
c906108c
SS
9949 control-P, the current line can be edited with control-B,
9950 you can search for commands with control-R, etc.
9951 Default is ON.
9952
994bc098 9953history filename NAME: NAME is where the gdb command history
c906108c
SS
9954 will be stored. The default is .gdb_history,
9955 or the value of the environment variable
9956 GDBHISTFILE.
9957
994bc098 9958history size N: The size, in commands, of the command history. The
c906108c
SS
9959 default is 256, or the value of the environment variable
9960 HISTSIZE.
9961
9962history save on/off: If this value is set to ON, the history file will
994bc098 9963 be saved after exiting gdb. If set to OFF, the
c906108c
SS
9964 file will not be saved. The default is OFF.
9965
994bc098
ES
9966history expansion on/off: If this value is set to ON, then csh-like
9967 history expansion will be performed on
c906108c
SS
9968 command line input. The default is OFF.
9969
9970radix N: Sets the default radix for input and output. It can be set
9971 to 8, 10, or 16. Note that the argument to "radix" is interpreted
9972 in the current radix, so "set radix 10" is always a no-op.
9973
9974height N: This integer value is the number of lines on a page. Default
9975 is 24, the current `stty rows'' setting, or the ``li#''
9976 setting from the termcap entry matching the environment
9977 variable TERM.
9978
9979width N: This integer value is the number of characters on a line.
9980 Default is 80, the current `stty cols'' setting, or the ``co#''
9981 setting from the termcap entry matching the environment
9982 variable TERM.
9983
9984Note: ``set screensize'' is obsolete. Use ``set height'' and
9985``set width'' instead.
9986
9987print address on/off: Print memory addresses in various command displays,
9988 such as stack traces and structure values. Gdb looks
9989 more ``symbolic'' if you turn this off; it looks more
9990 ``machine level'' with it on. Default is ON.
9991
994bc098 9992print array on/off: Prettyprint arrays. New convenient format! Default
c906108c
SS
9993 is OFF.
9994
9995print demangle on/off: Print C++ symbols in "source" form if on,
9996 "raw" form if off.
9997
9998print asm-demangle on/off: Same, for assembler level printouts
9999 like instructions.
10000
10001print vtbl on/off: Prettyprint C++ virtual function tables. Default is OFF.
10002
10003
10004 * Support for Epoch Environment.
10005
10006The epoch environment is a version of Emacs v18 with windowing. One
10007new command, ``inspect'', is identical to ``print'', except that if you
10008are running in the epoch environment, the value is printed in its own
10009window.
10010
10011
10012 * Support for Shared Libraries
10013
10014GDB can now debug programs and core files that use SunOS shared libraries.
10015Symbols from a shared library cannot be referenced
10016before the shared library has been linked with the program (this
10017happens after you type ``run'' and before the function main() is entered).
10018At any time after this linking (including when examining core files
10019from dynamically linked programs), gdb reads the symbols from each
10020shared library when you type the ``sharedlibrary'' command.
10021It can be abbreviated ``share''.
10022
994bc098 10023sharedlibrary REGEXP: Load shared object library symbols for files
c906108c
SS
10024 matching a unix regular expression. No argument
10025 indicates to load symbols for all shared libraries.
10026
10027info sharedlibrary: Status of loaded shared libraries.
10028
10029
10030 * Watchpoints
10031
10032A watchpoint stops execution of a program whenever the value of an
10033expression changes. Checking for this slows down execution
10034tremendously whenever you are in the scope of the expression, but is
10035quite useful for catching tough ``bit-spreader'' or pointer misuse
10036problems. Some machines such as the 386 have hardware for doing this
10037more quickly, and future versions of gdb will use this hardware.
10038
10039watch EXP: Set a watchpoint (breakpoint) for an expression.
10040
10041info watchpoints: Information about your watchpoints.
10042
10043delete N: Deletes watchpoint number N (same as breakpoints).
10044disable N: Temporarily turns off watchpoint number N (same as breakpoints).
10045enable N: Re-enables watchpoint number N (same as breakpoints).
10046
10047
10048 * C++ multiple inheritance
10049
10050When used with a GCC version 2 compiler, GDB supports multiple inheritance
10051for C++ programs.
10052
10053 * C++ exception handling
10054
10055Gdb now supports limited C++ exception handling. Besides the existing
10056ability to breakpoint on an exception handler, gdb can breakpoint on
10057the raising of an exception (before the stack is peeled back to the
10058handler's context).
10059
10060catch FOO: If there is a FOO exception handler in the dynamic scope,
10061 set a breakpoint to catch exceptions which may be raised there.
10062 Multiple exceptions (``catch foo bar baz'') may be caught.
10063
10064info catch: Lists all exceptions which may be caught in the
10065 current stack frame.
10066
10067
10068 * Minor command changes
10069
10070The command ``call func (arg, arg, ...)'' now acts like the print
10071command, except it does not print or save a value if the function's result
10072is void. This is similar to dbx usage.
10073
10074The ``up'' and ``down'' commands now always print the frame they end up
10075at; ``up-silently'' and `down-silently'' can be used in scripts to change
10076frames without printing.
10077
10078 * New directory command
10079
10080'dir' now adds directories to the FRONT of the source search path.
10081The path starts off empty. Source files that contain debug information
10082about the directory in which they were compiled can be found even
10083with an empty path; Sun CC and GCC include this information. If GDB can't
10084find your source file in the current directory, type "dir .".
10085
10086 * Configuring GDB for compilation
10087
10088For normal use, type ``./configure host''. See README or gdb.texinfo
10089for more details.
10090
994bc098 10091GDB now handles cross debugging. If you are remotely debugging between
c906108c
SS
10092two different machines, type ``./configure host -target=targ''.
10093Host is the machine where GDB will run; targ is the machine
10094where the program that you are debugging will run.