1 What has changed in GDB?
2 (Organized release by release)
4 *** Changes since GDB 17
6 * Support for .gdb_index sections with version less than 7 has been
9 * Support for Guile 2.0 has been removed. Guile 2.2 is now the minimal
10 supported Guile version.
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.
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.
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
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
37 * Support for stabs debug information has been removed.
39 * Support for the binary file format dbx has been removed.
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.
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.
53 * Support for Floating Point Mode Register (FPMR) in AArch64.
57 GNU/Linux/MicroBlaze (gdbserver) microblazeel-*linux*
62 show local-environment
63 unset 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.
68 maintenance 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.
74 maintenance info program-spaces
75 This command no longer displays the core file name.
78 If an inferior has a core file loaded, then this will be displayed
79 as an additional line under the inferior's table entry in the
82 New command class for help
83 The new command class "essential" has been added, which is a set of
84 commands that we, as developers, believe would be close to a minimal
85 set of commands for a new user of GDB.
87 * Changed remote packets
89 single-inf-arg in qSupported
90 The new single-inf-arg feature within the qSupported packet allows
91 GDB to inform the stub that it would like to send the inferior
92 arguments as a single string within the vRun packet. The stub can
93 reply with the single-inf-arg feature to indicate that it is able to
94 accept arguments as a single string.
99 This packet returns the executable filename and argument string with
100 which the server was started. If no such information was given to
101 the server then this is reflected in the reply.
105 ** New class gdb.Style for representing styles, a collection of
106 foreground and background gdb.Color objects, and an intensity.
108 ** New constants gdb.INTENSITY_NORMAL, gdb.INTENSITY_BOLD, and
109 gdb.INTENSITY_DIM for use with gdb.Style when representing
112 ** New gdb.StyleParameterSet for creating custom style settings.
113 Use gdb.StyleParameterSet(NAME) to create 'set style NAME ...'
114 and 'show style NAME ...' parameters.
116 ** The gdb.write() function now takes an additional, optional,
117 'style' argument, which can be used to style the output.
119 ** New gdb.Corefile class which represents a loaded core file. This
120 has an attribute Corefile.filename, the file name of the loaded
121 core file, and a method Corefile.is_valid(), which returns False
122 when a Corefile object becomes invalid (e.g. when the core file
123 is unloaded). There is also Corefile.mapped_files() which
124 returns a list of CorefileMappedFile objects, representing files
125 that were mapped into the core file when it was created.
127 ** New gdb.CorefileMappedFile type representing a file that was
128 mapped when the core file was created. Has read-only attributes
129 filename (string), build_id (string), is_main_executable
130 (boolean), and regions (list of CorefileMappedFileRegion objects).
132 ** New gdb.CorefileMappedFileRegion type, which represents a mapped
133 region of a file (see gdb.CorefileMappedFile above). Has
134 read-only attributes start, end, and file_offset.
136 ** New Inferior.corefile attribute. This read only attribute
137 contains the gdb.Corefile object if a core file is loaded into
138 the inferior, otherwise, this contains None.
142 ** Procedures 'memory-port-read-buffer-size',
143 'set-memory-port-read-buffer-size!', 'memory-port-write-buffer-size',
144 and 'set-memory-port-write-buffer-size!' have been removed. They were
145 deprecated since GDB 10. Users who need to control the size of a
146 memory port's internal buffer can use the 'setvbuf' procedure.
148 *** Changes in GDB 17
150 * Debugging Linux programs that use x86-64 or x86-64 with 32-bit pointer
151 size (X32) Shadow Stacks are now supported.
153 * Support for the shadow stack pointer register on x86-64 or x86-64 with
154 32-bit pointer size (X32) GNU/Linux.
156 * Debugger Adapter Protocol changes
158 ** GDB now supports the "completions" request.
160 * "set style" commands now supports numeric format for basic colors
161 from 0 to 255 and #RRGGBB format for TrueColor.
163 * New built-in convenience variable $_colorsupport provides comma-separated
164 list of color space names supported by terminal. Each color space name is one
165 of monochrome, ansi_8color, aixterm_16color, xterm_256color or rgb_24bit.
166 It is handy for conditionally using styling colors based on terminal features.
169 (gdb) if $_regex ($_colorsupport, ".*(^|,)rgb_24bit($|,).*")
170 >set style filename background #FACADE
172 >if $_regex ($_colorsupport, ".*(^|,)xterm_256color($|,).*")
173 >set style filename background 224
175 >set style filename background red
179 * UST (static tracepoint) support from gdbserver has been removed.
181 * Linux checkpoint code has been updated to work with multiple inferiors.
183 * The gcore and gdb-add-index scripts now have a -v or --version
184 option, which prints the version number, and then exits. As well as
185 a -h or --help option, which prints each options and a brief
188 * The gcore script now has a -g option that lets you specify the GDB
189 binary invoked by gcore.
191 * On systems that support linker namespaces, the output of the command
192 "info sharedlibraries" may add one more column, NS, which identifies the
193 namespace into which the library was loaded, if more than one namespace
196 * New built-in convenience variables $linker_namespace_count and
197 $_linker_namespace. These show the number of active linker
198 namespaces, and the namespace to which the current location belongs to.
199 In systems that don't support linker namespaces, or if the inferior hasn't
200 started yet, these always return the integer 0.
202 * The 'org.gnu.gdb.i386.linux' target description feature can now
203 contain three additional registers which provide access to the TLS
204 related GDT entries on i386 (and x86-64 when compiling with -m32).
206 * Add record full support for rv64gc architectures
208 * Debugging Linux programs that use AArch64 Guarded Control Stacks is now
211 * New "--binary-output" command line option instructs GDB to set the
212 translation mode of its stdout/stderr to binary mode. This disables
213 Line Feed translation. MS-Windows only.
215 * The "catch syscall" command now works on riscv*-linux* targets.
219 maintenance check psymtabs
220 Renamed from maintenance check-psymtabs
222 maintenance check symtabs
223 Renamed from maintenance check-symtabs
225 maintenance canonicalize
226 Show the canonical form of a C++ name.
228 set riscv numeric-register-names on|off
229 show riscv numeric-register-names
230 Controls whether GDB refers to risc-v registers by their numeric names
231 (e.g 'x1') or their abi names (e.g. 'ra').
232 Defaults to 'off', matching the old behaviour (abi names).
234 set style emoji on|off|auto
236 Controls whether GDB can display emoji. The default is "auto",
237 which means emoji will be displayed in some situations when
238 the host charset is UTF-8.
240 set style warning-prefix STRING
241 set style error-prefix STRING
242 These commands control the prefix that is printed before warnings
243 and errors, respectively. This functionality is intended for use
244 with emoji display, and so the prefixes are only displayed if emoji
247 info linker-namespaces
248 info linker-namespaces [[N]]
249 Print information about the given linker namespace (identified as N),
250 or about all the namespaces if no argument is given.
252 set remote multiple-watchpoint-addresses-packet
253 show remote multiple-watchpoint-addresses-packet
254 Set/show the support for receiving multiple watchpoint addresses in
255 the 'T' stop reply packet.
260 On Linux and FreeBSD, the addresses shown in the output of this
261 command are now for the full memory range allocated to the shared
264 info threads [-gid] [-stopped] [-running] [ID]...
265 If no threads match the given ID(s) or filter options, GDB now prints
269 without printing the provided arguments. The newly added '-stopped'
270 option makes GDB list the stopped threads only. Similarly,
271 '-running' makes GDB list the running threads only. If both options
272 are given together, both stopped and running threads are listed.
273 These new flags can be useful to get a reduced list when there is a
274 large number of threads.
276 * GDB-internal Thread Local Storage (TLS) support
278 ** Linux targets for the x86_64, aarch64, ppc64, s390x, and riscv
279 architectures now have GDB-internal support for TLS address
280 lookup in addition to that traditionally provided by the
281 libthread_db library. This internal support works for programs
282 linked against either the GLIBC or MUSL C libraries. For
283 programs linked against MUSL, this new internal support provides
284 new debug functionality, allowing access to TLS variables, due to
285 the fact that MUSL does not implement the libthread_db library.
286 Internal TLS support is also useful in cross-debugging
287 situations, debugging statically linked binaries, and debugging
288 programs linked against GLIBC 2.33 and earlier, but which are not
289 linked against libpthread.
291 ** The command 'maint set force-internal-tls-address-lookup on' may
292 be used to force the internal TLS lookup mechanisms to be used.
293 Otherwise, TLS lookup via libthread_db will still be preferred,
298 ** GDB no longer supports Python versions less than 3.4.
300 ** New class gdb.Color for dealing with colors.
302 ** New constant gdb.PARAM_COLOR represents color type of a
303 gdb.Parameter.value. Parameter's value is gdb.Color instance.
305 ** The memory_source argument (the second argument) has been removed
306 from gdb.disassembler.builtin_disassemble. This argument was
307 never used by GDB, and was added by mistake. The unused argument
308 was never documented in the GDB manual, so users should not have
311 ** gdb.execute has an additional 'styling' argument. When True, then
312 output will be styled. The default for this argument is True
313 when output is going to standard output, and False when output is
316 ** Setting the documentation string (__doc__) of a gdb.Parameter
317 sub-class to the empty string, means GDB will only display the
318 set_doc or show_doc strings in the set/show help output.
320 ** New gdb.ParameterPrefix class. This can be used to create 'set'
321 and 'show' gdb.Command prefixes, suitable for use with new
324 ** Prefix commands (gdb.Command sub-classes) that don't have an
325 invoke method will now behave like builtin prefix commands when
326 invoked without a sub-command name. This means printing the help
327 text for all sub-commands, unless the prefix command is a 'show'
328 command, in which case the value of all sub-commands is printed.
330 ** New gdb.warning() function that takes a string and prints it as a
331 warning, with GDB's standard 'warning' prefix.
333 ** New attribute gdb.Value.is_unavailable, this checks for
334 unavailability like gdb.Value.is_optimized_out checks for
335 optimized out values.
339 ** New type <gdb:color> for dealing with colors.
341 ** New constant PARAM_COLOR represents color type of a value
342 of a <gdb:parameter> object. Parameter's value is <gdb::color> instance.
344 ** Eliding the #:doc string from make-parameter now means that GDB
345 will use a default documentation string. Setting #:doc to the
346 empty string for make-parameter means GDB will only display the
347 #:set_doc or #:show_doc strings in the set/show help output.
349 ** Prefix commands (using make-command) that don't have a #:invoke
350 property will now behave like builtin prefix commands when
351 invoked without a sub-command name. This means printing the help
352 text for all sub-commands, unless the prefix command is a 'show'
353 command, in which case the value of all sub-commands is printed.
357 binary-upload in qSupported reply
358 If the stub sends back 'binary-upload+' in it's qSupported reply,
359 then GDB will, where possible, make use of the 'x' packet. If the
360 stub doesn't report this feature supported, then GDB will not use
364 Return information about files on the remote system. Like
365 vFile:stat but if the filename is a symbolic link, return
366 information about the link itself, the file the link refers to.
368 * Changed remote packets
371 The XML that is sent as a response can now include an "id_str"
372 attribute for a thread element. The attribute indicates what GDB
373 should print as the target ID of the thread, for example in the
374 "info threads" command or when switching to the thread.
377 Previously, gdbserver incorrectly implemented this packet using
378 lstat rather than stat. This has now been corrected. The
379 documentation has also been clarified.
382 The signal stop packet can now include multiple 'watch', 'rwatch',
383 and 'awatch' stop reason entries. GDB will select between all of
384 the possible watchpoint addresses that are returned when presenting
385 the stop to the user.
387 multi-wp-addr in qSupported
388 The qSupported packet allows GDB to inform the stub it supports
389 receiving multiple watchpoint stop reasons in a single 'T' stop
390 reply packet. This improves support for targets with ambiguous
391 hardware watchpoint address reporting (e.g. AArch64). GDB will
392 always accept multiple watchpoint addresses regardless of whether
393 the stub claims to support this feature or not.
397 ** The =library-unloaded event now includes the 'ranges' field, which
398 has the same meaning as for the =library-loaded event.
400 ** The =library-unloaded event now includes the 'still-in-use' field.
401 This field is 'true' when a library is unloaded (removed from the
402 inferior's list of loaded libraries), but the mapping within the
403 inferior's address space is retained, as the library was mapped
404 multiple times, and the same mapping was being reused. In all
405 other cases, this field will have the value 'false'.
407 * Support for stabs debugging format and the a.out/dbx object format is
408 deprecated, and will be removed in GDB 18.
412 --enable-binary-file-formats=[FORMAT,...]
413 --enable-binary-file-formats=all
414 A user can now decide to only compile support for certain file formats.
415 The available formats at this point are: dbx, coff, xcoff, elf, mach-o
416 and mips. Some targets require specific file formats to be available,
417 and in such cases, the configure script will warn the user and add
418 support anyway. By default, all formats will be compiled in, to
419 continue the behavior from before adding the switch.
421 * A new configure option was added, allowing support for the compile
422 subsystem to be disabled at configure time, in the form of
423 --disable-gdb-compile.
425 * A new configure option was added, allowing support for DWARF debug
426 information to be disabled at configure time. The flag is
427 --disable-gdb-dwarf-support.
429 * A new configure option was added, allowing support for mdebug/ecoff
430 debug information to be disabled at configure time. The flag to do
431 that is --disable-gdb-mdebug-support.
433 * The Alpha target now supports target descriptions.
435 *** Changes in GDB 16
437 * Support for Nios II targets has been removed as this architecture
438 has been EOL'ed by Intel.
440 * GDB now supports watchpoints for tagged data pointers (see
441 https://en.wikipedia.org/wiki/Tagged_pointer) on amd64, such as the
442 one used by the Linear Address Masking (LAM) feature provided by
445 * Debugging support for Intel MPX has been removed. This includes the
447 ** MPX register support
448 ** the commands "show/set mpx bound" (deprecated since GDB 15)
449 ** i386 and amd64 implementation of the hooks report_signal_info and
452 * GDB now supports printing of asynchronous events from the Intel Processor
453 Trace during 'record instruction-history', 'record function-call-history'
454 and all stepping commands. This can be controlled with the new
455 "set record btrace pt event-tracing" command.
457 * GDB now supports printing of ptwrite payloads from the Intel Processor
458 Trace during 'record instruction-history', 'record function-call-history'
459 and all stepping commands. The payload is also accessible in Python as a
460 RecordAuxiliary object. Printing is customizable via a ptwrite filter
461 function in Python. By default, the raw ptwrite payload is printed for
462 each ptwrite that is encountered.
464 * For breakpoints that are created in the 'pending' state, any
465 'thread' or 'task' keywords are parsed at the time the breakpoint is
466 created, rather than at the time the breakpoint becomes non-pending.
468 * Thread-specific breakpoints are only inserted into the program space
469 in which the thread of interest is running. In most cases program
470 spaces are unique for each inferior, so this means that
471 thread-specific breakpoints will usually only be inserted for the
472 inferior containing the thread of interest. The breakpoint will
473 be hit no less than before.
475 * For ARM targets, the offset of the pc in the jmp_buf has been fixed to match
476 glibc 2.20 and later. This should only matter when not using libc probes.
477 This may cause breakage when using an incompatible libc, like uclibc or
478 newlib, or an older glibc.
480 * MTE (Memory Tagging Extension) debugging is now supported on AArch64 baremetal
483 * Remove support (native and remote) for QNX Neutrino (triplet
486 * In a record session, when a forward emulation reaches the end of the reverse
487 history, the warning message has been changed to indicate that the end of the
488 history has been reached. It also specifies that the forward execution can
489 continue, and the recording will also continue.
491 * The Ada 'Object_Size attribute is now supported.
493 * Support for process record/replay and reverse debugging on loongarch*-linux*
494 targets has been added.
496 * New bash script gstack uses GDB to print stack traces of running processes.
500 ** Added gdb.record.clear. Clears the trace data of the current recording.
501 This forces re-decoding of the trace for successive commands.
503 ** Added the new event source gdb.tui_enabled.
505 ** New module gdb.missing_objfile that facilitates dealing with
506 missing objfiles when opening a core-file.
508 ** New function gdb.missing_objfile.register_handler that can
509 register an instance of a sub-class of
510 gdb.missing_debug.MissingObjfileHandler as a handler for missing
513 ** New class gdb.missing_objfile.MissingObjfileHandler which can be
514 sub-classed to create handlers for missing objfiles.
516 ** The 'signed' argument to gdb.Architecture.integer_type() will no
517 longer accept non-bool types.
519 ** The gdb.MICommand.installed property can only be set to True or
522 ** The 'qualified' argument to gdb.Breakpoint constructor will no
523 longer accept non-bool types.
525 ** Added the gdb.Symbol.is_artificial attribute.
527 ** Added gdb.Block.subblocks. Returns a list of blocks contained in that
530 ** Added gdb.Symbol.domain. Contains the domain of the symbol.
532 ** Added gdb.Architecture.void_type. Returns a gdb.Type representing "void"
533 type for that architecture.
535 * Debugger Adapter Protocol changes
537 ** The "scopes" request will now return a scope holding global
538 variables from the stack frame's compilation unit.
540 ** The "scopes" request will return a "returnValue" scope holding
541 the return value from the latest "stepOut" command, when
544 ** The "launch" and "attach" requests were rewritten in accordance
545 with some clarifications to the spec. Now they can be sent at
546 any time after the "initialized" event, but will not take effect
547 (or send a response) until after the "configurationDone" request
550 ** The "variables" request will not return artificial symbols.
554 show jit-reader-directory
555 Show the name of the directory that "jit-reader-load" uses for
558 set style line-number foreground COLOR
559 set style line-number background COLOR
560 set style line-number intensity VALUE
561 Control the styling of line numbers printed by GDB.
563 set style command foreground COLOR
564 set style command background COLOR
565 set style command intensity VALUE
566 Control the styling of GDB commands when displayed by GDB.
568 set style title foreground COLOR
569 set style title background COLOR
570 set style title intensity VALUE
571 This style now applies to the header line of lists, for example the
572 first line of the output of "info breakpoints". Previous uses of
573 this style have been replaced with the new "command" style.
575 set warn-language-frame-mismatch [on|off]
576 show warn-language-frame-mismatch
577 Control the warning that is emitted when specifying a language that
578 does not match the current frame's language.
580 maintenance info inline-frames [ADDRESS]
581 New command which displays GDB's inline-frame information for the
582 current address, or for ADDRESS if specified. The output identifies
583 inlined frames which start at the specified address.
585 maintenance info blocks [ADDRESS]
586 New command which displays information about all of the blocks at
587 ADDRESS, or at the current address if ADDRESS is not given. Blocks
588 are listed starting at the inner global block out to the most inner
591 maintenance frame-unwinder disable [-all | -name NAME | [-class] CLASS]
592 maintenance frame-unwinder enable [-all | -name NAME | [-class] CLASS]
593 Enable or disable frame unwinders. This is only meant to be used when
594 testing unwinders themselves, and you want to ensure that a fallback
595 algorithm won't obscure a regression. GDB is not expected to behave
596 well if you try to execute the inferior with unwinders disabled.
598 info missing-objfile-handlers
599 List all the registered missing-objfile handlers.
601 enable missing-objfile-handler LOCUS HANDLER
602 disable missing-objfile-handler LOCUS HANDLER
603 Enable or disable a missing-objfile handler with a name matching the
604 regular expression HANDLER, in LOCUS.
606 LOCUS can be 'global' to operate on global missing-objfile handler,
607 'progspace' to operate on handlers within the current program space,
608 or can be a regular expression which is matched against the filename
609 of the primary executable in each program space.
614 This command now supports file-name completion.
616 remove-symbol-file -a ADDRESS
617 The ADDRESS expression can now be a full expression consisting of
618 multiple terms, e.g. 'function + 0x1000' (without quotes),
619 previously only a single term could be given.
628 These commands now require their filename argument to be quoted if
629 it contains white space or quote characters. If the argument
630 contains no such special characters then quoting is not required.
632 maintenance print remote-registers
633 Add an "Expedited" column to the output of the command. It indicates
634 which registers were included in the last stop reply packet received by
637 maintenance info frame-unwinders
638 Add a CLASS column to the output. This class is a somewhat arbitrary
639 grouping of unwinders, based on which area of GDB adds the unwinder.
640 Also add an ENABLED column, that will show if the unwinder is enabled
643 maintenance set dwarf unwinders (on|off)
644 This command has been removed because the same functionality can be
645 achieved with maint frame-unwinder (enable|disable) DEBUGINFO.
647 maintenance show dwarf unwinders
648 This command has been removed since the functionality can be achieved
649 by checking the last column of maint info frame-unwinders.
652 Now includes the version of GNU Readline library that GDB is using.
657 Return information about files on the remote system. Like
658 vFile:fstat but takes a filename rather than an open file
662 Given ADDR and LENGTH, fetch LENGTH units from the memory at address
663 ADDR and send the fetched data in binary format. This packet is
664 equivalent to 'm', except that the data in the response are in
667 *** Changes in GDB 15
669 * The MPX commands "show/set mpx bound" have been deprecated, as Intel
670 listed MPX as removed in 2019.
672 * Building GDB and GDBserver now requires a C++17 compiler.
673 For example, GCC 9 or later.
675 * GDB index now contains information about the main function. This speeds up
676 startup when it is being used for some large binaries.
678 * On hosts where threading is available, DWARF reading is now done in
679 the background, resulting in faster startup. This can be controlled
680 using "maint set dwarf synchronous".
685 Attempting to use both the 'r' and 'b' flags with the disassemble
686 command will now give an error. Previously the 'b' flag would
687 always override the 'r' flag.
691 GDB now generates sparse core files, on systems that support it.
693 maintenance info line-table
694 Add an EPILOGUE-BEGIN column to the output of the command. It indicates
695 if the line is considered the start of the epilogue, and thus a point at
696 which the frame can be considered destroyed.
698 set unwindonsignal on|off
700 These commands are now aliases for the new set/show unwind-on-signal.
703 This command now gives an error if any unexpected arguments are
704 found after the command.
707 When using the command "list ." in a location that has no debug information
708 or no file loaded, GDB now says that there is no debug information to print
709 lines. This makes it more obvious that there is no information, as opposed
710 to implying there is no inferior loaded.
714 info missing-debug-handler
715 List all the registered missing debug handlers.
717 enable missing-debug-handler LOCUS HANDLER
718 disable missing-debug-handler LOCUS HANDLER
719 Enable or disable a missing debug handler with a name matching the
720 regular expression HANDLER, in LOCUS.
722 LOCUS can be 'global' to operate on global missing debug handler,
723 'progspace' to operate on handlers within the current program space,
724 or can be a regular expression which is matched against the filename
725 of the primary executable in each program space.
727 maintenance info linux-lwps
728 List all LWPs under control of the linux-nat target.
730 set remote thread-options-packet
731 show remote thread-options-packet
732 Set/show the use of the thread options packet.
734 set direct-call-timeout SECONDS
735 show direct-call-timeout
736 set indirect-call-timeout SECONDS
737 show indirect-call-timeout
738 These new settings can be used to limit how long GDB will wait for
739 an inferior function call to complete. The direct timeout is used
740 for inferior function calls from e.g. 'call' and 'print' commands,
741 while the indirect timeout is used for inferior function calls from
742 within a conditional breakpoint expression.
744 The default for the direct timeout is unlimited, while the default
745 for the indirect timeout is 30 seconds.
747 These timeouts will only have an effect for targets that are
748 operating in async mode. For non-async targets the timeouts are
749 ignored, GDB will wait indefinitely for an inferior function to
750 complete, unless interrupted by the user using Ctrl-C.
752 set unwind-on-timeout on|off
753 show unwind-on-timeout
754 These commands control whether GDB should unwind the stack when a
755 timeout occurs during an inferior function call. The default is
756 off, in which case the inferior will remain in the frame where the
757 timeout occurred. When on, GDB will unwind the stack removing the
758 dummy frame that was added for the inferior call, and restoring the
759 inferior state to how it was before the inferior call started.
761 set unwind-on-signal on|off
762 show unwind-on-signal
763 These new commands replaces the existing set/show unwindonsignal. The
764 old command is maintained as an alias.
766 * New features in the GDB remote stub, GDBserver
768 ** The --remote-debug and --event-loop-debug command line options
771 ** The --debug command line option now takes an optional comma
772 separated list of components to emit debug for. The currently
773 supported components are: all, threads, event-loop, and remote.
774 If no components are given then threads is assumed.
776 ** The 'monitor set remote-debug' and 'monitor set event-loop-debug'
777 command have been removed.
779 ** The 'monitor set debug 0|1' command has been extended to take a
780 component name, e.g.: 'monitor set debug COMPONENT off|on'.
781 Possible component names are: all, threads, event-loop, and
786 ** New function gdb.notify_mi(NAME, DATA), that emits custom
787 GDB/MI async notification.
789 ** New read/write attribute gdb.Value.bytes that contains a bytes
790 object holding the contents of this value.
792 ** New module gdb.missing_debug that facilitates dealing with
793 objfiles that are missing any debug information.
795 ** New function gdb.missing_debug.register_handler that can register
796 an instance of a sub-class of gdb.missing_debug.MissingDebugInfo
797 as a handler for objfiles that are missing debug information.
799 ** New class gdb.missing_debug.MissingDebugInfo which can be
800 sub-classed to create handlers for objfiles with missing debug
803 ** Stop events now have a "details" attribute that holds a
804 dictionary that carries the same information as an MI "*stopped"
807 ** New function gdb.interrupt(), that interrupts GDB as if the user
810 ** New gdb.InferiorThread.ptid_string attribute. This read-only
811 attribute contains the string that appears in the 'Target Id'
812 column of the 'info threads' command output.
814 ** It is no longer possible to create new gdb.Progspace object using
815 'gdb.Progspace()', this will result in a TypeError. Progspace
816 objects can still be obtained through calling other API
817 functions, for example 'gdb.current_progspace()'.
819 ** User defined attributes can be added to a gdb.Inferior object,
820 these will be stored in the object's new Inferior.__dict__
823 ** User defined attributes can be added to a gdb.InferiorThread
824 object, these will be stored in the object's new
825 InferiorThread.__dict__ attribute.
827 ** New constants gdb.SYMBOL_TYPE_DOMAIN, gdb.SYMBOL_FUNCTION_DOMAIN,
828 and gdb.SEARCH_*_DOMAIN corresponding to all the existing symbol
829 domains. Symbol lookup can now search in multiple domains at
830 once, and can also narrowly search for just a type or function.
832 * Debugger Adapter Protocol changes
834 ** GDB now emits the "process" event.
836 ** GDB now supports the "cancel" request.
838 ** The "attach" request now supports specifying the program.
840 ** New command "set debug dap-log-level" controls DAP logging.
842 ** The "set debug dap-log-file" command is now documented. This
843 command was available in GDB 14 but not documented.
847 ** New constants SYMBOL_TYPE_DOMAIN, SYMBOL_FUNCTION_DOMAIN, and
848 SEARCH_*_DOMAIN corresponding to all the existing symbol domains.
849 Symbol lookup can now search in multiple domains at once, and can
850 also narrowly search for just a type or function.
854 New stop reason: clone
855 Indicates that a clone system call was executed.
858 Enable/disable optional event reporting, on a per-thread basis.
859 Currently supported options are GDB_THREAD_OPTION_CLONE, to enable
860 clone event reporting, and GDB_THREAD_OPTION_EXIT to enable thread
861 exit event reporting.
863 QThreadOptions in qSupported
864 The qSupported packet allows GDB to inform the stub it supports the
865 QThreadOptions packet, and the qSupported response can contain the
866 set of thread options the remote stub supports.
869 This new packet allows GDB to query the stub about a given address to check
870 if it is tagged or not. Many memory tagging-related GDB commands need to
871 perform this check before they read/write the allocation tag related to an
872 address. Currently, however, this is done through a 'vFile' request to read
873 the file /proc/<PID>/smaps and check if the address is in a region reported
874 as memory tagged. Since not all targets have a notion of what the smaps
875 file is about, this new packet provides a more generic way to perform such
878 *** Changes in GDB 14
880 * GDB now supports the AArch64 Scalable Matrix Extension 2 (SME2), which
881 includes a new 512 bit lookup table register named ZT0.
883 * GDB now supports the AArch64 Scalable Matrix Extension (SME), which includes
884 a new matrix register named ZA, a new thread register TPIDR2 and a new vector
885 length register SVG (streaming vector granule). GDB also supports tracking
886 ZA state across signal frames.
888 Some features are still under development or are dependent on ABI specs that
889 are still in alpha stage. For example, manual function calls with ZA state
890 don't have any special handling, and tracking of SVG changes based on
891 DWARF information is still not implemented, but there are plans to do so in
894 * GDB now recognizes the NO_COLOR environment variable and disables
895 styling according to the spec. See https://no-color.org/.
896 Styling can be re-enabled with "set style enabled on".
898 * The AArch64 'org.gnu.gdb.aarch64.pauth' Pointer Authentication feature string
899 has been deprecated in favor of the 'org.gnu.gdb.aarch64.pauth_v2' feature
902 * GDB now has some support for integer types larger than 64 bits.
904 * Removed targets and native configurations
906 GDB no longer supports AIX 4.x, AIX 5.x and AIX 6.x. The minimum supported
907 AIX version is now AIX 7.1.
909 * Multi-target feature configuration
911 GDB now supports the individual configuration of remote targets' feature
912 sets. Based on the current selection of a target, the commands 'set remote
913 <name>-packet (on|off|auto)' and 'show remote <name>-packet' can be used to
914 configure a target's feature packet and to display its configuration,
917 The individual packet sizes can be configured and shown using the commands
918 ** 'set remote memory-read-packet-size (number of bytes|fixed|limit)'
919 ** 'set remote memory-write-packet-size (number of bytes|fixed|limit)'
920 ** 'show remote memory-read-packet-size'
921 ** 'show remote memory-write-packet-size'.
923 The configuration of the packet itself, as well as the size of a memory-read
924 or memory-write packet applies to the currently selected target (if
925 available). If no target is selected, it applies to future remote
926 connections. Similarly, the show commands print the configuration of the
927 currently selected target. If no remote target is selected, the default
928 configuration for future connections is shown.
930 * GDB has initial built-in support for the Debugger Adapter Protocol.
931 This support requires that GDB be built with Python scripting
934 * For the break command, multiple uses of the 'thread' or 'task'
935 keywords will now give an error instead of just using the thread or
936 task id from the last instance of the keyword. E.g.:
937 break foo thread 1 thread 2
938 will now give an error rather than using 'thread 2'.
940 * For the watch command, multiple uses of the 'task' keyword will now
941 give an error instead of just using the task id from the last
942 instance of the keyword. E.g.:
943 watch my_var task 1 task 2
944 will now give an error rather than using 'task 2'. The 'thread'
945 keyword already gave an error when used multiple times with the
946 watch command, this remains unchanged.
948 * The 'set print elements' setting now helps when printing large arrays.
949 If an array would otherwise exceed max-value-size, but 'print elements'
950 is set such that the size of elements to print is less than or equal
951 to 'max-value-size', GDB will now still print the array, however only
952 'max-value-size' worth of data will be added into the value history.
954 * For both the break and watch commands, it is now invalid to use both
955 the 'thread' and 'task' keywords within the same command. For
956 example the following commands will now give an error:
957 break foo thread 1 task 1
958 watch var thread 2 task 3
960 * The printf command now accepts a '%V' output format which will
961 format an expression just as the 'print' command would. Print
962 options can be placed within '[...]' after the '%V' to modify how
963 the value is printed. E.g:
964 printf "%V", some_array
965 printf "%V[-array-indexes on]", some_array
966 will print the array without, or with array indexes included, just
967 as the array would be printed by the 'print' command. This
968 functionality is also available for dprintf when dprintf-style is
971 * When the printf command requires a string to be fetched from the
972 inferior, GDB now uses the existing 'max-value-size' setting to the
973 limit the memory allocated within GDB. The default 'max-value-size'
974 is 64k. To print longer strings you should increase
977 * The Ada 2022 Enum_Rep and Enum_Val attributes are now supported.
979 * The Ada 2022 target name symbol ('@') is now supported by the Ada
982 * The 'list' command now accepts '.' as an argument, which tells GDB to
983 print the location around the point of execution within the current frame.
984 If the inferior hasn't started yet, the command will print around the
985 beginning of the 'main' function.
987 * Using the 'list' command with no arguments in a situation where the
988 command would attempt to list past the end of the file now warns the
989 user that the end of file has been reached, refers the user to the
990 newly added '.' argument
992 * Breakpoints can now be inferior-specific. This is similar to the
993 existing thread-specific breakpoint support. Breakpoint conditions
994 can include the 'inferior' keyword followed by an inferior id (as
995 displayed in the 'info inferiors' output). It is invalid to use the
996 'inferior' keyword with either the 'thread' or 'task' keywords when
997 creating a breakpoint.
999 * New convenience function "$_shell", to execute a shell command and
1000 return the result. This lets you run shell commands in expressions.
1003 (gdb) p $_shell("true")
1005 (gdb) p $_shell("false")
1007 (gdb) break func if $_shell("some command") == 0
1011 --additional-debug-dirs=PATHs
1013 Provide a colon-separated list of additional directories to search for
1014 separate debug info. These directories are added to the default value of
1015 the 'debug-file-directory' GDB parameter.
1019 set debug breakpoint on|off
1020 show debug breakpoint
1021 Print additional debug messages about breakpoint insertion and removal.
1023 maintenance print record-instruction [ N ]
1024 Print the recorded information for a given instruction. If N is not given
1025 prints how GDB would undo the last instruction executed. If N is negative,
1026 prints how GDB would undo the N-th previous instruction, and if N is
1027 positive, it prints how GDB will redo the N-th following instruction.
1029 maintenance info frame-unwinders
1030 List the frame unwinders currently in effect, starting with the highest
1033 maintenance wait-for-index-cache
1034 Wait until all pending writes to the index cache have completed.
1036 set always-read-ctf on|off
1037 show always-read-ctf
1038 When off, CTF is only read if DWARF is not present. When on, CTF is
1039 read regardless of whether DWARF is present. Off by default.
1042 Get main symbol to identify entry point into program.
1044 set tui mouse-events [on|off]
1045 show tui mouse-events
1046 When on (default), mouse clicks control the TUI and can be accessed by
1047 Python extensions. When off, mouse clicks are handled by the terminal,
1048 enabling terminal-native text selection.
1052 ** MI version 1 has been removed.
1054 ** mi now reports 'no-history' as a stop reason when hitting the end of the
1055 reverse execution history.
1057 ** When creating a thread-specific breakpoint using the '-p' option,
1058 the -break-insert command would report the 'thread' field twice in
1059 the reply. The content of both fields was always identical. This
1060 has now been fixed; the 'thread' field will be reported just once
1061 for thread-specific breakpoints, or not at all for breakpoints
1062 without a thread restriction. The same is also true for the 'task'
1063 field of an Ada task-specific breakpoint.
1065 ** It is no longer possible to create a thread-specific breakpoint for
1066 a thread that doesn't exist using '-break-insert -p ID'. Creating
1067 breakpoints for non-existent threads is not allowed when using the
1068 CLI, that the MI allowed it was a long standing bug, which has now
1071 ** The '--simple-values' argument to the '-stack-list-arguments',
1072 '-stack-list-locals', '-stack-list-variables', and '-var-list-children'
1073 commands now takes reference types into account: that is, a value is now
1074 considered simple if it is neither an array, structure, or union, nor a
1075 reference to an array, structure, or union. (Previously all references were
1076 considered simple.) Support for this feature can be verified by using the
1077 '-list-features' command, which should contain "simple-values-ref-types".
1079 ** The -break-insert command now accepts a '-g thread-group-id' option
1080 to allow for the creation of inferior-specific breakpoints.
1082 ** The bkpt tuple, which appears in breakpoint-created notifications,
1083 and in the result of the -break-insert command can now include an
1084 optional 'inferior' field for both the main breakpoint, and each
1085 location, when the breakpoint is inferior-specific.
1089 ** gdb.ThreadExitedEvent added. Emits a ThreadEvent.
1091 ** The gdb.unwinder.Unwinder.name attribute is now read-only.
1093 ** The name argument passed to gdb.unwinder.Unwinder.__init__ must
1094 now be of type 'str' otherwise a TypeError will be raised.
1096 ** The gdb.unwinder.Unwinder.enabled attribute can now only accept
1097 values of type 'bool'. Changing this attribute will now
1098 invalidate GDB's frame-cache, which means GDB will need to
1099 rebuild its frame-cache when next required - either with, or
1100 without the particular unwinder, depending on how 'enabled' was
1103 ** New methods added to the gdb.PendingFrame class. These methods
1104 have the same behavior as the corresponding methods on
1105 gdb.Frame. The new methods are:
1107 - gdb.PendingFrame.name: Return the name for the frame's
1109 - gdb.PendingFrame.is_valid: Return True if the pending frame
1111 - gdb.PendingFrame.pc: Return the $pc register value for this
1113 - gdb.PendingFrame.language: Return a string containing the
1114 language for this frame, or None.
1115 - gdb.PendingFrame.find_sal: Return a gdb.Symtab_and_line
1116 object for the current location within the pending frame, or
1118 - gdb.PendingFrame.block: Return a gdb.Block for the current
1119 pending frame, or None.
1120 - gdb.PendingFrame.function: Return a gdb.Symbol for the
1121 current pending frame, or None.
1123 ** The frame-id passed to gdb.PendingFrame.create_unwind_info can
1124 now use either an integer or a gdb.Value object for each of its
1125 'sp', 'pc', and 'special' attributes.
1127 ** A new class gdb.unwinder.FrameId has been added. Instances of
1128 this class are constructed with 'sp' (stack-pointer) and 'pc'
1129 (program-counter) values, and can be used as the frame-id when
1130 calling gdb.PendingFrame.create_unwind_info.
1132 ** It is now no longer possible to sub-class the
1133 gdb.disassembler.DisassemblerResult type.
1135 ** The Disassembler API from the gdb.disassembler module has been
1136 extended to include styling support:
1138 - The DisassemblerResult class can now be initialized with a list
1139 of parts. Each part represents part of the disassembled
1140 instruction along with the associated style information. This
1141 list of parts can be accessed with the new
1142 DisassemblerResult.parts property.
1144 - New constants gdb.disassembler.STYLE_* representing all the
1145 different styles part of an instruction might have.
1147 - New methods DisassembleInfo.text_part and
1148 DisassembleInfo.address_part which are used to create the new
1149 styled parts of a disassembled instruction.
1151 - Changes are backwards compatible, the older API can still be
1152 used to disassemble instructions without styling.
1154 ** New function gdb.execute_mi(COMMAND, [ARG]...), that invokes a
1155 GDB/MI command and returns the output as a Python dictionary.
1157 ** New function gdb.block_signals(). This returns a context manager
1158 that blocks any signals that GDB needs to handle itself.
1160 ** New class gdb.Thread. This is a subclass of threading.Thread
1161 that calls gdb.block_signals in its "start" method.
1163 ** gdb.parse_and_eval now has a new "global_context" parameter.
1164 This can be used to request that the parse only examine global
1167 ** gdb.Inferior now has a new "arguments" attribute. This holds the
1168 command-line arguments to the inferior, if known.
1170 ** gdb.Inferior now has a new "main_name" attribute. This holds the
1171 name of the inferior's "main", if known.
1173 ** gdb.Inferior now has new methods "clear_env", "set_env", and
1174 "unset_env". These can be used to modify the inferior's
1175 environment before it is started.
1177 ** gdb.Value now has the 'assign' method.
1179 ** gdb.Value now has the 'to_array' method. This converts an
1180 array-like Value to an array.
1182 ** gdb.Progspace now has the new method "objfile_for_address". This
1183 returns the gdb.Objfile, if any, that covers a given address.
1185 ** gdb.Breakpoint now has an "inferior" attribute. If the
1186 Breakpoint object is inferior specific then this attribute holds
1187 the inferior-id (an integer). If the Breakpoint object is not
1188 inferior specific, then this field contains None. This field can
1191 ** gdb.Type now has the "is_array_like" and "is_string_like"
1192 methods. These reflect GDB's internal idea of whether a type
1193 might be array- or string-like, even if they do not have the
1194 corresponding type code.
1196 ** gdb.ValuePrinter is a new class that can be used as the base
1197 class for the result of applying a pretty-printer. As a base
1198 class, it signals to gdb that the printer may implement new
1199 pretty-printer methods.
1201 ** New attribute Progspace.symbol_file. This attribute holds the
1202 gdb.Objfile that corresponds to Progspace.filename (when
1203 Progspace.filename is not None), otherwise, this attribute is
1206 ** New attribute Progspace.executable_filename. This attribute
1207 holds a string containing a file name set by the "exec-file" or
1208 "file" commands, or None if no executable file is set. This
1209 isn't the exact string passed by the user to these commands; the
1210 file name will have been partially resolved to an absolute file
1213 ** A new executable_changed event registry is available. This event
1214 emits ExecutableChangedEvent objects, which have 'progspace' (a
1215 gdb.Progspace) and 'reload' (a Boolean) attributes. This event
1216 is emitted when gdb.Progspace.executable_filename changes.
1218 ** New event registries gdb.events.new_progspace and
1219 gdb.events.free_progspace, these emit NewProgspaceEvent and
1220 FreeProgspaceEvent event types respectively. Both of these event
1221 types have a single 'progspace' attribute, which is the
1222 gdb.Progspace that is either being added to GDB, or removed from
1225 ** gdb.LazyString now implements the __str__ method.
1227 ** New method gdb.Frame.static_link that returns the outer frame
1228 of a nested function frame.
1230 *** Changes in GDB 13
1232 * MI version 1 is deprecated, and will be removed in GDB 14.
1234 * GDB now supports dumping memory tag data for AArch64 MTE. It also supports
1235 reading memory tag data for AArch64 MTE from core files generated by
1236 the gcore command or the Linux kernel.
1238 When a process uses memory-mapped pages protected by memory tags (for
1239 example, AArch64 MTE), this additional information will be recorded in
1240 the core file in the event of a crash or if GDB generates a core file
1241 from the current process state. GDB will show this additional information
1242 automatically, or through one of the memory-tag subcommands.
1244 * Scheduler-locking and new threads
1246 When scheduler-locking is in effect, only the current thread may run
1247 when the inferior is resumed. However, previously, new threads
1248 created by the resumed thread would still be able to run free. Now,
1249 they are held stopped.
1251 * "info breakpoints" now displays enabled breakpoint locations of
1252 disabled breakpoints as in the "y-" state. For example:
1254 (gdb) info breakpoints
1255 Num Type Disp Enb Address What
1256 1 breakpoint keep n <MULTIPLE>
1257 1.1 y- 0x00000000000011b6 in ...
1258 1.2 y- 0x00000000000011c2 in ...
1259 1.3 n 0x00000000000011ce in ...
1261 * Support for Thread Local Storage (TLS) variables on FreeBSD arm and
1262 aarch64 architectures.
1264 * GDB now supports hardware watchpoints on FreeBSD/Aarch64.
1266 * Remove support for building against Python 2, it is now only possible to
1267 build GDB against Python 3.
1269 * DBX mode has been removed.
1271 * GDB now honours the DWARF prologue_end line-table entry flag the compiler can
1272 emit to indicate where a breakpoint should be placed to break in a function
1275 * Completion now also offers "NUMBER" for "set" commands that accept
1276 a numeric argument and the "unlimited" keyword. For example:
1278 (gdb) set width <TAB>
1283 (gdb) complete set width
1287 * Disassembler styling using libopcodes. GDB now supports
1288 disassembler styling using libopcodes. This is only available for
1289 some targets (currently x86 and RISC-V). For unsupported targets
1290 Python Pygments is still used. For supported targets, libopcodes
1291 styling is used by default.
1293 * The Windows native target now supports target async.
1295 * gdb now supports zstd compressed debug sections (ELFCOMPRESS_ZSTD) for ELF.
1297 * The format of 'disassemble /r' and 'record instruction-history /r'
1298 has changed. The instruction bytes could now be grouped together,
1299 and displayed in the endianness of the instruction. This is the
1300 same layout as used by GNU objdump when disassembling.
1302 There is now 'disassemble /b' and 'record instruction-history /b'
1303 which will always display the instructions bytes one at a time in
1304 memory order, that is, the byte at the lowest address first.
1306 For both /r and /b GDB is now better at using whitespace in order to
1307 align the disassembled instruction text.
1309 * The TUI no longer styles the source and assembly code highlighted by
1310 the current position indicator by default. You can however
1311 re-enable styling using the new "set style tui-current-position"
1314 * New convenience variable $_inferior_thread_count contains the number
1315 of live threads in the current inferior.
1317 * When a breakpoint with multiple code locations is hit, GDB now prints
1318 the code location using the syntax <breakpoint_number>.<location_number>
1320 Thread 1 "zeoes" hit Breakpoint 2.3, some_func () at zeoes.c:8
1322 * When a breakpoint is hit, GDB now sets the convenience variables $_hit_bpnum
1323 and $_hit_locno to the hit breakpoint number and code location number.
1324 This allows to disable the last hit breakpoint using
1325 (gdb) disable $_hit_bpnum
1326 or disable only the specific breakpoint code location using
1327 (gdb) disable $_hit_bpnum.$_hit_locno
1328 These commands can be used inside the command list of a breakpoint to
1329 automatically disable the just encountered breakpoint (or the just
1330 encountered specific breakpoint code location).
1331 When a breakpoint has only one location, $_hit_locno is set to 1 so that
1332 (gdb) disable $_hit_bpnum.$_hit_locno
1334 (gdb) disable $_hit_bpnum
1335 are both disabling the breakpoint.
1339 maintenance set ignore-prologue-end-flag on|off
1340 maintenance show ignore-prologue-end-flag
1341 This setting, which is off by default, controls whether GDB ignores the
1342 PROLOGUE-END flag from the line-table when skipping prologue. This can be
1343 used to force GDB to use prologue analyzers if the line-table is constructed
1344 from erroneous debug information.
1346 set print nibbles [on|off]
1348 This controls whether the 'print/t' command will display binary values
1349 in groups of four bits, known as "nibbles". The default is 'off'.
1351 maintenance set libopcodes-styling on|off
1352 maintenance show libopcodes-styling
1353 These can be used to force off libopcodes based styling, the Python
1354 Pygments styling will then be used instead.
1356 set style disassembler comment
1357 show style disassembler comment
1358 set style disassembler immediate
1359 show style disassembler immediate
1360 set style disassembler mnemonic
1361 show style disassembler mnemonic
1362 set style disassembler register
1363 show style disassembler register
1364 set style disassembler address
1365 show style disassembler address
1366 set style disassembler symbol
1367 show style disassembler symbol
1368 For targets that support libopcodes based styling, these settings
1369 control how various aspects of the disassembler output are styled.
1370 The 'disassembler address' and 'disassembler symbol' styles are
1371 aliases for the 'address' and 'function' styles respectively.
1373 maintenance print frame-id [ LEVEL ]
1374 Print GDB's internal frame-id for the frame at LEVEL. If LEVEL is
1375 not given, then print the frame-id for the currently selected frame.
1377 set debug infcall on|off
1379 Print additional debug messages about inferior function calls.
1381 set debug solib on|off
1383 Print additional debug messages about shared library handling.
1385 set style tui-current-position [on|off]
1386 Whether to style the source and assembly code highlighted by the
1387 TUI's current position indicator. The default is off.
1389 set print characters LIMIT
1390 show print characters
1391 This new setting is like 'set print elements', but controls how many
1392 characters of a string are printed. This functionality used to be
1393 covered by 'set print elements', but it can be controlled separately
1394 now. LIMIT can be set to a numerical value to request that particular
1395 character count, to 'unlimited' to print all characters of a string,
1396 or to 'elements', which is also the default, to follow the setting of
1397 'set print elements' as it used to be.
1399 print -characters LIMIT
1400 This new option to the 'print' command has the same effect as a temporary
1401 use of 'set print characters'.
1405 document user-defined
1406 It is now possible to document user-defined aliases.
1407 When a user-defined alias is documented, the help and apropos commands
1408 use the provided documentation instead of the documentation of the
1410 Documenting a user-defined alias is particularly useful when the alias
1411 is a set of nested 'with' commands to avoid showing the help of
1412 the with command for an alias that will in fact launch the
1413 last command given in the nested commands.
1415 maintenance info line-table
1416 Add a PROLOGUE-END column to the output which indicates that an
1417 entry corresponds to an address where a breakpoint should be placed
1418 to be at the first instruction past a function's prologue.
1422 set debug aix-solib on|off
1423 show debug aix-solib
1424 set debug solib-frv on|off
1425 show debug solib-frv
1426 Removed in favor of "set/show debug solib".
1428 maintenance info program-spaces
1429 This command now includes a 'Core File' column which indicates the
1430 name of the core file associated with each program space.
1434 GNU/Linux/LoongArch (gdbserver) loongarch*-*-linux*
1436 GNU/Linux/CSKY (gdbserver) csky*-*linux*
1442 ** The async record stating the stopped reason 'breakpoint-hit' now
1443 contains an optional field locno giving the code location number
1444 when the breakpoint has multiple code locations.
1448 ** GDB will now reformat the doc string for gdb.Command and
1449 gdb.Parameter sub-classes to remove unnecessary leading
1450 whitespace from each line before using the string as the help
1453 ** New function gdb.format_address(ADDRESS, PROGSPACE, ARCHITECTURE),
1454 that formats ADDRESS as 'address <symbol+offset>', where symbol is
1455 looked up in PROGSPACE, and ARCHITECTURE is used to format address.
1456 This is the same format that GDB uses when printing address, symbol,
1457 and offset information from the disassembler.
1459 ** New function gdb.current_language that returns the name of the
1460 current language. Unlike gdb.parameter('language'), this will
1461 never return 'auto'.
1463 ** New method gdb.Frame.language that returns the name of the
1466 ** New Python API for wrapping GDB's disassembler:
1468 - gdb.disassembler.register_disassembler(DISASSEMBLER, ARCH).
1469 DISASSEMBLER is a sub-class of gdb.disassembler.Disassembler.
1470 ARCH is either None or a string containing a bfd architecture
1471 name. DISASSEMBLER is registered as a disassembler for
1472 architecture ARCH, or for all architectures if ARCH is None.
1473 The previous disassembler registered for ARCH is returned, this
1474 can be None if no previous disassembler was registered.
1476 - gdb.disassembler.Disassembler is the class from which all
1477 disassemblers should inherit. Its constructor takes a string,
1478 a name for the disassembler, which is currently only used in
1479 some debug output. Sub-classes should override the __call__
1480 method to perform disassembly, invoking __call__ on this base
1481 class will raise an exception.
1483 - gdb.disassembler.DisassembleInfo is the class used to describe
1484 a single disassembly request from GDB. An instance of this
1485 class is passed to the __call__ method of
1486 gdb.disassembler.Disassembler and has the following read-only
1487 attributes: 'address', and 'architecture', as well as the
1488 following method: 'read_memory'.
1490 - gdb.disassembler.builtin_disassemble(INFO, MEMORY_SOURCE),
1491 calls GDB's builtin disassembler on INFO, which is a
1492 gdb.disassembler.DisassembleInfo object. MEMORY_SOURCE is
1493 optional, its default value is None. If MEMORY_SOURCE is not
1494 None then it must be an object that has a 'read_memory' method.
1496 - gdb.disassembler.DisassemblerResult is a class that can be used
1497 to wrap the result of a call to a Disassembler. It has
1498 read-only attributes 'length' and 'string'.
1500 ** gdb.Objfile now has an attribute named "is_file". This is True
1501 if the objfile comes from a file, and False otherwise.
1503 ** New function gdb.print_options that returns a dictionary of the
1504 prevailing print options, in the form accepted by
1505 gdb.Value.format_string.
1507 ** gdb.Value.format_string now uses the format provided by 'print',
1508 if it is called during a 'print' or other similar operation.
1510 ** gdb.Value.format_string now accepts the 'summary' keyword. This
1511 can be used to request a shorter representation of a value, the
1512 way that 'set print frame-arguments scalars' does.
1514 ** New Python type gdb.BreakpointLocation.
1515 The new attribute 'locations' of gdb.Breakpoint returns a list of
1516 gdb.BreakpointLocation objects specifying the locations where the
1517 breakpoint is inserted into the debuggee.
1519 ** The gdb.register_window_type method now restricts the set of
1520 acceptable window names. The first character of a window's name
1521 must start with a character in the set [a-zA-Z], every subsequent
1522 character of a window's name must be in the set [-_.a-zA-Z0-9].
1524 * New features in the GDB remote stub, GDBserver
1526 ** GDBserver is now supported on LoongArch GNU/Linux.
1528 ** GDBserver is now supported on CSKY GNU/Linux.
1530 * LoongArch floating-point support
1532 GDB now supports floating-point on LoongArch GNU/Linux.
1534 * AMD GPU ROCm debugging support
1536 GDB now supports debugging programs offloaded to AMD GPUs using the ROCm
1539 *** Changes in GDB 12
1541 * DBX mode is deprecated, and will be removed in GDB 13
1543 * GDB 12 is the last release of GDB that will support building against
1544 Python 2. From GDB 13, it will only be possible to build GDB itself
1545 with Python 3 support.
1547 * The disable-randomization setting now works on Windows.
1549 * Improved C++ template support
1551 GDB now treats functions/types involving C++ templates like it does function
1552 overloads. Users may omit parameter lists to set breakpoints on families of
1553 template functions, including types/functions composed of multiple template types:
1555 (gdb) break template_func(template_1, int)
1557 The above will set breakpoints at every function `template_func' where
1558 the first function parameter is any template type named `template_1' and
1559 the second function parameter is `int'.
1561 TAB completion also gains similar improvements.
1563 * The FreeBSD native target now supports async mode.
1569 Enable or disable multithreaded symbol loading. This is enabled
1570 by default, but passing --disable-threading or --enable-threading=no
1571 to configure will disable it.
1573 Disabling this can cause a performance penalty when there are a lot of
1574 symbols to load, but is useful for debugging purposes.
1578 maint set backtrace-on-fatal-signal on|off
1579 maint show backtrace-on-fatal-signal
1580 This setting is 'on' by default. When 'on' GDB will print a limited
1581 backtrace to stderr in the situation where GDB terminates with a
1582 fatal signal. This only supported on some platforms where the
1583 backtrace and backtrace_symbols_fd functions are available.
1585 set source open on|off
1587 This setting, which is on by default, controls whether GDB will try
1588 to open source code files. Switching this off will stop GDB trying
1589 to open and read source code files, which can be useful if the files
1590 are located over a slow network connection.
1594 These are now deprecated aliases for "set max-value-size" and
1595 "show max-value-size".
1597 task apply [all | TASK-IDS...] [FLAG]... COMMAND
1598 Like "thread apply", but applies COMMAND to Ada tasks.
1601 Watchpoints can now be restricted to a specific Ada task.
1603 maint set internal-error backtrace on|off
1604 maint show internal-error backtrace
1605 maint set internal-warning backtrace on|off
1606 maint show internal-warning backtrace
1607 GDB can now print a backtrace of itself when it encounters either an
1608 internal-error, or an internal-warning. This is on by default for
1609 internal-error and off by default for internal-warning.
1612 Deprecated and replaced by "set logging enabled on|off".
1614 set logging enabled on|off
1615 show logging enabled
1616 These commands set or show whether logging is enabled or disabled.
1619 You can now exit GDB by using the new command "exit", in addition to
1620 the existing "quit" command.
1622 set debug threads on|off
1624 Print additional debug messages about thread creation and deletion.
1626 set debug linux-nat on|off
1627 show debug linux-nat
1628 These new commands replaced the old 'set debug lin-lwp' and 'show
1629 debug lin-lwp' respectively. Turning this setting on prints debug
1630 messages relating to GDB's handling of native Linux inferiors.
1632 maint flush source-cache
1633 Flush the contents of the source code cache.
1635 maint set gnu-source-highlight enabled on|off
1636 maint show gnu-source-highlight enabled
1637 Whether GDB should use the GNU Source Highlight library for adding
1638 styling to source code. When off, the library will not be used, even
1639 when available. When GNU Source Highlight isn't used, or can't add
1640 styling to a particular source file, then the Python Pygments
1641 library will be used instead.
1643 set suppress-cli-notifications (on|off)
1644 show suppress-cli-notifications
1645 This controls whether printing the notifications is suppressed for CLI.
1646 CLI notifications occur when you change the selected context
1647 (i.e., the current inferior, thread and/or the frame), or when
1648 the program being debugged stops (e.g., because of hitting a
1649 breakpoint, completing source-stepping, an interrupt, etc.).
1651 set style disassembler enabled on|off
1652 show style disassembler enabled
1653 If GDB is compiled with Python support, and the Python Pygments
1654 package is available, then, when this setting is on, disassembler
1655 output will have styling applied.
1657 set ada source-charset
1658 show ada source-charset
1659 Set the character set encoding that is assumed for Ada symbols. Valid
1660 values for this follow the values that can be passed to the GNAT
1661 compiler via the '-gnati' option. The default is ISO-8859-1.
1667 These are the new names for the old 'layout', 'focus', 'refresh',
1668 and 'winheight' tui commands respectively. The old names still
1669 exist as aliases to these new commands.
1673 The new command 'tui window width', and the alias 'winwidth' allow
1674 the width of a tui window to be adjusted when windows are laid out
1677 set debug tui on|off
1679 Control the display of debug output about GDB's tui.
1684 Printing of floating-point values with base-modifying formats like
1685 /x has been changed to display the underlying bytes of the value in
1686 the desired base. This was GDB's documented behavior, but was never
1687 implemented correctly.
1690 This command can now print a reply, if the reply includes
1691 non-printable characters. Any non-printable characters are printed
1692 as escaped hex, e.g. \x?? where '??' is replaces with the value of
1693 the non-printable character.
1696 The clone-inferior command now ensures that the TTY, CMD and ARGS
1697 settings are copied from the original inferior to the new one.
1698 All modifications to the environment variables done using the 'set
1699 environment' or 'unset environment' commands are also copied to the new
1702 set debug lin-lwp on|off
1704 These commands have been removed from GDB. The new command 'set
1705 debug linux-nat' and 'show debug linux-nat' should be used
1709 This command now includes information about the width of the tui
1710 windows in its output.
1716 These commands are now aliases for the 'tui layout', 'tui focus',
1717 'tui refresh', and 'tui window height' commands respectively.
1719 * GDB's Ada parser now supports an extension for specifying the exact
1720 byte contents of a floating-point literal. This can be useful for
1721 setting floating-point registers to a precise value without loss of
1722 precision. The syntax is an extension of the based literal syntax.
1723 Use, e.g., "16lf#0123abcd#" -- the number of "l"s controls the width
1724 of the floating-point type, and the "f" is the marker for floating
1729 ** The '-add-inferior' with no option flags now inherits the
1730 connection of the current inferior, this restores the behavior of
1731 GDB as it was prior to GDB 10.
1733 ** The '-add-inferior' command now accepts a '--no-connection'
1734 option, which causes the new inferior to start without a
1737 ** The default version of the MI interpreter is now 4 (-i=mi4).
1739 ** The "script" field in breakpoint output (which is syntactically
1740 incorrect in MI 3 and below) has changed in MI 4 to become a list.
1741 This affects the following commands and events:
1745 - =breakpoint-created
1746 - =breakpoint-modified
1748 The -fix-breakpoint-script-output command can be used to enable
1749 this behavior with previous MI versions.
1753 GNU/Linux/LoongArch loongarch*-*-linux*
1761 ** New function gdb.add_history(), which takes a gdb.Value object
1762 and adds the value it represents to GDB's history list. An
1763 integer, the index of the new item in the history list, is
1766 ** New function gdb.history_count(), which returns the number of
1767 values in GDB's value history.
1769 ** New gdb.events.gdb_exiting event. This event is called with a
1770 gdb.GdbExitingEvent object which has the read-only attribute
1771 'exit_code', which contains the value of the GDB exit code. This
1772 event is triggered once GDB decides it is going to exit, but
1773 before GDB starts to clean up its internal state.
1775 ** New function gdb.architecture_names(), which returns a list
1776 containing all of the possible Architecture.name() values. Each
1779 ** New function gdb.Architecture.integer_type(), which returns an
1780 integer type given a size and a signed-ness.
1782 ** New gdb.TargetConnection object type that represents a connection
1783 (as displayed by the 'info connections' command). A sub-class,
1784 gdb.RemoteTargetConnection, is used to represent 'remote' and
1785 'extended-remote' connections.
1787 ** The gdb.Inferior type now has a 'connection' property which is an
1788 instance of gdb.TargetConnection, the connection used by this
1789 inferior. This can be None if the inferior has no connection.
1791 ** New 'gdb.events.connection_removed' event registry, which emits a
1792 'gdb.ConnectionEvent' when a connection is removed from GDB.
1793 This event has a 'connection' property, a gdb.TargetConnection
1794 object for the connection being removed.
1796 ** New gdb.connections() function that returns a list of all
1797 currently active connections.
1799 ** New gdb.RemoteTargetConnection.send_packet(PACKET) method. This
1800 is equivalent to the existing 'maint packet' CLI command; it
1801 allows a user specified packet to be sent to the remote target.
1803 ** New function gdb.host_charset(), returns a string, which is the
1804 name of the current host charset.
1806 ** New gdb.set_parameter(NAME, VALUE). This sets the gdb parameter
1809 ** New gdb.with_parameter(NAME, VALUE). This returns a context
1810 manager that temporarily sets the gdb parameter NAME to VALUE,
1811 then resets it when the context is exited.
1813 ** The gdb.Value.format_string method now takes a 'styling'
1814 argument, which is a boolean. When true, the returned string can
1815 include escape sequences to apply styling. The styling will only
1816 be present if styling is otherwise turned on in GDB (see 'help
1817 set styling'). When false, which is the default if the argument
1818 is not given, then no styling is applied to the returned string.
1820 ** New read-only attribute gdb.InferiorThread.details, which is
1821 either a string, containing additional, target specific thread
1822 state information, or None, if there is no such additional
1825 ** New read-only attribute gdb.Type.is_scalar, which is True for
1826 scalar types, and False for all other types.
1828 ** New read-only attribute gdb.Type.is_signed. This attribute
1829 should only be read when Type.is_scalar is True, and will be True
1830 for signed types, and False for all other types. Attempting to
1831 read this attribute for non-scalar types will raise a ValueError.
1833 ** It is now possible to add GDB/MI commands implemented in Python.
1835 * New features in the GDB remote stub, GDBserver
1837 ** GDBserver is now supported on OpenRISC GNU/Linux.
1839 * New native configurations
1841 GNU/Linux/OpenRISC or1k*-*-linux*
1843 *** Changes in GDB 11
1845 * The 'set disassembler-options' command now supports specifying options
1848 * GDB now supports general memory tagging functionality if the underlying
1849 architecture supports the proper primitives and hooks. Currently this is
1850 enabled only for AArch64 MTE.
1854 - Additional information when the inferior crashes with a SIGSEGV caused by
1855 a memory tag violation.
1857 - A new modifier 'm' for the "x" command, which displays allocation tags for a
1858 particular memory range.
1860 - Display of memory tag mismatches by "print", for addresses and
1861 pointers, if memory tagging is supported by the architecture.
1863 * Building GDB now requires GMP (The GNU Multiple Precision Arithmetic
1868 ** '-break-insert --qualified' and '-dprintf-insert --qualified'
1870 The MI -break-insert and -dprintf-insert commands now support a
1871 new "--qualified" option that makes GDB interpret a specified
1872 function name as a complete fully-qualified name. This is the
1873 equivalent of the CLI's "break -qualified" and "dprintf
1876 ** '-break-insert --force-condition' and '-dprintf-insert --force-condition'
1878 The MI -break-insert and -dprintf-insert commands now support a
1879 '--force-condition' flag to forcibly define a condition even when
1880 the condition is invalid at all locations of the breakpoint. This
1881 is equivalent to the '-force-condition' flag of the CLI's "break"
1884 ** '-break-condition --force'
1886 The MI -break-condition command now supports a '--force' flag to
1887 forcibly define a condition even when the condition is invalid at
1888 all locations of the selected breakpoint. This is equivalent to
1889 the '-force' flag of the CLI's "cond" command.
1891 ** '-file-list-exec-source-files [--group-by-objfile]
1892 [--basename | --dirname]
1895 The existing -file-list-exec-source-files command now takes an
1896 optional REGEXP which is used to filter the source files that are
1897 included in the results.
1899 By default REGEXP is matched against the full filename of the
1900 source file. When one of --basename or --dirname is given then
1901 REGEXP is only matched against the specified part of the full
1904 When the optional --group-by-objfile flag is used the output
1905 format is changed, the results are now a list of object files
1906 (executable and libraries) with the source files that are
1907 associated with each object file.
1909 The results from -file-list-exec-source-files now include a
1910 'debug-fully-read' field which takes the value 'true' or 'false'.
1911 A 'true' value indicates the source file is from a compilation
1912 unit that has had its debug information fully read in by GDB, a
1913 value of 'false' indicates GDB has only performed a partial scan
1914 of the debug information so far.
1916 * GDB now supports core file debugging for x86_64 Cygwin programs.
1918 * GDB will now look for the .gdbinit file in a config directory before
1919 looking for ~/.gdbinit. The file is searched for in the following
1920 locations: $XDG_CONFIG_HOME/gdb/gdbinit, $HOME/.config/gdb/gdbinit,
1921 $HOME/.gdbinit. On Apple hosts the search order is instead:
1922 $HOME/Library/Preferences/gdb/gdbinit, $HOME/.gdbinit.
1924 * GDB now supports fixed point types which are described in DWARF
1925 as base types with a fixed-point encoding. Additionally, support
1926 for the DW_AT_GNU_numerator and DW_AT_GNU_denominator has also
1929 For Ada, this allows support for fixed point types without requiring
1930 the use of the GNAT encoding (based on information added to the type's
1931 name following a GNAT-specific format).
1933 * GDB will now load and process commands from ~/.config/gdb/gdbearlyinit
1934 or ~/.gdbearlyinit if these files are present. These files are
1935 processed earlier than any of the other initialization files and
1936 can affect parts of GDB's startup that previously had already been
1937 completed before the initialization files were read, for example
1938 styling of the initial GDB greeting.
1940 * GDB now has two new options "--early-init-command" and
1941 "--early-init-eval-command" with corresponding short options "-eix"
1942 and "-eiex" that allow options (that would normally appear in a
1943 gdbearlyinit file) to be passed on the command line.
1945 * For RISC-V targets, the target feature "org.gnu.gdb.riscv.vector" is
1946 now understood by GDB, and can be used to describe the vector
1947 registers of a target. The precise requirements of this register
1948 feature are documented in the GDB manual.
1950 * For ARM targets, the "org.gnu.gdb.arm.m-profile-mve" feature is now
1951 supported by GDB and describes a new VPR register from the ARM MVE
1952 (Helium) extension. See the GDB manual for more information.
1956 ** TUI windows now support mouse actions. The mouse wheel scrolls
1957 the appropriate window.
1959 ** Key combinations that do not have a specific action on the
1960 focused window are passed to GDB. For example, you now can use
1961 Ctrl-Left/Ctrl-Right to move between words in the command window
1962 regardless of which window is in focus. Previously you would
1963 need to focus on the command window for such key combinations to
1968 set debug event-loop
1969 show debug event-loop
1970 Control the display of debug output about GDB's event loop.
1972 set print memory-tag-violations
1973 show print memory-tag-violations
1974 Control whether to display additional information about memory tag violations
1975 when printing pointers and addresses. Architecture support for memory
1976 tagging is required for this option to have an effect.
1978 maintenance flush symbol-cache
1979 maintenance flush register-cache
1980 These new commands are equivalent to the already existing commands
1981 'maintenance flush-symbol-cache' and 'flushregs' respectively.
1983 maintenance flush dcache
1984 A new command to flush the dcache.
1986 maintenance info target-sections
1987 Print GDB's internal target sections table.
1989 maintenance info jit
1990 Print the JIT code objects in the inferior known to GDB.
1992 memory-tag show-logical-tag POINTER
1993 Print the logical tag for POINTER.
1994 memory-tag with-logical-tag POINTER TAG
1995 Print POINTER with logical tag TAG.
1996 memory-tag show-allocation-tag ADDRESS
1997 Print the allocation tag for ADDRESS.
1998 memory-tag set-allocation-tag ADDRESS LENGTH TAGS
1999 Set the allocation tag for [ADDRESS, ADDRESS + LENGTH) to TAGS.
2000 memory-tag check POINTER
2001 Validate that POINTER's logical tag matches the allocation tag.
2003 set startup-quietly on|off
2004 show startup-quietly
2005 When 'on', this causes GDB to act as if "-silent" were passed on the
2006 command line. This command needs to be added to an early
2007 initialization file (e.g. ~/.config/gdb/gdbearlyinit) in order to
2010 set print type hex on|off
2012 When 'on', the 'ptype' command uses hexadecimal notation to print sizes
2013 and offsets of struct members. When 'off', decimal notation is used.
2015 set python ignore-environment on|off
2016 show python ignore-environment
2017 When 'on', this causes GDB's builtin Python to ignore any
2018 environment variables that would otherwise affect how Python
2019 behaves. This command needs to be added to an early initialization
2020 file (e.g. ~/.config/gdb/gdbearlyinit) in order to affect GDB.
2022 set python dont-write-bytecode auto|on|off
2023 show python dont-write-bytecode
2024 When 'on', this causes GDB's builtin Python to not write any
2025 byte-code (.pyc files) to disk. This command needs to be added to
2026 an early initialization file (e.g. ~/.config/gdb/gdbearlyinit) in
2027 order to affect GDB. When 'off' byte-code will always be written.
2028 When set to 'auto' (the default) Python will check the
2029 PYTHONDONTWRITEBYTECODE environment variable.
2033 break [PROBE_MODIFIER] [LOCATION] [thread THREADNUM]
2034 [-force-condition] [if CONDITION]
2035 This command would previously refuse setting a breakpoint if the
2036 CONDITION expression is invalid at a location. It now accepts and
2037 defines the breakpoint if there is at least one location at which
2038 the CONDITION is valid. The locations for which the CONDITION is
2039 invalid, are automatically disabled. If CONDITION is invalid at all
2040 of the locations, setting the breakpoint is still rejected. However,
2041 the '-force-condition' flag can be used in this case for forcing GDB to
2042 define the breakpoint, making all the current locations automatically
2043 disabled. This may be useful if the user knows the condition will
2044 become meaningful at a future location, e.g. due to a shared library
2047 condition [-force] N COND
2048 The behavior of this command is changed the same way for the 'break'
2049 command as explained above. The '-force' flag can be used to force
2050 GDB into defining the condition even when COND is invalid for all the
2051 current locations of breakpoint N.
2054 maintenance flush-symbol-cache
2055 These commands are deprecated in favor of the new commands
2056 'maintenance flush register-cache' and 'maintenance flush
2057 symbol-cache' respectively.
2059 set style version foreground COLOR
2060 set style version background COLOR
2061 set style version intensity VALUE
2062 Control the styling of GDB's version number text.
2065 When the ID parameter is omitted, then this command prints information
2066 about the current inferior. When the ID parameter is present, the
2067 behavior of the command is unchanged and have the inferior ID become
2068 the current inferior.
2070 maintenance info sections
2071 The ALLOBJ keyword has been replaced with an -all-objects command
2072 line flag. It is now possible to filter which sections are printed
2073 even when -all-objects is passed.
2075 ptype[/FLAGS] TYPE | EXPRESSION
2076 The 'ptype' command has two new flags. When '/x' is set, hexadecimal
2077 notation is used when printing sizes and offsets of struct members.
2078 When '/d' is set, decimal notation is used when printing sizes and
2079 offsets of struct members. Default behavior is given by 'show print
2083 The info sources command output has been restructured. The results
2084 are now based around a list of objfiles (executable and libraries),
2085 and for each objfile the source files that are part of that objfile
2088 * Removed targets and native configurations
2090 ARM Symbian arm*-*-symbianelf*
2092 * New remote packets
2095 Request the remote to send allocation tags for a particular memory range.
2097 Request the remote to store the specified allocation tags to the requested
2102 ** Improved support for rvalue reference values:
2103 TYPE_CODE_RVALUE_REF is now exported as part of the API and the
2104 value-referenced-value procedure now handles rvalue reference
2107 ** New procedures for obtaining value variants:
2108 value-reference-value, value-rvalue-reference-value and
2111 ** Temporary breakpoints can now be created with make-breakpoint and
2112 tested for using breakpoint-temporary?.
2116 ** Inferior objects now contain a read-only 'connection_num' attribute that
2117 gives the connection number as seen in 'info connections' and
2120 ** New method gdb.Frame.level() which returns the stack level of the
2123 ** New method gdb.PendingFrame.level() which returns the stack level
2124 of the frame object.
2126 ** When hitting a catchpoint, the Python API will now emit a
2127 gdb.BreakpointEvent rather than a gdb.StopEvent. The
2128 gdb.Breakpoint attached to the event will have type BP_CATCHPOINT.
2130 ** Python TUI windows can now receive mouse click events. If the
2131 Window object implements the click method, it is called for each
2132 mouse click event in this window.
2134 *** Changes in GDB 10
2136 * There are new feature names for ARC targets: "org.gnu.gdb.arc.core"
2137 and "org.gnu.gdb.arc.aux". The old names are still supported but
2138 must be considered obsolete. They will be deprecated after some
2141 * Help and apropos commands will now show the documentation of a
2142 command only once, even if that command has one or more aliases.
2143 These commands now show the command name, then all of its aliases,
2144 and finally the description of the command.
2146 * 'help aliases' now shows only the user defined aliases. GDB predefined
2147 aliases are shown together with their aliased command.
2149 * GDB now supports debuginfod, an HTTP server for distributing ELF/DWARF
2150 debugging information as well as source code.
2152 When built with debuginfod, GDB can automatically query debuginfod
2153 servers for the separate debug files and source code of the executable
2156 To build GDB with debuginfod, pass --with-debuginfod to configure (this
2157 requires libdebuginfod, the debuginfod client library).
2159 debuginfod is distributed with elfutils, starting with version 0.178.
2161 You can get the latest version from https://sourceware.org/elfutils.
2163 * Multi-target debugging support
2165 GDB now supports debugging multiple target connections
2166 simultaneously. For example, you can now have each inferior
2167 connected to different remote servers running in different machines,
2168 or have one inferior debugging a local native process, an inferior
2169 debugging a core dump, etc.
2171 This support is experimental and comes with some limitations -- you
2172 can only resume multiple targets simultaneously if all targets
2173 support non-stop mode, and all remote stubs or servers must support
2174 the same set of remote protocol features exactly. See also "info
2175 connections" and "add-inferior -no-connection" below, and "maint set
2176 target-non-stop" in the user manual.
2178 * New features in the GDB remote stub, GDBserver
2180 ** GDBserver is now supported on ARC GNU/Linux.
2182 ** GDBserver is now supported on RISC-V GNU/Linux.
2184 ** GDBserver no longer supports these host triplets:
2186 i[34567]86-*-lynxos*
2195 i[34567]86-*-mingw32ce*
2197 * Debugging MS-Windows processes now sets $_exitsignal when the
2198 inferior is terminated by a signal, instead of setting $_exitcode.
2200 * Multithreaded symbol loading has now been enabled by default on systems
2201 that support it (see entry for GDB 9, below), providing faster
2202 performance for programs with many symbols.
2204 * The $_siginfo convenience variable now also works on Windows targets,
2205 and will display the EXCEPTION_RECORD of the last handled exception.
2207 * TUI windows can now be arranged horizontally.
2209 * The command history filename can now be set to the empty string
2210 either using 'set history filename' or by setting 'GDBHISTFILE=' in
2211 the environment. The effect of setting this filename to the empty
2212 string is that GDB will not try to load any previous command
2215 * On Windows targets, it is now possible to debug 32-bit programs with a
2220 set exec-file-mismatch -- Set exec-file-mismatch handling (ask|warn|off).
2221 show exec-file-mismatch -- Show exec-file-mismatch handling (ask|warn|off).
2222 Set or show the option 'exec-file-mismatch'. When GDB attaches to a
2223 running process, this new option indicates whether to detect
2224 a mismatch between the current executable file loaded by GDB and the
2225 executable file used to start the process. If 'ask', the default,
2226 display a warning and ask the user whether to load the process
2227 executable file; if 'warn', just display a warning; if 'off', don't
2228 attempt to detect a mismatch.
2230 tui new-layout NAME WINDOW WEIGHT [WINDOW WEIGHT]...
2231 Define a new TUI layout, specifying its name and the windows that
2234 maintenance print xml-tdesc [FILE]
2235 Prints the current target description as an XML document. If the
2236 optional FILE is provided (which is an XML target description) then
2237 the target description is read from FILE into GDB, and then
2240 maintenance print core-file-backed-mappings
2241 Prints file-backed mappings loaded from a core file's note section.
2242 Output is expected to be similar to that of "info proc mappings".
2244 set debug fortran-array-slicing on|off
2245 show debug fortran-array-slicing
2246 Print debugging when taking slices of Fortran arrays.
2248 set fortran repack-array-slices on|off
2249 show fortran repack-array-slices
2250 When taking slices from Fortran arrays and strings, if the slice is
2251 non-contiguous within the original value then, when this option is
2252 on, the new value will be repacked into a single contiguous value.
2253 When this option is off, then the value returned will consist of a
2254 descriptor that describes the slice within the memory of the
2255 original parent value.
2259 alias [-a] [--] ALIAS = COMMAND [DEFAULT-ARGS...]
2260 The alias command can now specify default args for an alias.
2261 GDB automatically prepends the alias default args to the argument list
2262 provided explicitly by the user.
2263 For example, to have a backtrace with full details, you can define
2264 an alias 'bt_ALL' as
2265 'alias bt_ALL = backtrace -entry-values both -frame-arg all
2266 -past-main -past-entry -full'.
2267 Alias default arguments can also use a set of nested 'with' commands,
2268 e.g. 'alias pp10 = with print pretty -- with print elem 10 -- print'
2269 defines the alias pp10 that will pretty print a maximum of 10 elements
2270 of the given expression (if the expression is an array).
2274 GNU/Linux/RISC-V (gdbserver) riscv*-*-linux*
2275 BPF bpf-unknown-none
2280 ** gdb.register_window_type can be used to implement new TUI windows
2283 ** Dynamic types can now be queried. gdb.Type has a new attribute,
2284 "dynamic", and gdb.Type.sizeof can be None for a dynamic type. A
2285 field of a dynamic type may have None for its "bitpos" attribute
2288 ** Commands written in Python can be in the "TUI" help class by
2289 registering with the new constant gdb.COMMAND_TUI.
2291 ** New method gdb.PendingFrame.architecture () to retrieve the
2292 architecture of the pending frame.
2294 ** New gdb.Architecture.registers method that returns a
2295 gdb.RegisterDescriptorIterator object, an iterator that returns
2296 gdb.RegisterDescriptor objects. The new RegisterDescriptor is a
2297 way to query the registers available for an architecture.
2299 ** New gdb.Architecture.register_groups method that returns a
2300 gdb.RegisterGroupIterator object, an iterator that returns
2301 gdb.RegisterGroup objects. The new RegisterGroup is a way to
2302 discover the available register groups.
2306 ** GDB can now be built with GNU Guile 3.0 and 2.2 in addition to 2.0.
2308 ** Procedures 'memory-port-read-buffer-size',
2309 'set-memory-port-read-buffer-size!', 'memory-port-write-buffer-size',
2310 and 'set-memory-port-write-buffer-size!' are deprecated. When
2311 using Guile 2.2 and later, users who need to control the size of
2312 a memory port's internal buffer can use the 'setvbuf' procedure.
2314 *** Changes in GDB 9
2316 * 'thread-exited' event is now available in the annotations interface.
2318 * New built-in convenience variables $_gdb_major and $_gdb_minor
2319 provide the GDB version. They are handy for conditionally using
2320 features available only in or since specific GDB versions, in
2321 scripts that should work error-free with many different versions,
2322 such as in system-wide init files.
2324 * New built-in convenience functions $_gdb_setting, $_gdb_setting_str,
2325 $_gdb_maint_setting and $_gdb_maint_setting_str provide access to values
2326 of the GDB settings and the GDB maintenance settings. They are handy
2327 for changing the logic of user defined commands depending on the
2328 current GDB settings.
2330 * GDB now supports Thread Local Storage (TLS) variables on several
2331 FreeBSD architectures (amd64, i386, powerpc, riscv). Other
2332 architectures require kernel changes. TLS is not yet supported for
2333 amd64 and i386 process core dumps.
2335 * Support for Pointer Authentication (PAC) on AArch64 Linux. Return
2336 addresses that required unmasking are shown in the backtrace with the
2339 * Two new convenience functions $_cimag and $_creal that extract the
2340 imaginary and real parts respectively from complex numbers.
2342 * New built-in convenience variables $_shell_exitcode and $_shell_exitsignal
2343 provide the exitcode or exit status of the shell commands launched by
2344 GDB commands such as "shell", "pipe" and "make".
2346 * The command define-prefix can now define user defined prefix commands.
2347 User defined commands can now be defined using these user defined prefix
2350 * Command names can now use the . character.
2352 * The RX port now supports XML target descriptions.
2354 * GDB now shows the Ada task names at more places, e.g. in task switching
2357 * GDB can now be compiled with Python 3 on Windows.
2359 * New convenience variable $_ada_exception holds the address of the
2360 Ada exception being thrown. This is set by Ada-related catchpoints.
2362 * GDB can now place breakpoints on nested functions and subroutines in
2363 Fortran code. The '::' operator can be used between parent and
2364 child scopes when placing breakpoints, for example:
2366 (gdb) break outer_function::inner_function
2368 The 'outer_function::' prefix is only needed if 'inner_function' is
2369 not visible in the current scope.
2371 * In addition to the system-wide gdbinit file, if configured with
2372 --with-system-gdbinit-dir, GDB will now also load files in that directory
2373 as system gdbinit files, unless the -nx or -n flag is provided. Files
2374 with extensions .gdb, .py and .scm are supported as long as GDB was
2375 compiled with support for that language.
2377 * GDB now supports multithreaded symbol loading for higher performance.
2378 This feature is still in testing, so it is disabled by default. You
2379 can turn it on using 'maint set worker-threads unlimited'.
2383 ** The gdb.Value type has a new method 'format_string' which returns a
2384 string representing the value. The formatting is controlled by the
2385 optional keyword arguments: 'raw', 'pretty_arrays', 'pretty_structs',
2386 'array_indexes', 'symbols', 'unions', 'deref_refs', 'actual_objects',
2387 'static_members', 'max_elements', 'repeat_threshold', and 'format'.
2389 ** gdb.Type has a new property 'objfile' which returns the objfile the
2390 type was defined in.
2392 ** The frame information printed by the python frame filtering code
2393 is now consistent with what the 'backtrace' command prints when
2394 there are no filters, or when the 'backtrace' '-no-filters' option
2397 ** The new function gdb.lookup_static_symbol can be used to look up
2398 symbols with static linkage.
2400 ** The new function gdb.lookup_static_symbols can be used to look up
2401 all static symbols with static linkage.
2403 ** gdb.Objfile has new methods 'lookup_global_symbol' and
2404 'lookup_static_symbol' to lookup a symbol from this objfile only.
2406 ** gdb.Block now supports the dictionary syntax for accessing symbols in
2407 this block (e.g. block['local_variable']).
2411 | [COMMAND] | SHELL_COMMAND
2412 | -d DELIM COMMAND DELIM SHELL_COMMAND
2413 pipe [COMMAND] | SHELL_COMMAND
2414 pipe -d DELIM COMMAND DELIM SHELL_COMMAND
2415 Executes COMMAND and sends its output to SHELL_COMMAND.
2416 With no COMMAND, repeat the last executed command
2417 and send its output to SHELL_COMMAND.
2419 define-prefix COMMAND
2420 Define or mark a command as a user-defined prefix command.
2422 with SETTING [VALUE] [-- COMMAND]
2423 w SETTING [VALUE] [-- COMMAND]
2424 Temporarily set SETTING, run COMMAND, and restore SETTING.
2425 Usage: with SETTING -- COMMAND
2426 With no COMMAND, repeats the last executed command.
2427 SETTING is any GDB setting you can change with the "set"
2428 subcommands. For example, 'with language c -- print someobj'
2429 temporarily switches to the C language in order to print someobj.
2430 Settings can be combined: 'w lang c -- w print elements unlimited --
2431 usercmd' switches to the C language and runs usercmd with no limit
2432 of array elements to print.
2434 maint with SETTING [VALUE] [-- COMMAND]
2435 Like "with", but works with "maintenance set" settings.
2437 set may-call-functions [on|off]
2438 show may-call-functions
2439 This controls whether GDB will attempt to call functions in
2440 the program, such as with expressions in the print command. It
2441 defaults to on. Calling functions in the program being debugged
2442 can have undesired side effects. It is now possible to forbid
2443 such function calls. If function calls are forbidden, GDB will throw
2444 an error when a command (such as print expression) calls a function
2447 set print finish [on|off]
2449 This controls whether the `finish' command will display the value
2450 that is returned by the current function. When `off', the value is
2451 still entered into the value history, but it is not printed. The
2455 show print max-depth
2456 Allows deeply nested structures to be simplified when printing by
2457 replacing deeply nested parts (beyond the max-depth) with ellipses.
2458 The default max-depth is 20, but this can be set to unlimited to get
2459 the old behavior back.
2461 set print raw-values [on|off]
2462 show print raw-values
2463 By default, GDB applies the enabled pretty printers when printing a
2464 value. This allows to ignore the enabled pretty printers for a series
2465 of commands. The default is 'off'.
2467 set logging debugredirect [on|off]
2468 By default, GDB debug output will go to both the terminal and the logfile.
2469 Set if you want debug output to go only to the log file.
2471 set style title foreground COLOR
2472 set style title background COLOR
2473 set style title intensity VALUE
2474 Control the styling of titles.
2476 set style highlight foreground COLOR
2477 set style highlight background COLOR
2478 set style highlight intensity VALUE
2479 Control the styling of highlightings.
2481 maint set worker-threads
2482 maint show worker-threads
2483 Control the number of worker threads that can be used by GDB. The
2484 default is 0. "unlimited" lets GDB choose a number that is
2485 reasonable. Currently worker threads are only used when demangling
2486 the names of linker symbols.
2488 set style tui-border foreground COLOR
2489 set style tui-border background COLOR
2490 Control the styling of TUI borders.
2492 set style tui-active-border foreground COLOR
2493 set style tui-active-border background COLOR
2494 Control the styling of the active TUI border.
2496 maint set test-settings KIND
2497 maint show test-settings KIND
2498 A set of commands used by the testsuite for exercising the settings
2501 maint set tui-resize-message [on|off]
2502 maint show tui-resize-message
2503 Control whether GDB prints a message each time the terminal is
2504 resized when in TUI mode. This is primarily useful for testing the
2507 set print frame-info [short-location|location|location-and-address
2508 |source-and-location|source-line|auto]
2509 show print frame-info
2510 This controls what frame information is printed by the commands printing
2511 a frame. This setting will e.g. influence the behavior of 'backtrace',
2512 'frame', 'stepi'. The python frame filtering also respect this setting.
2513 The 'backtrace' '-frame-info' option can override this global setting.
2515 set tui compact-source
2516 show tui compact-source
2518 Enable the "compact" display mode for the TUI source window. The
2519 compact display uses only as much space as is needed for the line
2520 numbers in the current file, and only a single space to separate the
2521 line numbers from the source.
2523 info modules [-q] [REGEXP]
2524 Return a list of Fortran modules matching REGEXP, or all modules if
2527 info module functions [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP]
2528 Return a list of functions within all modules, grouped by module.
2529 The list of functions can be restricted with the optional regular
2530 expressions. MODULE_REGEXP matches against the module name,
2531 TYPE_REGEXP matches against the function type signature, and REGEXP
2532 matches against the function name.
2534 info module variables [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP]
2535 Return a list of variables within all modules, grouped by module.
2536 The list of variables can be restricted with the optional regular
2537 expressions. MODULE_REGEXP matches against the module name,
2538 TYPE_REGEXP matches against the variable type, and REGEXP matches
2539 against the variable name.
2541 set debug remote-packet-max-chars
2542 show debug remote-packet-max-chars
2543 Controls the number of characters to output in a remote packet when using
2545 The default is 512 bytes.
2548 Lists the target connections currently in use.
2553 The "help" command uses the title style to enhance the
2554 readability of its output by styling the classes and
2558 Similarly to "help", the "apropos" command also uses the
2559 title style for the command names. "apropos" accepts now
2560 a flag "-v" (verbose) to show the full documentation
2561 of matching commands and to use the highlight style to mark
2562 the documentation parts matching REGEXP.
2566 The GDB printf and eval commands can now print C-style and Ada-style
2567 string convenience variables without calling functions in the program.
2568 This allows to do formatted printing of strings without having
2569 a running inferior, or when debugging a core dump.
2571 info sources [-dirname | -basename] [--] [REGEXP]
2572 This command has now optional arguments to only print the files
2573 whose names match REGEXP. The arguments -dirname and -basename
2574 allow to restrict matching respectively to the dirname and basename
2578 The "show style" and its subcommands are now styling
2579 a style name in their output using its own style, to help
2580 the user visualize the different styles.
2582 set print frame-arguments
2583 The new value 'presence' indicates to only indicate the presence of
2584 arguments using ..., instead of printing argument names and values.
2586 set print raw-frame-arguments
2587 show print raw-frame-arguments
2589 These commands replace the similarly-named "set/show print raw
2590 frame-arguments" commands (now with a dash instead of a space). The
2591 old commands are now deprecated and may be removed in a future
2594 add-inferior [-no-connection]
2595 The add-inferior command now supports a "-no-connection" flag that
2596 makes the new inferior start with no target connection associated.
2597 By default, the new inferior inherits the target connection of the
2598 current inferior. See also "info connections".
2601 This command's output now includes a new "Connection" column
2602 indicating which target connection an inferior is bound to. See
2603 "info connections" above.
2605 maint test-options require-delimiter
2606 maint test-options unknown-is-error
2607 maint test-options unknown-is-operand
2608 maint show test-options-completion-result
2609 Commands used by the testsuite to validate the command options
2612 focus, winheight, +, -, >, <
2613 These commands are now case-sensitive.
2615 * New command options, command completion
2617 GDB now has a standard infrastructure to support dash-style command
2618 options ('-OPT'). One benefit is that commands that use it can
2619 easily support completion of command line arguments. Try "CMD
2620 -[TAB]" or "help CMD" to find options supported by a command. Over
2621 time, we intend to migrate most commands to this infrastructure. A
2622 number of commands got support for new command options in this
2625 ** The "print" and "compile print" commands now support a number of
2626 options that allow overriding relevant global print settings as
2627 set by "set print" subcommands:
2631 -array-indexes [on|off]
2632 -elements NUMBER|unlimited
2636 -raw-values [on|off]
2637 -repeats NUMBER|unlimited
2638 -static-members [on|off]
2643 Note that because the "print"/"compile print" commands accept
2644 arbitrary expressions which may look like options (including
2645 abbreviations), if you specify any command option, then you must
2646 use a double dash ("--") to mark the end of argument processing.
2648 ** The "backtrace" command now supports a number of options that
2649 allow overriding relevant global print settings as set by "set
2650 backtrace" and "set print" subcommands:
2652 -entry-values no|only|preferred|if-needed|both|compact|default
2653 -frame-arguments all|scalars|none
2654 -raw-frame-arguments [on|off]
2655 -frame-info auto|source-line|location|source-and-location
2656 |location-and-address|short-location
2658 -past-entry [on|off]
2660 In addition, the full/no-filters/hide qualifiers are now also
2661 exposed as command options too:
2667 ** The "frame apply", "tfaas" and "faas" commands similarly now
2668 support the following options:
2671 -past-entry [on|off]
2673 ** The new "info sources" options -dirname and -basename options
2674 are using the standard '-OPT' infrastructure.
2676 All options above can also be abbreviated. The argument of boolean
2677 (on/off) options can be 0/1 too, and also the argument is assumed
2678 "on" if omitted. This allows writing compact command invocations,
2681 (gdb) p -ra -p -o 0 -- *myptr
2683 The above is equivalent to:
2685 (gdb) print -raw-values -pretty -object off -- *myptr
2687 ** The "info types" command now supports the '-q' flag to disable
2688 printing of some header information in a similar fashion to "info
2689 variables" and "info functions".
2691 ** The "info variables", "info functions", and "whereis" commands
2692 now take a '-n' flag that excludes non-debug symbols (symbols
2693 from the symbol table, not from the debug info such as DWARF)
2696 * Completion improvements
2698 ** GDB can now complete the options of the "thread apply all" and
2699 "taas" commands, and their "-ascending" option can now be
2702 ** GDB can now complete the options of the "info threads", "info
2703 functions", "info variables", "info locals", and "info args"
2706 ** GDB can now complete the options of the "compile file" and
2707 "compile code" commands. The "compile file" command now
2708 completes on filenames.
2710 ** GDB can now complete the backtrace command's
2711 "full/no-filters/hide" qualifiers.
2713 * In settings, you can now abbreviate "unlimited".
2715 E.g., "set print elements u" is now equivalent to "set print
2716 elements unlimited".
2721 This lists all the possible completions for the rest of the line, if it
2722 were to be given as a command itself. This is intended for use by MI
2723 frontends in cases when separate CLI and MI channels cannot be used.
2725 -catch-throw, -catch-rethrow, and -catch-catch
2726 These can be used to catch C++ exceptions in a similar fashion to
2727 the CLI commands 'catch throw', 'catch rethrow', and 'catch catch'.
2729 -symbol-info-functions, -symbol-info-types, and -symbol-info-variables
2730 These commands are the MI equivalent of the CLI commands 'info
2731 functions', 'info types', and 'info variables' respectively.
2733 -symbol-info-modules, this is the MI equivalent of the CLI 'info
2736 -symbol-info-module-functions and -symbol-info-module-variables.
2737 These commands are the MI equivalent of the CLI commands 'info
2738 module functions' and 'info module variables'.
2742 ** The default version of the MI interpreter is now 3 (-i=mi3).
2744 ** The output of information about multi-location breakpoints (which is
2745 syntactically incorrect in MI 2) has changed in MI 3. This affects
2746 the following commands and events:
2750 - =breakpoint-created
2751 - =breakpoint-modified
2753 The -fix-multi-location-breakpoint-output command can be used to enable
2754 this behavior with previous MI versions.
2756 ** Backtraces and frames include a new optional field addr_flags which is
2757 given after the addr field. On AArch64 this contains PAC if the address
2758 has been masked in the frame. On all other targets the field is not
2763 The testsuite now creates the files gdb.cmd (containing the arguments
2764 used to launch GDB) and gdb.in (containing all the commands sent to
2765 GDB) in the output directory for each test script. Multiple invocations
2766 are appended with .1, .2, .3 etc.
2768 * Building GDB and GDBserver now requires GNU make >= 3.82.
2770 Using another implementation of the make program or an earlier version of
2771 GNU make to build GDB or GDBserver is not supported.
2773 * Building GDB now requires GNU readline >= 7.0.
2775 GDB now bundles GNU readline 8.0, but if you choose to use
2776 --with-system-readline, only readline >= 7.0 can be used.
2778 * The TUI SingleKey keymap is now named "SingleKey". This can be used
2779 from .inputrc to bind keys in this keymap. This feature is only
2780 available when gdb is built against GNU readline 8.0 or later.
2782 * Removed targets and native configurations
2784 GDB no longer supports debugging the Cell Broadband Engine. This includes
2785 both debugging standalone Cell/B.E. SPU applications and integrated debugging
2786 of Cell/B.E. applications that use both the PPU and SPU architectures.
2792 * Removed targets and native configurations
2794 Solaris 10 i?86-*-solaris2.10, x86_64-*-solaris2.10,
2795 sparc*-*-solaris2.10
2797 *** Changes in GDB 8.3
2799 * GDB and GDBserver now support access to additional registers on
2800 PowerPC GNU/Linux targets: PPR, DSCR, TAR, EBB/PMU registers, and
2803 * GDB now has experimental support for the compilation and injection of
2804 C++ source code into the inferior. This beta release does not include
2805 support for several language features, such as templates, constructors,
2808 This feature requires GCC 7.1 or higher built with libcp1.so
2811 * GDB and GDBserver now support IPv6 connections. IPv6 addresses
2812 can be passed using the '[ADDRESS]:PORT' notation, or the regular
2813 'ADDRESS:PORT' method.
2815 * DWARF index cache: GDB can now automatically save indices of DWARF
2816 symbols on disk to speed up further loading of the same binaries.
2818 * Ada task switching is now supported on aarch64-elf targets when
2819 debugging a program using the Ravenscar Profile. For more information,
2820 see the "Tasking Support when using the Ravenscar Profile" section
2821 in the GDB user manual.
2823 * GDB in batch mode now exits with status 1 if the last command to be
2826 * The RISC-V target now supports target descriptions.
2828 * System call catchpoints now support system call aliases on FreeBSD.
2829 When the ABI of a system call changes in FreeBSD, this is
2830 implemented by leaving a compatibility system call using the old ABI
2831 at the existing number and allocating a new system call number for
2832 the new ABI. For example, FreeBSD 12 altered the layout of 'struct
2833 kevent' used by the 'kevent' system call. As a result, FreeBSD 12
2834 kernels ship with both 'kevent' and 'freebsd11_kevent' system calls.
2835 The 'freebsd11_kevent' system call is assigned an alias of 'kevent'
2836 so that a system call catchpoint for the 'kevent' system call will
2837 catch invocations of both the 'kevent' and 'freebsd11_kevent'
2838 binaries. This ensures that 'kevent' system calls are caught for
2839 binaries using either the old or new ABIs.
2841 * Terminal styling is now available for the CLI and the TUI. GNU
2842 Source Highlight can additionally be used to provide styling of
2843 source code snippets. See the "set style" commands, below, for more
2846 * Removed support for old demangling styles arm, edg, gnu, hp and
2851 set debug compile-cplus-types
2852 show debug compile-cplus-types
2853 Control the display of debug output about type conversion in the
2854 C++ compile feature. Commands have no effect while compiling
2855 for other languages.
2859 Control whether debug output about files/functions skipping is
2862 frame apply [all | COUNT | -COUNT | level LEVEL...] [FLAG]... COMMAND
2863 Apply a command to some frames.
2864 FLAG arguments allow to control what output to produce and how to handle
2865 errors raised when applying COMMAND to a frame.
2868 Apply a command to all threads (ignoring errors and empty output).
2869 Shortcut for 'thread apply all -s COMMAND'.
2872 Apply a command to all frames (ignoring errors and empty output).
2873 Shortcut for 'frame apply all -s COMMAND'.
2876 Apply a command to all frames of all threads (ignoring errors and empty
2878 Shortcut for 'thread apply all -s frame apply all -s COMMAND'.
2880 maint set dwarf unwinders (on|off)
2881 maint show dwarf unwinders
2882 Control whether DWARF unwinders can be used.
2885 Display a list of open files for a process.
2889 Changes to the "frame", "select-frame", and "info frame" CLI commands.
2890 These commands all now take a frame specification which
2891 is either a frame level, or one of the keywords 'level', 'address',
2892 'function', or 'view' followed by a parameter. Selecting a frame by
2893 address, or viewing a frame outside the current backtrace now
2894 requires the use of a keyword. Selecting a frame by level is
2895 unchanged. The MI comment "-stack-select-frame" is unchanged.
2897 target remote FILENAME
2898 target extended-remote FILENAME
2899 If FILENAME is a Unix domain socket, GDB will attempt to connect
2900 to this socket instead of opening FILENAME as a character device.
2902 info args [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2903 info functions [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2904 info locals [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2905 info variables [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2906 These commands can now print only the searched entities
2907 matching the provided regexp(s), giving a condition
2908 on the entity names or entity types. The flag -q disables
2909 printing headers or information messages.
2915 These commands now determine the syntax for the shown entities
2916 according to the language chosen by `set language'. In particular,
2917 `set language auto' means to automatically choose the language of
2920 thread apply [all | COUNT | -COUNT] [FLAG]... COMMAND
2921 The 'thread apply' command accepts new FLAG arguments.
2922 FLAG arguments allow to control what output to produce and how to handle
2923 errors raised when applying COMMAND to a thread.
2925 set tui tab-width NCHARS
2926 show tui tab-width NCHARS
2927 "set tui tab-width" replaces the "tabset" command, which has been deprecated.
2929 set style enabled [on|off]
2931 Enable or disable terminal styling. Styling is enabled by default
2932 on most hosts, but disabled by default when in batch mode.
2934 set style sources [on|off]
2936 Enable or disable source code styling. Source code styling is
2937 enabled by default, but only takes effect if styling in general is
2938 enabled, and if GDB was linked with GNU Source Highlight.
2940 set style filename foreground COLOR
2941 set style filename background COLOR
2942 set style filename intensity VALUE
2943 Control the styling of file names.
2945 set style function foreground COLOR
2946 set style function background COLOR
2947 set style function intensity VALUE
2948 Control the styling of function names.
2950 set style variable foreground COLOR
2951 set style variable background COLOR
2952 set style variable intensity VALUE
2953 Control the styling of variable names.
2955 set style address foreground COLOR
2956 set style address background COLOR
2957 set style address intensity VALUE
2958 Control the styling of addresses.
2962 ** The '-data-disassemble' MI command now accepts an '-a' option to
2963 disassemble the whole function surrounding the given program
2964 counter value or function name. Support for this feature can be
2965 verified by using the "-list-features" command, which should
2966 contain "data-disassemble-a-option".
2968 ** Command responses and notifications that include a frame now include
2969 the frame's architecture in a new "arch" attribute.
2971 * New native configurations
2973 GNU/Linux/RISC-V riscv*-*-linux*
2974 FreeBSD/riscv riscv*-*-freebsd*
2978 GNU/Linux/RISC-V riscv*-*-linux*
2979 CSKY ELF csky*-*-elf
2980 CSKY GNU/LINUX csky*-*-linux
2981 FreeBSD/riscv riscv*-*-freebsd*
2983 GNU/Linux/OpenRISC or1k*-*-linux*
2987 GDB no longer supports native debugging on versions of MS-Windows
2992 ** GDB no longer supports Python versions less than 2.6.
2994 ** The gdb.Inferior type has a new 'progspace' property, which is the program
2995 space associated to that inferior.
2997 ** The gdb.Progspace type has a new 'objfiles' method, which returns the list
2998 of objfiles associated to that program space.
3000 ** gdb.SYMBOL_LOC_COMMON_BLOCK, gdb.SYMBOL_MODULE_DOMAIN, and
3001 gdb.SYMBOL_COMMON_BLOCK_DOMAIN were added to reflect changes to
3004 ** gdb.SYMBOL_VARIABLES_DOMAIN, gdb.SYMBOL_FUNCTIONS_DOMAIN, and
3005 gdb.SYMBOL_TYPES_DOMAIN are now deprecated. These were never
3006 correct and did not work properly.
3008 ** The gdb.Value type has a new constructor, which is used to construct a
3009 gdb.Value from a Python buffer object and a gdb.Type.
3015 Enable or disable the undefined behavior sanitizer. This is
3016 disabled by default, but passing --enable-ubsan=yes or
3017 --enable-ubsan=auto to configure will enable it. Enabling this can
3018 cause a performance penalty. The undefined behavior sanitizer was
3019 first introduced in GCC 4.9.
3021 *** Changes in GDB 8.2
3023 * The 'set disassembler-options' command now supports specifying options
3024 for the MIPS target.
3026 * The 'symbol-file' command now accepts an '-o' option to add a relative
3027 offset to all sections.
3029 * Similarly, the 'add-symbol-file' command also accepts an '-o' option to add
3030 a relative offset to all sections, but it allows to override the load
3031 address of individual sections using '-s'.
3033 * The 'add-symbol-file' command no longer requires the second argument
3034 (address of the text section).
3036 * The endianness used with the 'set endian auto' mode in the absence of
3037 an executable selected for debugging is now the last endianness chosen
3038 either by one of the 'set endian big' and 'set endian little' commands
3039 or by inferring from the last executable used, rather than the startup
3042 * The pager now allows a "c" response, meaning to disable the pager
3043 for the rest of the current command.
3045 * The commands 'info variables/functions/types' now show the source line
3046 numbers of symbol definitions when available.
3048 * 'info proc' now works on running processes on FreeBSD systems and core
3049 files created on FreeBSD systems.
3051 * C expressions can now use _Alignof, and C++ expressions can now use
3054 * Support for SVE on AArch64 Linux. Note that GDB does not detect changes to
3055 the vector length while the process is running.
3061 Control display of debugging info regarding the FreeBSD native target.
3063 set|show varsize-limit
3064 This new setting allows the user to control the maximum size of Ada
3065 objects being printed when those objects have a variable type,
3066 instead of that maximum size being hardcoded to 65536 bytes.
3068 set|show record btrace cpu
3069 Controls the processor to be used for enabling errata workarounds for
3070 branch trace decode.
3072 maint check libthread-db
3073 Run integrity checks on the current inferior's thread debugging
3076 maint set check-libthread-db (on|off)
3077 maint show check-libthread-db
3078 Control whether to run integrity checks on inferior specific thread
3079 debugging libraries as they are loaded. The default is not to
3080 perform such checks.
3084 ** Type alignment is now exposed via the "align" attribute of a gdb.Type.
3086 ** The commands attached to a breakpoint can be set by assigning to
3087 the breakpoint's "commands" field.
3089 ** gdb.execute can now execute multi-line gdb commands.
3091 ** The new functions gdb.convenience_variable and
3092 gdb.set_convenience_variable can be used to get and set the value
3093 of convenience variables.
3095 ** A gdb.Parameter will no longer print the "set" help text on an
3096 ordinary "set"; instead by default a "set" will be silent unless
3097 the get_set_string method returns a non-empty string.
3101 RiscV ELF riscv*-*-elf
3103 * Removed targets and native configurations
3105 m88k running OpenBSD m88*-*-openbsd*
3106 SH-5/SH64 ELF sh64-*-elf*, SH-5/SH64 support in sh*
3107 SH-5/SH64 running GNU/Linux SH-5/SH64 support in sh*-*-linux*
3108 SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd*
3110 * Aarch64/Linux hardware watchpoints improvements
3112 Hardware watchpoints on unaligned addresses are now properly
3113 supported when running Linux kernel 4.10 or higher: read and access
3114 watchpoints are no longer spuriously missed, and all watchpoints
3115 lengths between 1 and 8 bytes are supported. On older kernels,
3116 watchpoints set on unaligned addresses are no longer missed, with
3117 the tradeoff that there is a possibility of false hits being
3122 --enable-codesign=CERT
3123 This can be used to invoke "codesign -s CERT" after building gdb.
3124 This option is useful on macOS, where code signing is required for
3125 gdb to work properly.
3127 --disable-gdbcli has been removed
3128 This is now silently accepted, but does nothing.
3130 *** Changes in GDB 8.1
3132 * GDB now supports dynamically creating arbitrary register groups specified
3133 in XML target descriptions. This allows for finer grain grouping of
3134 registers on systems with a large amount of registers.
3136 * The 'ptype' command now accepts a '/o' flag, which prints the
3137 offsets and sizes of fields in a struct, like the pahole(1) tool.
3139 * New "--readnever" command line option instructs GDB to not read each
3140 symbol file's symbolic debug information. This makes startup faster
3141 but at the expense of not being able to perform symbolic debugging.
3142 This option is intended for use cases where symbolic debugging will
3143 not be used, e.g., when you only need to dump the debuggee's core.
3145 * GDB now uses the GNU MPFR library, if available, to emulate target
3146 floating-point arithmetic during expression evaluation when the target
3147 uses different floating-point formats than the host. At least version
3148 3.1 of GNU MPFR is required.
3150 * GDB now supports access to the guarded-storage-control registers and the
3151 software-based guarded-storage broadcast control registers on IBM z14.
3153 * On Unix systems, GDB now supports transmitting environment variables
3154 that are to be set or unset to GDBserver. These variables will
3155 affect the environment to be passed to the remote inferior.
3157 To inform GDB of environment variables that are to be transmitted to
3158 GDBserver, use the "set environment" command. Only user set
3159 environment variables are sent to GDBserver.
3161 To inform GDB of environment variables that are to be unset before
3162 the remote inferior is started by the GDBserver, use the "unset
3163 environment" command.
3165 * Completion improvements
3167 ** GDB can now complete function parameters in linespecs and
3168 explicit locations without quoting. When setting breakpoints,
3169 quoting around functions names to help with TAB-completion is
3170 generally no longer necessary. For example, this now completes
3173 (gdb) b function(in[TAB]
3174 (gdb) b function(int)
3176 Related, GDB is no longer confused with completing functions in
3177 C++ anonymous namespaces:
3180 (gdb) b (anonymous namespace)::[TAB][TAB]
3181 (anonymous namespace)::a_function()
3182 (anonymous namespace)::b_function()
3184 ** GDB now has much improved linespec and explicit locations TAB
3185 completion support, that better understands what you're
3186 completing and offers better suggestions. For example, GDB no
3187 longer offers data symbols as possible completions when you're
3188 setting a breakpoint.
3190 ** GDB now TAB-completes label symbol names.
3192 ** The "complete" command now mimics TAB completion accurately.
3194 * New command line options (gcore)
3197 Dump all memory mappings.
3199 * Breakpoints on C++ functions are now set on all scopes by default
3201 By default, breakpoints on functions/methods are now interpreted as
3202 specifying all functions with the given name ignoring missing
3203 leading scopes (namespaces and classes).
3205 For example, assuming a C++ program with symbols named:
3210 both commands "break func()" and "break B::func()" set a breakpoint
3213 You can use the new flag "-qualified" to override this. This makes
3214 GDB interpret the specified function name as a complete
3215 fully-qualified name instead. For example, using the same C++
3216 program, the "break -q B::func" command sets a breakpoint on
3217 "B::func", only. A parameter has been added to the Python
3218 gdb.Breakpoint constructor to achieve the same result when creating
3219 a breakpoint from Python.
3221 * Breakpoints on functions marked with C++ ABI tags
3223 GDB can now set breakpoints on functions marked with C++ ABI tags
3224 (e.g., [abi:cxx11]). See here for a description of ABI tags:
3225 https://developers.redhat.com/blog/2015/02/05/gcc5-and-the-c11-abi/
3227 Functions with a C++11 abi tag are demangled/displayed like this:
3229 function[abi:cxx11](int)
3232 You can now set a breakpoint on such functions simply as if they had
3235 (gdb) b function(int)
3237 Or if you need to disambiguate between tags, like:
3239 (gdb) b function[abi:other_tag](int)
3241 Tab completion was adjusted accordingly as well.
3245 ** New events gdb.new_inferior, gdb.inferior_deleted, and
3246 gdb.new_thread are emitted. See the manual for further
3247 description of these.
3249 ** A new function, "gdb.rbreak" has been added to the Python API.
3250 This function allows the setting of a large number of breakpoints
3251 via a regex pattern in Python. See the manual for further details.
3253 ** Python breakpoints can now accept explicit locations. See the
3254 manual for a further description of this feature.
3257 * New features in the GDB remote stub, GDBserver
3259 ** GDBserver is now able to start inferior processes with a
3260 specified initial working directory.
3262 The user can set the desired working directory to be used from
3263 GDB using the new "set cwd" command.
3265 ** New "--selftest" command line option runs some GDBserver self
3266 tests. These self tests are disabled in releases.
3268 ** On Unix systems, GDBserver now does globbing expansion and variable
3269 substitution in inferior command line arguments.
3271 This is done by starting inferiors using a shell, like GDB does.
3272 See "set startup-with-shell" in the user manual for how to disable
3273 this from GDB when using "target extended-remote". When using
3274 "target remote", you can disable the startup with shell by using the
3275 new "--no-startup-with-shell" GDBserver command line option.
3277 ** On Unix systems, GDBserver now supports receiving environment
3278 variables that are to be set or unset from GDB. These variables
3279 will affect the environment to be passed to the inferior.
3281 * When catching an Ada exception raised with a message, GDB now prints
3282 the message in the catchpoint hit notification. In GDB/MI mode, that
3283 information is provided as an extra field named "exception-message"
3284 in the *stopped notification.
3286 * Trait objects can now be inspected When debugging Rust code. This
3287 requires compiler support which will appear in Rust 1.24.
3289 * New remote packets
3291 QEnvironmentHexEncoded
3292 Inform GDBserver of an environment variable that is to be passed to
3293 the inferior when starting it.
3296 Inform GDBserver of an environment variable that is to be unset
3297 before starting the remote inferior.
3300 Inform GDBserver that the environment should be reset (i.e.,
3301 user-set environment variables should be unset).
3304 Indicates whether the inferior must be started with a shell or not.
3307 Tell GDBserver that the inferior to be started should use a specific
3310 * The "maintenance print c-tdesc" command now takes an optional
3311 argument which is the file name of XML target description.
3313 * The "maintenance selftest" command now takes an optional argument to
3314 filter the tests to be run.
3316 * The "enable", and "disable" commands now accept a range of
3317 breakpoint locations, e.g. "enable 1.3-5".
3322 Set and show the current working directory for the inferior.
3324 set|show compile-gcc
3325 Set and show compilation command used for compiling and injecting code
3326 with the 'compile' commands.
3328 set debug separate-debug-file
3329 show debug separate-debug-file
3330 Control the display of debug output about separate debug file search.
3332 set dump-excluded-mappings
3333 show dump-excluded-mappings
3334 Control whether mappings marked with the VM_DONTDUMP flag should be
3335 dumped when generating a core file.
3337 maint info selftests
3338 List the registered selftests.
3341 Start the debugged program stopping at the first instruction.
3344 Control display of debugging messages related to OpenRISC targets.
3346 set|show print type nested-type-limit
3347 Set and show the limit of nesting level for nested types that the
3348 type printer will show.
3350 * TUI Single-Key mode now supports two new shortcut keys: `i' for stepi and
3353 * Safer/improved support for debugging with no debug info
3355 GDB no longer assumes functions with no debug information return
3358 This means that GDB now refuses to call such functions unless you
3359 tell it the function's type, by either casting the call to the
3360 declared return type, or by casting the function to a function
3361 pointer of the right type, and calling that:
3363 (gdb) p getenv ("PATH")
3364 'getenv' has unknown return type; cast the call to its declared return type
3365 (gdb) p (char *) getenv ("PATH")
3366 $1 = 0x7fffffffe "/usr/local/bin:/"...
3367 (gdb) p ((char * (*) (const char *)) getenv) ("PATH")
3368 $2 = 0x7fffffffe "/usr/local/bin:/"...
3370 Similarly, GDB no longer assumes that global variables with no debug
3371 info have type 'int', and refuses to print the variable's value
3372 unless you tell it the variable's type:
3375 'var' has unknown type; cast it to its declared type
3379 * New native configurations
3381 FreeBSD/aarch64 aarch64*-*-freebsd*
3382 FreeBSD/arm arm*-*-freebsd*
3386 FreeBSD/aarch64 aarch64*-*-freebsd*
3387 FreeBSD/arm arm*-*-freebsd*
3388 OpenRISC ELF or1k*-*-elf
3390 * Removed targets and native configurations
3392 Solaris 2.0-9 i?86-*-solaris2.[0-9], sparc*-*-solaris2.[0-9]
3394 *** Changes in GDB 8.0
3396 * GDB now supports access to the PKU register on GNU/Linux. The register is
3397 added by the Memory Protection Keys for Userspace feature which will be
3398 available in future Intel CPUs.
3400 * GDB now supports C++11 rvalue references.
3404 ** New functions to start, stop and access a running btrace recording.
3405 ** Rvalue references are now supported in gdb.Type.
3407 * GDB now supports recording and replaying rdrand and rdseed Intel 64
3410 * Building GDB and GDBserver now requires a C++11 compiler.
3412 For example, GCC 4.8 or later.
3414 It is no longer possible to build GDB or GDBserver with a C
3415 compiler. The --disable-build-with-cxx configure option has been
3418 * Building GDB and GDBserver now requires GNU make >= 3.81.
3420 It is no longer supported to build GDB or GDBserver with another
3421 implementation of the make program or an earlier version of GNU make.
3423 * Native debugging on MS-Windows supports command-line redirection
3425 Command-line arguments used for starting programs on MS-Windows can
3426 now include redirection symbols supported by native Windows shells,
3427 such as '<', '>', '>>', '2>&1', etc. This affects GDB commands such
3428 as "run", "start", and "set args", as well as the corresponding MI
3431 * Support for thread names on MS-Windows.
3433 GDB now catches and handles the special exception that programs
3434 running on MS-Windows use to assign names to threads in the
3437 * Support for Java programs compiled with gcj has been removed.
3439 * User commands now accept an unlimited number of arguments.
3440 Previously, only up to 10 was accepted.
3442 * The "eval" command now expands user-defined command arguments.
3444 This makes it easier to process a variable number of arguments:
3449 eval "print $arg%d", $i
3454 * Target descriptions can now describe registers for sparc32 and sparc64.
3456 * GDB now supports DWARF version 5 (debug information format).
3457 Its .debug_names index is not yet supported.
3459 * New native configurations
3461 FreeBSD/mips mips*-*-freebsd
3465 Synopsys ARC arc*-*-elf32
3466 FreeBSD/mips mips*-*-freebsd
3468 * Removed targets and native configurations
3470 Alpha running FreeBSD alpha*-*-freebsd*
3471 Alpha running GNU/kFreeBSD alpha*-*-kfreebsd*-gnu
3476 Erases all the flash memory regions reported by the target.
3478 maint print arc arc-instruction address
3479 Print internal disassembler information about instruction at a given address.
3483 set disassembler-options
3484 show disassembler-options
3485 Controls the passing of target specific information to the disassembler.
3486 If it is necessary to specify more than one disassembler option then
3487 multiple options can be placed together into a comma separated list.
3488 The default value is the empty string. Currently, the only supported
3489 targets are ARM, PowerPC and S/390.
3494 Erases all the flash memory regions reported by the target. This is
3495 equivalent to the CLI command flash-erase.
3497 -file-list-shared-libraries
3498 List the shared libraries in the program. This is
3499 equivalent to the CLI command "info shared".
3502 Catchpoints stopping the program when Ada exceptions are
3503 handled. This is equivalent to the CLI command "catch handlers".
3505 *** Changes in GDB 7.12
3507 * GDB and GDBserver now build with a C++ compiler by default.
3509 The --enable-build-with-cxx configure option is now enabled by
3510 default. One must now explicitly configure with
3511 --disable-build-with-cxx in order to build with a C compiler. This
3512 option will be removed in a future release.
3514 * GDBserver now supports recording btrace without maintaining an active
3517 * GDB now supports a negative repeat count in the 'x' command to examine
3518 memory backward from the given address. For example:
3521 #0 Func1 (n=42, p=0x40061c "hogehoge") at main.cpp:4
3522 #1 0x400580 in main (argc=1, argv=0x7fffffffe5c8) at main.cpp:8
3523 (gdb) x/-5i 0x0000000000400580
3524 0x40056a <main(int, char**)+8>: mov %edi,-0x4(%rbp)
3525 0x40056d <main(int, char**)+11>: mov %rsi,-0x10(%rbp)
3526 0x400571 <main(int, char**)+15>: mov $0x40061c,%esi
3527 0x400576 <main(int, char**)+20>: mov $0x2a,%edi
3528 0x40057b <main(int, char**)+25>:
3529 callq 0x400536 <Func1(int, char const*)>
3531 * Fortran: Support structures with fields of dynamic types and
3532 arrays of dynamic types.
3534 * The symbol dumping maintenance commands have new syntax.
3535 maint print symbols [-pc address] [--] [filename]
3536 maint print symbols [-objfile objfile] [-source source] [--] [filename]
3537 maint print psymbols [-objfile objfile] [-pc address] [--] [filename]
3538 maint print psymbols [-objfile objfile] [-source source] [--] [filename]
3539 maint print msymbols [-objfile objfile] [--] [filename]
3541 * GDB now supports multibit bitfields and enums in target register
3544 * New Python-based convenience function $_as_string(val), which returns
3545 the textual representation of a value. This function is especially
3546 useful to obtain the text label of an enum value.
3548 * Intel MPX bound violation handling.
3550 Segmentation faults caused by a Intel MPX boundary violation
3551 now display the kind of violation (upper or lower), the memory
3552 address accessed and the memory bounds, along with the usual
3553 signal received and code location.
3557 Program received signal SIGSEGV, Segmentation fault
3558 Upper bound violation while accessing address 0x7fffffffc3b3
3559 Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
3560 0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
3562 * Rust language support.
3563 GDB now supports debugging programs written in the Rust programming
3564 language. See https://www.rust-lang.org/ for more information about
3567 * Support for running interpreters on specified input/output devices
3569 GDB now supports a new mechanism that allows frontends to provide
3570 fully featured GDB console views, as a better alternative to
3571 building such views on top of the "-interpreter-exec console"
3572 command. See the new "new-ui" command below. With that command,
3573 frontends can now start GDB in the traditional command-line mode
3574 running in an embedded terminal emulator widget, and create a
3575 separate MI interpreter running on a specified i/o device. In this
3576 way, GDB handles line editing, history, tab completion, etc. in the
3577 console all by itself, and the GUI uses the separate MI interpreter
3578 for its own control and synchronization, invisible to the command
3581 * The "catch syscall" command catches groups of related syscalls.
3583 The "catch syscall" command now supports catching a group of related
3584 syscalls using the 'group:' or 'g:' prefix.
3589 skip -gfile file-glob-pattern
3590 skip -function function
3591 skip -rfunction regular-expression
3592 A generalized form of the skip command, with new support for
3593 glob-style file names and regular expressions for function names.
3594 Additionally, a file spec and a function spec may now be combined.
3596 maint info line-table REGEXP
3597 Display the contents of GDB's internal line table data structure.
3600 Run any GDB unit tests that were compiled in.
3603 Start a new user interface instance running INTERP as interpreter,
3604 using the TTY file for input/output.
3608 ** gdb.Breakpoint objects have a new attribute "pending", which
3609 indicates whether the breakpoint is pending.
3610 ** Three new breakpoint-related events have been added:
3611 gdb.breakpoint_created, gdb.breakpoint_modified, and
3612 gdb.breakpoint_deleted.
3614 signal-event EVENTID
3615 Signal ("set") the given MS-Windows event object. This is used in
3616 conjunction with the Windows JIT debugging (AeDebug) support, where
3617 the OS suspends a crashing process until a debugger can attach to
3618 it. Resuming the crashing process, in order to debug it, is done by
3619 signalling an event.
3621 * Support for tracepoints and fast tracepoints on s390-linux and s390x-linux
3622 was added in GDBserver, including JIT compiling fast tracepoint's
3623 conditional expression bytecode into native code.
3625 * Support for various remote target protocols and ROM monitors has
3628 target m32rsdi Remote M32R debugging over SDI
3629 target mips MIPS remote debugging protocol
3630 target pmon PMON ROM monitor
3631 target ddb NEC's DDB variant of PMON for Vr4300
3632 target rockhopper NEC RockHopper variant of PMON
3633 target lsi LSI variant of PMO
3635 * Support for tracepoints and fast tracepoints on powerpc-linux,
3636 powerpc64-linux, and powerpc64le-linux was added in GDBserver,
3637 including JIT compiling fast tracepoint's conditional expression
3638 bytecode into native code.
3640 * MI async record =record-started now includes the method and format used for
3641 recording. For example:
3643 =record-started,thread-group="i1",method="btrace",format="bts"
3645 * MI async record =thread-selected now includes the frame field. For example:
3647 =thread-selected,id="3",frame={level="0",addr="0x00000000004007c0"}
3651 Andes NDS32 nds32*-*-elf
3653 *** Changes in GDB 7.11
3655 * GDB now supports debugging kernel-based threads on FreeBSD.
3657 * Per-inferior thread numbers
3659 Thread numbers are now per inferior instead of global. If you're
3660 debugging multiple inferiors, GDB displays thread IDs using a
3661 qualified INF_NUM.THR_NUM form. For example:
3665 1.1 Thread 0x7ffff7fc2740 (LWP 8155) (running)
3666 1.2 Thread 0x7ffff7fc1700 (LWP 8168) (running)
3667 * 2.1 Thread 0x7ffff7fc2740 (LWP 8157) (running)
3668 2.2 Thread 0x7ffff7fc1700 (LWP 8190) (running)
3670 As consequence, thread numbers as visible in the $_thread
3671 convenience variable and in Python's InferiorThread.num attribute
3672 are no longer unique between inferiors.
3674 GDB now maintains a second thread ID per thread, referred to as the
3675 global thread ID, which is the new equivalent of thread numbers in
3676 previous releases. See also $_gthread below.
3678 For backwards compatibility, MI's thread IDs always refer to global
3681 * Commands that accept thread IDs now accept the qualified
3682 INF_NUM.THR_NUM form as well. For example:
3685 [Switching to thread 2.1 (Thread 0x7ffff7fc2740 (LWP 8157))] (running)
3688 * In commands that accept a list of thread IDs, you can now refer to
3689 all threads of an inferior using a star wildcard. GDB accepts
3690 "INF_NUM.*", to refer to all threads of inferior INF_NUM, and "*" to
3691 refer to all threads of the current inferior. For example, "info
3694 * You can use "info threads -gid" to display the global thread ID of
3697 * The new convenience variable $_gthread holds the global number of
3700 * The new convenience variable $_inferior holds the number of the
3703 * GDB now displays the ID and name of the thread that hit a breakpoint
3704 or received a signal, if your program is multi-threaded. For
3707 Thread 3 "bar" hit Breakpoint 1 at 0x40087a: file program.c, line 20.
3708 Thread 1 "main" received signal SIGINT, Interrupt.
3710 * Record btrace now supports non-stop mode.
3712 * Support for tracepoints on aarch64-linux was added in GDBserver.
3714 * The 'record instruction-history' command now indicates speculative execution
3715 when using the Intel Processor Trace recording format.
3717 * GDB now allows users to specify explicit locations, bypassing
3718 the linespec parser. This feature is also available to GDB/MI
3721 * Multi-architecture debugging is supported on AArch64 GNU/Linux.
3722 GDB now is able to debug both AArch64 applications and ARM applications
3725 * Support for fast tracepoints on aarch64-linux was added in GDBserver,
3726 including JIT compiling fast tracepoint's conditional expression bytecode
3729 * GDB now supports displaced stepping on AArch64 GNU/Linux.
3731 * "info threads", "info inferiors", "info display", "info checkpoints"
3732 and "maint info program-spaces" now list the corresponding items in
3733 ascending ID order, for consistency with all other "info" commands.
3735 * In Ada, the overloads selection menu has been enhanced to display the
3736 parameter types and the return types for the matching overloaded subprograms.
3740 maint set target-non-stop (on|off|auto)
3741 maint show target-non-stop
3742 Control whether GDB targets always operate in non-stop mode even if
3743 "set non-stop" is "off". The default is "auto", meaning non-stop
3744 mode is enabled if supported by the target.
3746 maint set bfd-sharing
3747 maint show bfd-sharing
3748 Control the reuse of bfd objects.
3751 show debug bfd-cache
3752 Control display of debugging info regarding bfd caching.
3756 Control display of debugging info regarding FreeBSD threads.
3758 set remote multiprocess-extensions-packet
3759 show remote multiprocess-extensions-packet
3760 Set/show the use of the remote protocol multiprocess extensions.
3762 set remote thread-events
3763 show remote thread-events
3764 Set/show the use of thread create/exit events.
3766 set ada print-signatures on|off
3767 show ada print-signatures"
3768 Control whether parameter types and return types are displayed in overloads
3769 selection menus. It is activated (@code{on}) by default.
3773 Controls the maximum size of memory, in bytes, that GDB will
3774 allocate for value contents. Prevents incorrect programs from
3775 causing GDB to allocate overly large buffers. Default is 64k.
3777 * The "disassemble" command accepts a new modifier: /s.
3778 It prints mixed source+disassembly like /m with two differences:
3779 - disassembled instructions are now printed in program order, and
3780 - and source for all relevant files is now printed.
3781 The "/m" option is now considered deprecated: its "source-centric"
3782 output hasn't proved useful in practice.
3784 * The "record instruction-history" command accepts a new modifier: /s.
3785 It behaves exactly like /m and prints mixed source+disassembly.
3787 * The "set scheduler-locking" command supports a new mode "replay".
3788 It behaves like "off" in record mode and like "on" in replay mode.
3790 * Support for various ROM monitors has been removed:
3792 target dbug dBUG ROM monitor for Motorola ColdFire
3793 target picobug Motorola picobug monitor
3794 target dink32 DINK32 ROM monitor for PowerPC
3795 target m32r Renesas M32R/D ROM monitor
3796 target mon2000 mon2000 ROM monitor
3797 target ppcbug PPCBUG ROM monitor for PowerPC
3799 * Support for reading/writing memory and extracting values on architectures
3800 whose memory is addressable in units of any integral multiple of 8 bits.
3803 Allows to break when an Ada exception is handled.
3805 * New remote packets
3808 Indicates that an exec system call was executed.
3810 exec-events feature in qSupported
3811 The qSupported packet allows GDB to request support for exec
3812 events using the new 'gdbfeature' exec-event, and the qSupported
3813 response can contain the corresponding 'stubfeature'. Set and
3814 show commands can be used to display whether these features are enabled.
3817 Equivalent to interrupting with the ^C character, but works in
3820 thread created stop reason (T05 create:...)
3821 Indicates that the thread was just created and is stopped at entry.
3823 thread exit stop reply (w exitcode;tid)
3824 Indicates that the thread has terminated.
3827 Enables/disables thread create and exit event reporting. For
3828 example, this is used in non-stop mode when GDB stops a set of
3829 threads and synchronously waits for the their corresponding stop
3830 replies. Without exit events, if one of the threads exits, GDB
3831 would hang forever not knowing that it should no longer expect a
3832 stop for that same thread.
3835 Indicates that there are no resumed threads left in the target (all
3836 threads are stopped). The remote stub reports support for this stop
3837 reply to GDB's qSupported query.
3840 Enables/disables catching syscalls from the inferior process.
3841 The remote stub reports support for this packet to GDB's qSupported query.
3843 syscall_entry stop reason
3844 Indicates that a syscall was just called.
3846 syscall_return stop reason
3847 Indicates that a syscall just returned.
3849 * Extended-remote exec events
3851 ** GDB now has support for exec events on extended-remote Linux targets.
3852 For such targets with Linux kernels 2.5.46 and later, this enables
3853 follow-exec-mode and exec catchpoints.
3855 set remote exec-event-feature-packet
3856 show remote exec-event-feature-packet
3857 Set/show the use of the remote exec event feature.
3859 * Thread names in remote protocol
3861 The reply to qXfer:threads:read may now include a name attribute for each
3864 * Target remote mode fork and exec events
3866 ** GDB now has support for fork and exec events on target remote mode
3867 Linux targets. For such targets with Linux kernels 2.5.46 and later,
3868 this enables follow-fork-mode, detach-on-fork, follow-exec-mode, and
3869 fork and exec catchpoints.
3871 * Remote syscall events
3873 ** GDB now has support for catch syscall on remote Linux targets,
3874 currently enabled on x86/x86_64 architectures.
3876 set remote catch-syscall-packet
3877 show remote catch-syscall-packet
3878 Set/show the use of the remote catch syscall feature.
3882 ** The -var-set-format command now accepts the zero-hexadecimal
3883 format. It outputs data in hexadecimal format with zero-padding on the
3888 ** gdb.InferiorThread objects have a new attribute "global_num",
3889 which refers to the thread's global thread ID. The existing
3890 "num" attribute now refers to the thread's per-inferior number.
3891 See "Per-inferior thread numbers" above.
3892 ** gdb.InferiorThread objects have a new attribute "inferior", which
3893 is the Inferior object the thread belongs to.
3895 *** Changes in GDB 7.10
3897 * Support for process record-replay and reverse debugging on aarch64*-linux*
3898 targets has been added. GDB now supports recording of A64 instruction set
3899 including advance SIMD instructions.
3901 * Support for Sun's version of the "stabs" debug file format has been removed.
3903 * GDB now honors the content of the file /proc/PID/coredump_filter
3904 (PID is the process ID) on GNU/Linux systems. This file can be used
3905 to specify the types of memory mappings that will be included in a
3906 corefile. For more information, please refer to the manual page of
3907 "core(5)". GDB also has a new command: "set use-coredump-filter
3908 on|off". It allows to set whether GDB will read the content of the
3909 /proc/PID/coredump_filter file when generating a corefile.
3911 * The "info os" command on GNU/Linux can now display information on
3913 "info os cpus" Listing of all cpus/cores on the system
3915 * GDB has two new commands: "set serial parity odd|even|none" and
3916 "show serial parity". These allows to set or show parity for the
3919 * The "info source" command now displays the producer string if it was
3920 present in the debug info. This typically includes the compiler version
3921 and may include things like its command line arguments.
3923 * The "info dll", an alias of the "info sharedlibrary" command,
3924 is now available on all platforms.
3926 * Directory names supplied to the "set sysroot" commands may be
3927 prefixed with "target:" to tell GDB to access shared libraries from
3928 the target system, be it local or remote. This replaces the prefix
3929 "remote:". The default sysroot has been changed from "" to
3930 "target:". "remote:" is automatically converted to "target:" for
3931 backward compatibility.
3933 * The system root specified by "set sysroot" will be prepended to the
3934 filename of the main executable (if reported to GDB as absolute by
3935 the operating system) when starting processes remotely, and when
3936 attaching to already-running local or remote processes.
3938 * GDB now supports automatic location and retrieval of executable
3939 files from remote targets. Remote debugging can now be initiated
3940 using only a "target remote" or "target extended-remote" command
3941 (no "set sysroot" or "file" commands are required). See "New remote
3944 * The "dump" command now supports verilog hex format.
3946 * GDB now supports the vector ABI on S/390 GNU/Linux targets.
3948 * On GNU/Linux, GDB and gdbserver are now able to access executable
3949 and shared library files without a "set sysroot" command when
3950 attaching to processes running in different mount namespaces from
3951 the debugger. This makes it possible to attach to processes in
3952 containers as simply as "gdb -p PID" or "gdbserver --attach PID".
3953 See "New remote packets" below.
3955 * The "tui reg" command now provides completion for all of the
3956 available register groups, including target specific groups.
3958 * The HISTSIZE environment variable is no longer read when determining
3959 the size of GDB's command history. GDB now instead reads the dedicated
3960 GDBHISTSIZE environment variable. Setting GDBHISTSIZE to "-1" or to "" now
3961 disables truncation of command history. Non-numeric values of GDBHISTSIZE
3966 ** Memory ports can now be unbuffered.
3970 ** gdb.Objfile objects have a new attribute "username",
3971 which is the name of the objfile as specified by the user,
3972 without, for example, resolving symlinks.
3973 ** You can now write frame unwinders in Python.
3974 ** gdb.Type objects have a new method "optimized_out",
3975 returning optimized out gdb.Value instance of this type.
3976 ** gdb.Value objects have new methods "reference_value" and
3977 "const_value" which return a reference to the value and a
3978 "const" version of the value respectively.
3982 maint print symbol-cache
3983 Print the contents of the symbol cache.
3985 maint print symbol-cache-statistics
3986 Print statistics of symbol cache usage.
3988 maint flush-symbol-cache
3989 Flush the contents of the symbol cache.
3993 Start branch trace recording using Branch Trace Store (BTS) format.
3996 Evaluate expression by using the compiler and print result.
4000 Explicit commands for enabling and disabling tui mode.
4003 set mpx bound on i386 and amd64
4004 Support for bound table investigation on Intel MPX enabled applications.
4008 Start branch trace recording using Intel Processor Trace format.
4011 Print information about branch tracing internals.
4013 maint btrace packet-history
4014 Print the raw branch tracing data.
4016 maint btrace clear-packet-history
4017 Discard the stored raw branch tracing data.
4020 Discard all branch tracing data. It will be fetched and processed
4021 anew by the next "record" command.
4026 Renamed from "set debug dwarf2-die".
4027 show debug dwarf-die
4028 Renamed from "show debug dwarf2-die".
4030 set debug dwarf-read
4031 Renamed from "set debug dwarf2-read".
4032 show debug dwarf-read
4033 Renamed from "show debug dwarf2-read".
4035 maint set dwarf always-disassemble
4036 Renamed from "maint set dwarf2 always-disassemble".
4037 maint show dwarf always-disassemble
4038 Renamed from "maint show dwarf2 always-disassemble".
4040 maint set dwarf max-cache-age
4041 Renamed from "maint set dwarf2 max-cache-age".
4042 maint show dwarf max-cache-age
4043 Renamed from "maint show dwarf2 max-cache-age".
4045 set debug dwarf-line
4046 show debug dwarf-line
4047 Control display of debugging info regarding DWARF line processing.
4050 show max-completions
4051 Set the maximum number of candidates to be considered during
4052 completion. The default value is 200. This limit allows GDB
4053 to avoid generating large completion lists, the computation of
4054 which can cause the debugger to become temporarily unresponsive.
4056 set history remove-duplicates
4057 show history remove-duplicates
4058 Control the removal of duplicate history entries.
4060 maint set symbol-cache-size
4061 maint show symbol-cache-size
4062 Control the size of the symbol cache.
4064 set|show record btrace bts buffer-size
4065 Set and show the size of the ring buffer used for branch tracing in
4067 The obtained size may differ from the requested size. Use "info
4068 record" to see the obtained buffer size.
4070 set debug linux-namespaces
4071 show debug linux-namespaces
4072 Control display of debugging info regarding Linux namespaces.
4074 set|show record btrace pt buffer-size
4075 Set and show the size of the ring buffer used for branch tracing in
4076 Intel Processor Trace format.
4077 The obtained size may differ from the requested size. Use "info
4078 record" to see the obtained buffer size.
4080 maint set|show btrace pt skip-pad
4081 Set and show whether PAD packets are skipped when computing the
4084 * The command 'thread apply all' can now support new option '-ascending'
4085 to call its specified command for all threads in ascending order.
4087 * Python/Guile scripting
4089 ** GDB now supports auto-loading of Python/Guile scripts contained in the
4090 special section named `.debug_gdb_scripts'.
4092 * New remote packets
4094 qXfer:btrace-conf:read
4095 Return the branch trace configuration for the current thread.
4097 Qbtrace-conf:bts:size
4098 Set the requested ring buffer size for branch tracing in BTS format.
4101 Enable Intel Processor Trace-based branch tracing for the current
4102 process. The remote stub reports support for this packet to GDB's
4105 Qbtrace-conf:pt:size
4106 Set the requested ring buffer size for branch tracing in Intel Processor
4110 Indicates a memory breakpoint instruction was executed, irrespective
4111 of whether it was GDB that planted the breakpoint or the breakpoint
4112 is hardcoded in the program. This is required for correct non-stop
4116 Indicates the target stopped for a hardware breakpoint. This is
4117 required for correct non-stop mode operation.
4120 Return information about files on the remote system.
4122 qXfer:exec-file:read
4123 Return the full absolute name of the file that was executed to
4124 create a process running on the remote system.
4127 Select the filesystem on which vFile: operations with filename
4128 arguments will operate. This is required for GDB to be able to
4129 access files on remote targets where the remote stub does not
4130 share a common filesystem with the inferior(s).
4133 Indicates that a fork system call was executed.
4136 Indicates that a vfork system call was executed.
4138 vforkdone stop reason
4139 Indicates that a vfork child of the specified process has executed
4140 an exec or exit, allowing the vfork parent to resume execution.
4142 fork-events and vfork-events features in qSupported
4143 The qSupported packet allows GDB to request support for fork and
4144 vfork events using new 'gdbfeatures' fork-events and vfork-events,
4145 and the qSupported response can contain the corresponding
4146 'stubfeatures'. Set and show commands can be used to display
4147 whether these features are enabled.
4149 * Extended-remote fork events
4151 ** GDB now has support for fork events on extended-remote Linux
4152 targets. For targets with Linux kernels 2.5.60 and later, this
4153 enables follow-fork-mode and detach-on-fork for both fork and
4154 vfork, as well as fork and vfork catchpoints.
4156 * The info record command now shows the recording format and the
4157 branch tracing configuration for the current thread when using
4158 the btrace record target.
4159 For the BTS format, it shows the ring buffer size.
4161 * GDB now has support for DTrace USDT (Userland Static Defined
4162 Tracing) probes. The supported targets are x86_64-*-linux-gnu.
4164 * GDB now supports access to vector registers on S/390 GNU/Linux
4167 * Removed command line options
4169 -xdb HP-UX XDB compatibility mode.
4171 * Removed targets and native configurations
4173 HP/PA running HP-UX hppa*-*-hpux*
4174 Itanium running HP-UX ia64-*-hpux*
4176 * New configure options
4179 This configure option allows the user to build GDB with support for
4180 Intel Processor Trace (default: auto). This requires libipt.
4182 --with-libipt-prefix=PATH
4183 Specify the path to the version of libipt that GDB should use.
4184 $PATH/include should contain the intel-pt.h header and
4185 $PATH/lib should contain the libipt.so library.
4187 *** Changes in GDB 7.9.1
4191 ** Xmethods can now specify a result type.
4193 *** Changes in GDB 7.9
4195 * GDB now supports hardware watchpoints on x86 GNU Hurd.
4199 ** You can now access frame registers from Python scripts.
4200 ** New attribute 'producer' for gdb.Symtab objects.
4201 ** gdb.Objfile objects have a new attribute "progspace",
4202 which is the gdb.Progspace object of the containing program space.
4203 ** gdb.Objfile objects have a new attribute "owner".
4204 ** gdb.Objfile objects have a new attribute "build_id",
4205 which is the build ID generated when the file was built.
4206 ** gdb.Objfile objects have a new method "add_separate_debug_file".
4207 ** A new event "gdb.clear_objfiles" has been added, triggered when
4208 selecting a new file to debug.
4209 ** You can now add attributes to gdb.Objfile and gdb.Progspace objects.
4210 ** New function gdb.lookup_objfile.
4212 New events which are triggered when GDB modifies the state of the
4215 ** gdb.events.inferior_call_pre: Function call is about to be made.
4216 ** gdb.events.inferior_call_post: Function call has just been made.
4217 ** gdb.events.memory_changed: A memory location has been altered.
4218 ** gdb.events.register_changed: A register has been altered.
4220 * New Python-based convenience functions:
4222 ** $_caller_is(name [, number_of_frames])
4223 ** $_caller_matches(regexp [, number_of_frames])
4224 ** $_any_caller_is(name [, number_of_frames])
4225 ** $_any_caller_matches(regexp [, number_of_frames])
4227 * GDB now supports the compilation and injection of source code into
4228 the inferior. GDB will use GCC 5.0 or higher built with libcc1.so
4229 to compile the source code to object code, and if successful, inject
4230 and execute that code within the current context of the inferior.
4231 Currently the C language is supported. The commands used to
4232 interface with this new feature are:
4234 compile code [-raw|-r] [--] [source code]
4235 compile file [-raw|-r] filename
4239 demangle [-l language] [--] name
4240 Demangle "name" in the specified language, or the current language
4241 if elided. This command is renamed from the "maint demangle" command.
4242 The latter is kept as a no-op to avoid "maint demangle" being interpreted
4243 as "maint demangler-warning".
4245 queue-signal signal-name-or-number
4246 Queue a signal to be delivered to the thread when it is resumed.
4248 add-auto-load-scripts-directory directory
4249 Add entries to the list of directories from which to load auto-loaded
4252 maint print user-registers
4253 List all currently available "user" registers.
4255 compile code [-r|-raw] [--] [source code]
4256 Compile, inject, and execute in the inferior the executable object
4257 code produced by compiling the provided source code.
4259 compile file [-r|-raw] filename
4260 Compile and inject into the inferior the executable object code
4261 produced by compiling the source code stored in the filename
4264 * On resume, GDB now always passes the signal the program had stopped
4265 for to the thread the signal was sent to, even if the user changed
4266 threads before resuming. Previously GDB would often (but not
4267 always) deliver the signal to the thread that happens to be current
4270 * Conversely, the "signal" command now consistently delivers the
4271 requested signal to the current thread. GDB now asks for
4272 confirmation if the program had stopped for a signal and the user
4273 switched threads meanwhile.
4275 * "breakpoint always-inserted" modes "off" and "auto" merged.
4277 Now, when 'breakpoint always-inserted mode' is set to "off", GDB
4278 won't remove breakpoints from the target until all threads stop,
4279 even in non-stop mode. The "auto" mode has been removed, and "off"
4280 is now the default mode.
4284 set debug symbol-lookup
4285 show debug symbol-lookup
4286 Control display of debugging info regarding symbol lookup.
4290 ** The -list-thread-groups command outputs an exit-code field for
4291 inferiors that have exited.
4295 MIPS SDE mips*-sde*-elf*
4299 Support for these obsolete configurations has been removed.
4301 Alpha running OSF/1 (or Tru64) alpha*-*-osf*
4302 SGI Irix-5.x mips-*-irix5*
4303 SGI Irix-6.x mips-*-irix6*
4304 VAX running (4.2 - 4.3 Reno) BSD vax-*-bsd*
4305 VAX running Ultrix vax-*-ultrix*
4307 * The "dll-symbols" command, and its two aliases ("add-shared-symbol-files"
4308 and "assf"), have been removed. Use the "sharedlibrary" command, or
4309 its alias "share", instead.
4311 *** Changes in GDB 7.8
4313 * New command line options
4316 This is an alias for the --data-directory option.
4318 * GDB supports printing and modifying of variable length automatic arrays
4319 as specified in ISO C99.
4321 * The ARM simulator now supports instruction level tracing
4322 with or without disassembly.
4326 GDB now has support for scripting using Guile. Whether this is
4327 available is determined at configure time.
4328 Guile version 2.0 or greater is required.
4329 Guile version 2.0.9 is well tested, earlier 2.0 versions are not.
4331 * New commands (for set/show, see "New options" below)
4335 Invoke CODE by passing it to the Guile interpreter.
4339 Start a Guile interactive prompt (or "repl" for "read-eval-print loop").
4341 info auto-load guile-scripts [regexp]
4342 Print the list of automatically loaded Guile scripts.
4344 * The source command is now capable of sourcing Guile scripts.
4345 This feature is dependent on the debugger being built with Guile support.
4349 set print symbol-loading (off|brief|full)
4350 show print symbol-loading
4351 Control whether to print informational messages when loading symbol
4352 information for a file. The default is "full", but when debugging
4353 programs with large numbers of shared libraries the amount of output
4354 becomes less useful.
4356 set guile print-stack (none|message|full)
4357 show guile print-stack
4358 Show a stack trace when an error is encountered in a Guile script.
4360 set auto-load guile-scripts (on|off)
4361 show auto-load guile-scripts
4362 Control auto-loading of Guile script files.
4364 maint ada set ignore-descriptive-types (on|off)
4365 maint ada show ignore-descriptive-types
4366 Control whether the debugger should ignore descriptive types in Ada
4367 programs. The default is not to ignore the descriptive types. See
4368 the user manual for more details on descriptive types and the intended
4369 usage of this option.
4371 set auto-connect-native-target
4373 Control whether GDB is allowed to automatically connect to the
4374 native target for the run, attach, etc. commands when not connected
4375 to any target yet. See also "target native" below.
4377 set record btrace replay-memory-access (read-only|read-write)
4378 show record btrace replay-memory-access
4379 Control what memory accesses are allowed during replay.
4381 maint set target-async (on|off)
4382 maint show target-async
4383 This controls whether GDB targets operate in synchronous or
4384 asynchronous mode. Normally the default is asynchronous, if it is
4385 available; but this can be changed to more easily debug problems
4386 occurring only in synchronous mode.
4388 set mi-async (on|off)
4390 Control whether MI asynchronous mode is preferred. This supersedes
4391 "set target-async" of previous GDB versions.
4393 * "set target-async" is deprecated as a CLI option and is now an alias
4394 for "set mi-async" (only puts MI into async mode).
4396 * Background execution commands (e.g., "c&", "s&", etc.) are now
4397 possible ``out of the box'' if the target supports them. Previously
4398 the user would need to explicitly enable the possibility with the
4399 "set target-async on" command.
4401 * New features in the GDB remote stub, GDBserver
4403 ** New option --debug-format=option1[,option2,...] allows one to add
4404 additional text to each output. At present only timestamps
4405 are supported: --debug-format=timestamps.
4406 Timestamps can also be turned on with the
4407 "monitor set debug-format timestamps" command from GDB.
4409 * The 'record instruction-history' command now starts counting instructions
4410 at one. This also affects the instruction ranges reported by the
4411 'record function-call-history' command when given the /i modifier.
4413 * The command 'record function-call-history' supports a new modifier '/c' to
4414 indent the function names based on their call stack depth.
4415 The fields for the '/i' and '/l' modifier have been reordered.
4416 The source line range is now prefixed with 'at'.
4417 The instruction range is now prefixed with 'inst'.
4418 Both ranges are now printed as '<from>, <to>' to allow copy&paste to the
4419 "record instruction-history" and "list" commands.
4421 * The ranges given as arguments to the 'record function-call-history' and
4422 'record instruction-history' commands are now inclusive.
4424 * The btrace record target now supports the 'record goto' command.
4425 For locations inside the execution trace, the back trace is computed
4426 based on the information stored in the execution trace.
4428 * The btrace record target supports limited reverse execution and replay.
4429 The target does not record data and therefore does not allow reading
4430 memory or registers.
4432 * The "catch syscall" command now works on s390*-linux* targets.
4434 * The "compare-sections" command is no longer specific to target
4435 remote. It now works with all targets.
4437 * All native targets are now consistently called "native".
4438 Consequently, the "target child", "target GNU", "target djgpp",
4439 "target procfs" (Solaris/Irix/OSF/AIX) and "target darwin-child"
4440 commands have been replaced with "target native". The QNX/NTO port
4441 leaves the "procfs" target in place and adds a "native" target for
4442 consistency with other ports. The impact on users should be minimal
4443 as these commands previously either threw an error, or were
4444 no-ops. The target's name is visible in the output of the following
4445 commands: "help target", "info target", "info files", "maint print
4448 * The "target native" command now connects to the native target. This
4449 can be used to launch native programs even when "set
4450 auto-connect-native-target" is set to off.
4452 * GDB now supports access to Intel MPX registers on GNU/Linux.
4454 * Support for Intel AVX-512 registers on GNU/Linux.
4455 Support displaying and modifying Intel AVX-512 registers
4456 $zmm0 - $zmm31 and $k0 - $k7 on GNU/Linux.
4458 * New remote packets
4460 qXfer:btrace:read's annex
4461 The qXfer:btrace:read packet supports a new annex 'delta' to read
4462 branch trace incrementally.
4466 ** Valid Python operations on gdb.Value objects representing
4467 structs/classes invoke the corresponding overloaded operators if
4469 ** New `Xmethods' feature in the Python API. Xmethods are
4470 additional methods or replacements for existing methods of a C++
4471 class. This feature is useful for those cases where a method
4472 defined in C++ source code could be inlined or optimized out by
4473 the compiler, making it unavailable to GDB.
4476 PowerPC64 GNU/Linux little-endian powerpc64le-*-linux*
4478 * The "dll-symbols" command, and its two aliases ("add-shared-symbol-files"
4479 and "assf"), have been deprecated. Use the "sharedlibrary" command, or
4480 its alias "share", instead.
4482 * The commands "set remotebaud" and "show remotebaud" are no longer
4483 supported. Use "set serial baud" and "show serial baud" (respectively)
4488 ** A new option "-gdb-set mi-async" replaces "-gdb-set
4489 target-async". The latter is left as a deprecated alias of the
4490 former for backward compatibility. If the target supports it,
4491 CLI background execution commands are now always possible by
4492 default, independently of whether the frontend stated a
4493 preference for asynchronous execution with "-gdb-set mi-async".
4494 Previously "-gdb-set target-async off" affected both MI execution
4495 commands and CLI execution commands.
4497 *** Changes in GDB 7.7
4499 * Improved support for process record-replay and reverse debugging on
4500 arm*-linux* targets. Support for thumb32 and syscall instruction
4501 recording has been added.
4503 * GDB now supports SystemTap SDT probes on AArch64 GNU/Linux.
4505 * GDB now supports Fission DWP file format version 2.
4506 http://gcc.gnu.org/wiki/DebugFission
4508 * New convenience function "$_isvoid", to check whether an expression
4509 is void. A void expression is an expression where the type of the
4510 result is "void". For example, some convenience variables may be
4511 "void" when evaluated (e.g., "$_exitcode" before the execution of
4512 the program being debugged; or an undefined convenience variable).
4513 Another example, when calling a function whose return type is
4516 * The "maintenance print objfiles" command now takes an optional regexp.
4518 * The "catch syscall" command now works on arm*-linux* targets.
4520 * GDB now consistently shows "<not saved>" when printing values of
4521 registers the debug info indicates have not been saved in the frame
4522 and there's nowhere to retrieve them from
4523 (callee-saved/call-clobbered registers):
4528 (gdb) info registers rax
4531 Before, the former would print "<optimized out>", and the latter
4532 "*value not available*".
4534 * New script contrib/gdb-add-index.sh for adding .gdb_index sections
4539 ** Frame filters and frame decorators have been added.
4540 ** Temporary breakpoints are now supported.
4541 ** Line tables representation has been added.
4542 ** New attribute 'parent_type' for gdb.Field objects.
4543 ** gdb.Field objects can be used as subscripts on gdb.Value objects.
4544 ** New attribute 'name' for gdb.Type objects.
4548 Nios II ELF nios2*-*-elf
4549 Nios II GNU/Linux nios2*-*-linux
4550 Texas Instruments MSP430 msp430*-*-elf
4552 * Removed native configurations
4554 Support for these a.out NetBSD and OpenBSD obsolete configurations has
4555 been removed. ELF variants of these configurations are kept supported.
4557 arm*-*-netbsd* but arm*-*-netbsdelf* is kept supported.
4558 i[34567]86-*-netbsd* but i[34567]86-*-netbsdelf* is kept supported.
4559 i[34567]86-*-openbsd[0-2].* but i[34567]86-*-openbsd* is kept supported.
4560 i[34567]86-*-openbsd3.[0-3]
4561 m68*-*-netbsd* but m68*-*-netbsdelf* is kept supported.
4562 sparc-*-netbsd* but sparc-*-netbsdelf* is kept supported.
4563 vax-*-netbsd* but vax-*-netbsdelf* is kept supported.
4567 Like "catch throw", but catches a re-thrown exception.
4568 maint check-psymtabs
4569 Renamed from old "maint check-symtabs".
4571 Perform consistency checks on symtabs.
4572 maint expand-symtabs
4573 Expand symtabs matching an optional regexp.
4576 Display the details of GDB configure-time options.
4578 maint set|show per-command
4579 maint set|show per-command space
4580 maint set|show per-command time
4581 maint set|show per-command symtab
4582 Enable display of per-command gdb resource usage.
4584 remove-symbol-file FILENAME
4585 remove-symbol-file -a ADDRESS
4586 Remove a symbol file added via add-symbol-file. The file to remove
4587 can be identified by its filename or by an address that lies within
4588 the boundaries of this symbol file in memory.
4591 info exceptions REGEXP
4592 Display the list of Ada exceptions defined in the program being
4593 debugged. If provided, only the exceptions whose names match REGEXP
4598 set debug symfile off|on
4600 Control display of debugging info regarding reading symbol files and
4601 symbol tables within those files
4603 set print raw frame-arguments
4604 show print raw frame-arguments
4605 Set/show whether to print frame arguments in raw mode,
4606 disregarding any defined pretty-printers.
4608 set remote trace-status-packet
4609 show remote trace-status-packet
4610 Set/show the use of remote protocol qTStatus packet.
4614 Control display of debugging messages related to Nios II targets.
4618 Control whether target-assisted range stepping is enabled.
4620 set startup-with-shell
4621 show startup-with-shell
4622 Specifies whether Unix child processes are started via a shell or
4627 Use the target memory cache for accesses to the code segment. This
4628 improves performance of remote debugging (particularly disassembly).
4630 * You can now use a literal value 'unlimited' for options that
4631 interpret 0 or -1 as meaning "unlimited". E.g., "set
4632 trace-buffer-size unlimited" is now an alias for "set
4633 trace-buffer-size -1" and "set height unlimited" is now an alias for
4636 * The "set debug symtab-create" debugging option of GDB has been changed to
4637 accept a verbosity level. 0 means "off", 1 provides basic debugging
4638 output, and values of 2 or greater provides more verbose output.
4640 * New command-line options
4642 Display the details of GDB configure-time options.
4644 * The command 'tsave' can now support new option '-ctf' to save trace
4645 buffer in Common Trace Format.
4647 * Newly installed $prefix/bin/gcore acts as a shell interface for the
4650 * GDB now implements the C++ 'typeid' operator.
4652 * The new convenience variable $_exception holds the exception being
4653 thrown or caught at an exception-related catchpoint.
4655 * The exception-related catchpoints, like "catch throw", now accept a
4656 regular expression which can be used to filter exceptions by type.
4658 * The new convenience variable $_exitsignal is automatically set to
4659 the terminating signal number when the program being debugged dies
4660 due to an uncaught signal.
4664 ** All MI commands now accept an optional "--language" option.
4665 Support for this feature can be verified by using the "-list-features"
4666 command, which should contain "language-option".
4668 ** The new command -info-gdb-mi-command allows the user to determine
4669 whether a GDB/MI command is supported or not.
4671 ** The "^error" result record returned when trying to execute an undefined
4672 GDB/MI command now provides a variable named "code" whose content is the
4673 "undefined-command" error code. Support for this feature can be verified
4674 by using the "-list-features" command, which should contain
4675 "undefined-command-error-code".
4677 ** The -trace-save MI command can optionally save trace buffer in Common
4680 ** The new command -dprintf-insert sets a dynamic printf breakpoint.
4682 ** The command -data-list-register-values now accepts an optional
4683 "--skip-unavailable" option. When used, only the available registers
4686 ** The new command -trace-frame-collected dumps collected variables,
4687 computed expressions, tvars, memory and registers in a traceframe.
4689 ** The commands -stack-list-locals, -stack-list-arguments and
4690 -stack-list-variables now accept an option "--skip-unavailable".
4691 When used, only the available locals or arguments are displayed.
4693 ** The -exec-run command now accepts an optional "--start" option.
4694 When used, the command follows the same semantics as the "start"
4695 command, stopping the program's execution at the start of its
4696 main subprogram. Support for this feature can be verified using
4697 the "-list-features" command, which should contain
4698 "exec-run-start-option".
4700 ** The new commands -catch-assert and -catch-exceptions insert
4701 catchpoints stopping the program when Ada exceptions are raised.
4703 ** The new command -info-ada-exceptions provides the equivalent of
4704 the new "info exceptions" command.
4706 * New system-wide configuration scripts
4707 A GDB installation now provides scripts suitable for use as system-wide
4708 configuration scripts for the following systems:
4712 * GDB now supports target-assigned range stepping with remote targets.
4713 This improves the performance of stepping source lines by reducing
4714 the number of control packets from/to GDB. See "New remote packets"
4717 * GDB now understands the element 'tvar' in the XML traceframe info.
4718 It has the id of the collected trace state variables.
4720 * On S/390 targets that provide the transactional-execution feature,
4721 the program interruption transaction diagnostic block (TDB) is now
4722 represented as a number of additional "registers" in GDB.
4724 * New remote packets
4728 The vCont packet supports a new 'r' action, that tells the remote
4729 stub to step through an address range itself, without GDB
4730 involvemement at each single-step.
4732 qXfer:libraries-svr4:read's annex
4733 The previously unused annex of the qXfer:libraries-svr4:read packet
4734 is now used to support passing an argument list. The remote stub
4735 reports support for this argument list to GDB's qSupported query.
4736 The defined arguments are "start" and "prev", used to reduce work
4737 necessary for library list updating, resulting in significant
4740 * New features in the GDB remote stub, GDBserver
4742 ** GDBserver now supports target-assisted range stepping. Currently
4743 enabled on x86/x86_64 GNU/Linux targets.
4745 ** GDBserver now adds element 'tvar' in the XML in the reply to
4746 'qXfer:traceframe-info:read'. It has the id of the collected
4747 trace state variables.
4749 ** GDBserver now supports hardware watchpoints on the MIPS GNU/Linux
4752 * New 'z' formatter for printing and examining memory, this displays the
4753 value as hexadecimal zero padded on the left to the size of the type.
4755 * GDB can now use Windows x64 unwinding data.
4757 * The "set remotebaud" command has been replaced by "set serial baud".
4758 Similarly, "show remotebaud" has been replaced by "show serial baud".
4759 The "set remotebaud" and "show remotebaud" commands are still available
4760 to provide backward compatibility with older versions of GDB.
4762 *** Changes in GDB 7.6
4764 * Target record has been renamed to record-full.
4765 Record/replay is now enabled with the "record full" command.
4766 This also affects settings that are associated with full record/replay
4767 that have been moved from "set/show record" to "set/show record full":
4769 set|show record full insn-number-max
4770 set|show record full stop-at-limit
4771 set|show record full memory-query
4773 * A new record target "record-btrace" has been added. The new target
4774 uses hardware support to record the control-flow of a process. It
4775 does not support replaying the execution, but it implements the
4776 below new commands for investigating the recorded execution log.
4777 This new recording method can be enabled using:
4781 The "record-btrace" target is only available on Intel Atom processors
4782 and requires a Linux kernel 2.6.32 or later.
4784 * Two new commands have been added for record/replay to give information
4785 about the recorded execution without having to replay the execution.
4786 The commands are only supported by "record btrace".
4788 record instruction-history prints the execution history at
4789 instruction granularity
4791 record function-call-history prints the execution history at
4792 function granularity
4794 * New native configurations
4796 ARM AArch64 GNU/Linux aarch64*-*-linux-gnu
4797 FreeBSD/powerpc powerpc*-*-freebsd
4798 x86_64/Cygwin x86_64-*-cygwin*
4799 Tilera TILE-Gx GNU/Linux tilegx*-*-linux-gnu
4803 ARM AArch64 aarch64*-*-elf
4804 ARM AArch64 GNU/Linux aarch64*-*-linux
4805 Lynx 178 PowerPC powerpc-*-lynx*178
4806 x86_64/Cygwin x86_64-*-cygwin*
4807 Tilera TILE-Gx GNU/Linux tilegx*-*-linux
4809 * If the configured location of system.gdbinit file (as given by the
4810 --with-system-gdbinit option at configure time) is in the
4811 data-directory (as specified by --with-gdb-datadir at configure
4812 time) or in one of its subdirectories, then GDB will look for the
4813 system-wide init file in the directory specified by the
4814 --data-directory command-line option.
4816 * New command line options:
4818 -nh Disables auto-loading of ~/.gdbinit, but still executes all the
4819 other initialization files, unlike -nx which disables all of them.
4821 * Removed command line options
4823 -epoch This was used by the gdb mode in Epoch, an ancient fork of
4826 * The 'ptype' and 'whatis' commands now accept an argument to control
4829 * 'info proc' now works on some core files.
4833 ** Vectors can be created with gdb.Type.vector.
4835 ** Python's atexit.register now works in GDB.
4837 ** Types can be pretty-printed via a Python API.
4839 ** Python 3 is now supported (in addition to Python 2.4 or later)
4841 ** New class gdb.Architecture exposes GDB's internal representation
4842 of architecture in the Python API.
4844 ** New method Frame.architecture returns the gdb.Architecture object
4845 corresponding to the frame's architecture.
4847 * New Python-based convenience functions:
4849 ** $_memeq(buf1, buf2, length)
4850 ** $_streq(str1, str2)
4852 ** $_regex(str, regex)
4854 * The 'cd' command now defaults to using '~' (the home directory) if not
4857 * The C++ ABI now defaults to the GNU v3 ABI. This has been the
4858 default for GCC since November 2000.
4860 * The command 'forward-search' can now be abbreviated as 'fo'.
4862 * The command 'info tracepoints' can now display 'installed on target'
4863 or 'not installed on target' for each non-pending location of tracepoint.
4865 * New configure options
4867 --enable-libmcheck/--disable-libmcheck
4868 By default, development versions are built with -lmcheck on hosts
4869 that support it, in order to help track memory corruption issues.
4870 Release versions, on the other hand, are built without -lmcheck
4871 by default. The --enable-libmcheck/--disable-libmcheck configure
4872 options allow the user to override that default.
4873 --with-babeltrace/--with-babeltrace-include/--with-babeltrace-lib
4874 This configure option allows the user to build GDB with
4875 libbabeltrace using which GDB can read Common Trace Format data.
4877 * New commands (for set/show, see "New options" below)
4880 Catch signals. This is similar to "handle", but allows commands and
4881 conditions to be attached.
4884 List the BFDs known to GDB.
4886 python-interactive [command]
4888 Start a Python interactive prompt, or evaluate the optional command
4889 and print the result of expressions.
4892 "py" is a new alias for "python".
4894 enable type-printer [name]...
4895 disable type-printer [name]...
4896 Enable or disable type printers.
4900 ** For the Renesas Super-H architecture, the "regs" command has been removed
4901 (has been deprecated in GDB 7.5), and "info all-registers" should be used
4906 set print type methods (on|off)
4907 show print type methods
4908 Control whether method declarations are displayed by "ptype".
4909 The default is to show them.
4911 set print type typedefs (on|off)
4912 show print type typedefs
4913 Control whether typedef definitions are displayed by "ptype".
4914 The default is to show them.
4916 set filename-display basename|relative|absolute
4917 show filename-display
4918 Control the way in which filenames is displayed.
4919 The default is "relative", which preserves previous behavior.
4921 set trace-buffer-size
4922 show trace-buffer-size
4923 Request target to change the size of trace buffer.
4925 set remote trace-buffer-size-packet auto|on|off
4926 show remote trace-buffer-size-packet
4927 Control the use of the remote protocol `QTBuffer:size' packet.
4931 Control display of debugging messages related to ARM AArch64.
4934 set debug coff-pe-read
4935 show debug coff-pe-read
4936 Control display of debugging messages related to reading of COFF/PE
4941 Control display of debugging messages related to Mach-O symbols
4944 set debug notification
4945 show debug notification
4946 Control display of debugging info for async remote notification.
4950 ** Command parameter changes are now notified using new async record
4951 "=cmd-param-changed".
4952 ** Trace frame changes caused by command "tfind" are now notified using
4953 new async record "=traceframe-changed".
4954 ** The creation, deletion and modification of trace state variables
4955 are now notified using new async records "=tsv-created",
4956 "=tsv-deleted" and "=tsv-modified".
4957 ** The start and stop of process record are now notified using new
4958 async record "=record-started" and "=record-stopped".
4959 ** Memory changes are now notified using new async record
4961 ** The data-disassemble command response will include a "fullname" field
4962 containing the absolute file name when source has been requested.
4963 ** New optional parameter COUNT added to the "-data-write-memory-bytes"
4964 command, to allow pattern filling of memory areas.
4965 ** New commands "-catch-load"/"-catch-unload" added for intercepting
4966 library load/unload events.
4967 ** The response to breakpoint commands and breakpoint async records
4968 includes an "installed" field containing a boolean state about each
4969 non-pending tracepoint location is whether installed on target or not.
4970 ** Output of the "-trace-status" command includes a "trace-file" field
4971 containing the name of the trace file being examined. This field is
4972 optional, and only present when examining a trace file.
4973 ** The "fullname" field is now always present along with the "file" field,
4974 even if the file cannot be found by GDB.
4976 * GDB now supports the "mini debuginfo" section, .gnu_debugdata.
4977 You must have the LZMA library available when configuring GDB for this
4978 feature to be enabled. For more information, see:
4979 http://fedoraproject.org/wiki/Features/MiniDebugInfo
4981 * New remote packets
4984 Set the size of trace buffer. The remote stub reports support for this
4985 packet to gdb's qSupported query.
4988 Enable Branch Trace Store (BTS)-based branch tracing for the current
4989 thread. The remote stub reports support for this packet to gdb's
4993 Disable branch tracing for the current thread. The remote stub reports
4994 support for this packet to gdb's qSupported query.
4997 Read the traced branches for the current thread. The remote stub
4998 reports support for this packet to gdb's qSupported query.
5000 *** Changes in GDB 7.5
5002 * GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/>
5003 for more x32 ABI info.
5005 * GDB now supports access to MIPS DSP registers on Linux targets.
5007 * GDB now supports debugging microMIPS binaries.
5009 * The "info os" command on GNU/Linux can now display information on
5010 several new classes of objects managed by the operating system:
5011 "info os procgroups" lists process groups
5012 "info os files" lists file descriptors
5013 "info os sockets" lists internet-domain sockets
5014 "info os shm" lists shared-memory regions
5015 "info os semaphores" lists semaphores
5016 "info os msg" lists message queues
5017 "info os modules" lists loaded kernel modules
5019 * GDB now has support for SDT (Static Defined Tracing) probes. Currently,
5020 the only implemented backend is for SystemTap probes (<sys/sdt.h>). You
5021 can set a breakpoint using the new "-probe, "-pstap" or "-probe-stap"
5022 options and inspect the probe arguments using the new $_probe_arg family
5023 of convenience variables. You can obtain more information about SystemTap
5024 in <http://sourceware.org/systemtap/>.
5026 * GDB now supports reversible debugging on ARM, it allows you to
5027 debug basic ARM and THUMB instructions, and provides
5028 record/replay support.
5030 * The option "symbol-reloading" has been deleted as it is no longer used.
5034 ** GDB commands implemented in Python can now be put in command class
5037 ** The "maint set python print-stack on|off" is now deleted.
5039 ** A new class, gdb.printing.FlagEnumerationPrinter, can be used to
5040 apply "flag enum"-style pretty-printing to any enum.
5042 ** gdb.lookup_symbol can now work when there is no current frame.
5044 ** gdb.Symbol now has a 'line' attribute, holding the line number in
5045 the source at which the symbol was defined.
5047 ** gdb.Symbol now has the new attribute 'needs_frame' and the new
5048 method 'value'. The former indicates whether the symbol needs a
5049 frame in order to compute its value, and the latter computes the
5052 ** A new method 'referenced_value' on gdb.Value objects which can
5053 dereference pointer as well as C++ reference values.
5055 ** New methods 'global_block' and 'static_block' on gdb.Symtab objects
5056 which return the global and static blocks (as gdb.Block objects),
5057 of the underlying symbol table, respectively.
5059 ** New function gdb.find_pc_line which returns the gdb.Symtab_and_line
5060 object associated with a PC value.
5062 ** gdb.Symtab_and_line has new attribute 'last' which holds the end
5063 of the address range occupied by code for the current source line.
5065 * Go language support.
5066 GDB now supports debugging programs written in the Go programming
5069 * GDBserver now supports stdio connections.
5070 E.g. (gdb) target remote | ssh myhost gdbserver - hello
5072 * The binary "gdbtui" can no longer be built or installed.
5073 Use "gdb -tui" instead.
5075 * GDB will now print "flag" enums specially. A flag enum is one where
5076 all the enumerator values have no bits in common when pairwise
5077 "and"ed. When printing a value whose type is a flag enum, GDB will
5078 show all the constants, e.g., for enum E { ONE = 1, TWO = 2}:
5079 (gdb) print (enum E) 3
5082 * The filename part of a linespec will now match trailing components
5083 of a source file name. For example, "break gcc/expr.c:1000" will
5084 now set a breakpoint in build/gcc/expr.c, but not
5085 build/libcpp/expr.c.
5087 * The "info proc" and "generate-core-file" commands will now also
5088 work on remote targets connected to GDBserver on Linux.
5090 * The command "info catch" has been removed. It has been disabled
5091 since December 2007.
5093 * The "catch exception" and "catch assert" commands now accept
5094 a condition at the end of the command, much like the "break"
5095 command does. For instance:
5097 (gdb) catch exception Constraint_Error if Barrier = True
5099 Previously, it was possible to add a condition to such catchpoints,
5100 but it had to be done as a second step, after the catchpoint had been
5101 created, using the "condition" command.
5103 * The "info static-tracepoint-marker" command will now also work on
5104 native Linux targets with in-process agent.
5106 * GDB can now set breakpoints on inlined functions.
5108 * The .gdb_index section has been updated to include symbols for
5109 inlined functions. GDB will ignore older .gdb_index sections by
5110 default, which could cause symbol files to be loaded more slowly
5111 until their .gdb_index sections can be recreated. The new command
5112 "set use-deprecated-index-sections on" will cause GDB to use any older
5113 .gdb_index sections it finds. This will restore performance, but the
5114 ability to set breakpoints on inlined functions will be lost in symbol
5115 files with older .gdb_index sections.
5117 The .gdb_index section has also been updated to record more information
5118 about each symbol. This speeds up the "info variables", "info functions"
5119 and "info types" commands when used with programs having the .gdb_index
5120 section, as well as speeding up debugging with shared libraries using
5121 the .gdb_index section.
5123 * Ada support for GDB/MI Variable Objects has been added.
5125 * GDB can now support 'breakpoint always-inserted mode' in 'record'
5130 ** New command -info-os is the MI equivalent of "info os".
5132 ** Output logs ("set logging" and related) now include MI output.
5136 ** "set use-deprecated-index-sections on|off"
5137 "show use-deprecated-index-sections on|off"
5138 Controls the use of deprecated .gdb_index sections.
5140 ** "catch load" and "catch unload" can be used to stop when a shared
5141 library is loaded or unloaded, respectively.
5143 ** "enable count" can be used to auto-disable a breakpoint after
5146 ** "info vtbl" can be used to show the virtual method tables for
5147 C++ and Java objects.
5149 ** "explore" and its sub commands "explore value" and "explore type"
5150 can be used to recursively explore values and types of
5151 expressions. These commands are available only if GDB is
5152 configured with '--with-python'.
5154 ** "info auto-load" shows status of all kinds of auto-loaded files,
5155 "info auto-load gdb-scripts" shows status of auto-loading GDB canned
5156 sequences of commands files, "info auto-load python-scripts"
5157 shows status of auto-loading Python script files,
5158 "info auto-load local-gdbinit" shows status of loading init file
5159 (.gdbinit) from current directory and "info auto-load libthread-db" shows
5160 status of inferior specific thread debugging shared library loading.
5162 ** "info auto-load-scripts", "set auto-load-scripts on|off"
5163 and "show auto-load-scripts" commands have been deprecated, use their
5164 "info auto-load python-scripts", "set auto-load python-scripts on|off"
5165 and "show auto-load python-scripts" counterparts instead.
5167 ** "dprintf location,format,args..." creates a dynamic printf, which
5168 is basically a breakpoint that does a printf and immediately
5169 resumes your program's execution, so it is like a printf that you
5170 can insert dynamically at runtime instead of at compile time.
5172 ** "set print symbol"
5174 Controls whether GDB attempts to display the symbol, if any,
5175 corresponding to addresses it prints. This defaults to "on", but
5176 you can set it to "off" to restore GDB's previous behavior.
5178 * Deprecated commands
5180 ** For the Renesas Super-H architecture, the "regs" command has been
5181 deprecated, and "info all-registers" should be used instead.
5185 Renesas RL78 rl78-*-elf
5186 HP OpenVMS ia64 ia64-hp-openvms*
5188 * GDBserver supports evaluation of breakpoint conditions. When
5189 support is advertised by GDBserver, GDB may be told to send the
5190 breakpoint conditions in bytecode form to GDBserver. GDBserver
5191 will only report the breakpoint trigger to GDB when its condition
5196 set mips compression
5197 show mips compression
5198 Select the compressed ISA encoding used in functions that have no symbol
5199 information available. The encoding can be set to either of:
5202 and is updated automatically from ELF file flags if available.
5204 set breakpoint condition-evaluation
5205 show breakpoint condition-evaluation
5206 Control whether breakpoint conditions are evaluated by GDB ("host") or by
5207 GDBserver ("target"). Default option "auto" chooses the most efficient
5209 This option can improve debugger efficiency depending on the speed of the
5213 Disable auto-loading globally.
5216 Show auto-loading setting of all kinds of auto-loaded files.
5218 set auto-load gdb-scripts on|off
5219 show auto-load gdb-scripts
5220 Control auto-loading of GDB canned sequences of commands files.
5222 set auto-load python-scripts on|off
5223 show auto-load python-scripts
5224 Control auto-loading of Python script files.
5226 set auto-load local-gdbinit on|off
5227 show auto-load local-gdbinit
5228 Control loading of init file (.gdbinit) from current directory.
5230 set auto-load libthread-db on|off
5231 show auto-load libthread-db
5232 Control auto-loading of inferior specific thread debugging shared library.
5234 set auto-load scripts-directory <dir1>[:<dir2>...]
5235 show auto-load scripts-directory
5236 Set a list of directories from which to load auto-loaded scripts.
5237 Automatically loaded Python scripts and GDB scripts are located in one
5238 of the directories listed by this option.
5239 The delimiter (':' above) may differ according to the host platform.
5241 set auto-load safe-path <dir1>[:<dir2>...]
5242 show auto-load safe-path
5243 Set a list of directories from which it is safe to auto-load files.
5244 The delimiter (':' above) may differ according to the host platform.
5246 set debug auto-load on|off
5247 show debug auto-load
5248 Control display of debugging info for auto-loading the files above.
5250 set dprintf-style gdb|call|agent
5252 Control the way in which a dynamic printf is performed; "gdb"
5253 requests a GDB printf command, while "call" causes dprintf to call a
5254 function in the inferior. "agent" requests that the target agent
5255 (such as GDBserver) do the printing.
5257 set dprintf-function <expr>
5258 show dprintf-function
5259 set dprintf-channel <expr>
5260 show dprintf-channel
5261 Set the function and optional first argument to the call when using
5262 the "call" style of dynamic printf.
5264 set disconnected-dprintf on|off
5265 show disconnected-dprintf
5266 Control whether agent-style dynamic printfs continue to be in effect
5267 after GDB disconnects.
5269 * New configure options
5271 --with-auto-load-dir
5272 Configure default value for the 'set auto-load scripts-directory'
5273 setting above. It defaults to '$debugdir:$datadir/auto-load',
5274 $debugdir representing global debugging info directories (available
5275 via 'show debug-file-directory') and $datadir representing GDB's data
5276 directory (available via 'show data-directory').
5278 --with-auto-load-safe-path
5279 Configure default value for the 'set auto-load safe-path' setting
5280 above. It defaults to the --with-auto-load-dir setting.
5282 --without-auto-load-safe-path
5283 Set 'set auto-load safe-path' to '/', effectively disabling this
5286 * New remote packets
5288 z0/z1 conditional breakpoints extension
5290 The z0/z1 breakpoint insertion packets have been extended to carry
5291 a list of conditional expressions over to the remote stub depending on the
5292 condition evaluation mode. The use of this extension can be controlled
5293 via the "set remote conditional-breakpoints-packet" command.
5297 Specify the signals which the remote stub may pass to the debugged
5298 program without GDB involvement.
5300 * New command line options
5302 --init-command=FILE, -ix Like --command, -x but execute it
5303 before loading inferior.
5304 --init-eval-command=COMMAND, -iex Like --eval-command=COMMAND, -ex but
5305 execute it before loading inferior.
5307 *** Changes in GDB 7.4
5309 * GDB now handles ambiguous linespecs more consistently; the existing
5310 FILE:LINE support has been expanded to other types of linespecs. A
5311 breakpoint will now be set on all matching locations in all
5312 inferiors, and locations will be added or removed according to
5315 * GDB now allows you to skip uninteresting functions and files when
5316 stepping with the "skip function" and "skip file" commands.
5318 * GDB has two new commands: "set remote hardware-watchpoint-length-limit"
5319 and "show remote hardware-watchpoint-length-limit". These allows to
5320 set or show the maximum length limit (in bytes) of a remote
5321 target hardware watchpoint.
5323 This allows e.g. to use "unlimited" hardware watchpoints with the
5324 gdbserver integrated in Valgrind version >= 3.7.0. Such Valgrind
5325 watchpoints are slower than real hardware watchpoints but are
5326 significantly faster than gdb software watchpoints.
5330 ** The register_pretty_printer function in module gdb.printing now takes
5331 an optional `replace' argument. If True, the new printer replaces any
5334 ** The "maint set python print-stack on|off" command has been
5335 deprecated and will be deleted in GDB 7.5.
5336 A new command: "set python print-stack none|full|message" has
5337 replaced it. Additionally, the default for "print-stack" is
5338 now "message", which just prints the error message without
5341 ** A prompt substitution hook (prompt_hook) is now available to the
5344 ** A new Python module, gdb.prompt has been added to the GDB Python
5345 modules library. This module provides functionality for
5346 escape sequences in prompts (used by set/show
5347 extended-prompt). These escape sequences are replaced by their
5348 corresponding value.
5350 ** Python commands and convenience-functions located in
5351 'data-directory'/python/gdb/command and
5352 'data-directory'/python/gdb/function are now automatically loaded
5355 ** Blocks now provide four new attributes. global_block and
5356 static_block will return the global and static blocks
5357 respectively. is_static and is_global are boolean attributes
5358 that indicate if the block is one of those two types.
5360 ** Symbols now provide the "type" attribute, the type of the symbol.
5362 ** The "gdb.breakpoint" function has been deprecated in favor of
5365 ** A new class "gdb.FinishBreakpoint" is provided to catch the return
5366 of a function. This class is based on the "finish" command
5367 available in the CLI.
5369 ** Type objects for struct and union types now allow access to
5370 the fields using standard Python dictionary (mapping) methods.
5371 For example, "some_type['myfield']" now works, as does
5372 "some_type.items()".
5374 ** A new event "gdb.new_objfile" has been added, triggered by loading a
5377 ** A new function, "deep_items" has been added to the gdb.types
5378 module in the GDB Python modules library. This function returns
5379 an iterator over the fields of a struct or union type. Unlike
5380 the standard Python "iteritems" method, it will recursively traverse
5381 any anonymous fields.
5385 ** "*stopped" events can report several new "reason"s, such as
5388 ** Breakpoint changes are now notified using new async records, like
5389 "=breakpoint-modified".
5391 ** New command -ada-task-info.
5393 * libthread-db-search-path now supports two special values: $sdir and $pdir.
5394 $sdir specifies the default system locations of shared libraries.
5395 $pdir specifies the directory where the libpthread used by the application
5398 GDB no longer looks in $sdir and $pdir after it has searched the directories
5399 mentioned in libthread-db-search-path. If you want to search those
5400 directories, they must be specified in libthread-db-search-path.
5401 The default value of libthread-db-search-path on GNU/Linux and Solaris
5402 systems is now "$sdir:$pdir".
5404 $pdir is not supported by gdbserver, it is currently ignored.
5405 $sdir is supported by gdbserver.
5407 * New configure option --with-iconv-bin.
5408 When using the internationalization support like the one in the GNU C
5409 library, GDB will invoke the "iconv" program to get a list of supported
5410 character sets. If this program lives in a non-standard location, one can
5411 use this option to specify where to find it.
5413 * When natively debugging programs on PowerPC BookE processors running
5414 a Linux kernel version 2.6.34 or later, GDB supports masked hardware
5415 watchpoints, which specify a mask in addition to an address to watch.
5416 The mask specifies that some bits of an address (the bits which are
5417 reset in the mask) should be ignored when matching the address accessed
5418 by the inferior against the watchpoint address. See the "PowerPC Embedded"
5419 section in the user manual for more details.
5421 * The new option --once causes GDBserver to stop listening for connections once
5422 the first connection is made. The listening port used by GDBserver will
5423 become available after that.
5425 * New commands "info macros" and "alias" have been added.
5427 * New function parameters suffix @entry specifies value of function parameter
5428 at the time the function got called. Entry values are available only since
5434 "!" is now an alias of the "shell" command.
5435 Note that no space is needed between "!" and SHELL COMMAND.
5439 watch EXPRESSION mask MASK_VALUE
5440 The watch command now supports the mask argument which allows creation
5441 of masked watchpoints, if the current architecture supports this feature.
5443 info auto-load-scripts [REGEXP]
5444 This command was formerly named "maintenance print section-scripts".
5445 It is now generally useful and is no longer a maintenance-only command.
5447 info macro [-all] [--] MACRO
5448 The info macro command has new options `-all' and `--'. The first for
5449 printing all definitions of a macro. The second for explicitly specifying
5450 the end of arguments and the beginning of the macro name in case the macro
5451 name starts with a hyphen.
5453 collect[/s] EXPRESSIONS
5454 The tracepoint collect command now takes an optional modifier "/s"
5455 that directs it to dereference pointer-to-character types and
5456 collect the bytes of memory up to a zero byte. The behavior is
5457 similar to what you see when you use the regular print command on a
5458 string. An optional integer following the "/s" sets a bound on the
5459 number of bytes that will be collected.
5462 The trace start command now interprets any supplied arguments as a
5463 note to be recorded with the trace run, with an effect similar to
5464 setting the variable trace-notes.
5467 The trace stop command now interprets any arguments as a note to be
5468 mentioned along with the tstatus report that the trace was stopped
5469 with a command. The effect is similar to setting the variable
5472 * Tracepoints can now be enabled and disabled at any time after a trace
5473 experiment has been started using the standard "enable" and "disable"
5474 commands. It is now possible to start a trace experiment with no enabled
5475 tracepoints; GDB will display a warning, but will allow the experiment to
5476 begin, assuming that tracepoints will be enabled as needed while the trace
5479 * Fast tracepoints on 32-bit x86-architectures can now be placed at
5480 locations with 4-byte instructions, when they were previously
5481 limited to locations with instructions of 5 bytes or longer.
5485 set debug dwarf2-read
5486 show debug dwarf2-read
5487 Turns on or off display of debugging messages related to reading
5488 DWARF debug info. The default is off.
5490 set debug symtab-create
5491 show debug symtab-create
5492 Turns on or off display of debugging messages related to symbol table
5493 creation. The default is off.
5496 show extended-prompt
5497 Set the GDB prompt, and allow escape sequences to be inserted to
5498 display miscellaneous information (see 'help set extended-prompt'
5499 for the list of sequences). This prompt (and any information
5500 accessed through the escape sequences) is updated every time the
5501 prompt is displayed.
5503 set print entry-values (both|compact|default|if-needed|no|only|preferred)
5504 show print entry-values
5505 Set printing of frame argument values at function entry. In some cases
5506 GDB can determine the value of function argument which was passed by the
5507 function caller, even if the value was modified inside the called function.
5509 set debug entry-values
5510 show debug entry-values
5511 Control display of debugging info for determining frame argument values at
5512 function entry and virtual tail call frames.
5514 set basenames-may-differ
5515 show basenames-may-differ
5516 Set whether a source file may have multiple base names.
5517 (A "base name" is the name of a file with the directory part removed.
5518 Example: The base name of "/home/user/hello.c" is "hello.c".)
5519 If set, GDB will canonicalize file names (e.g., expand symlinks)
5520 before comparing them. Canonicalization is an expensive operation,
5521 but it allows the same file be known by more than one base name.
5522 If not set (the default), all source files are assumed to have just
5523 one base name, and gdb will do file name comparisons more efficiently.
5529 Set a user name and notes for the current and any future trace runs.
5530 This is useful for long-running and/or disconnected traces, to
5531 inform others (or yourself) as to who is running the trace, supply
5532 contact information, or otherwise explain what is going on.
5534 set trace-stop-notes
5535 show trace-stop-notes
5536 Set a note attached to the trace run, that is displayed when the
5537 trace has been stopped by a tstop command. This is useful for
5538 instance as an explanation, if you are stopping a trace run that was
5539 started by someone else.
5541 * New remote packets
5545 Dynamically enable a tracepoint in a started trace experiment.
5549 Dynamically disable a tracepoint in a started trace experiment.
5553 Set the user and notes of the trace run.
5557 Query the current status of a tracepoint.
5561 Query the minimum length of instruction at which a fast tracepoint may
5564 * Dcache size (number of lines) and line-size are now runtime-configurable
5565 via "set dcache line" and "set dcache line-size" commands.
5569 Texas Instruments TMS320C6x tic6x-*-*
5573 Renesas RL78 rl78-*-elf
5575 *** Changes in GDB 7.3.1
5577 * The build failure for NetBSD and OpenBSD targets have now been fixed.
5579 *** Changes in GDB 7.3
5581 * GDB has a new command: "thread find [REGEXP]".
5582 It finds the thread id whose name, target id, or thread extra info
5583 matches the given regular expression.
5585 * The "catch syscall" command now works on mips*-linux* targets.
5587 * The -data-disassemble MI command now supports modes 2 and 3 for
5588 dumping the instruction opcodes.
5590 * New command line options
5592 -data-directory DIR Specify DIR as the "data-directory".
5593 This is mostly for testing purposes.
5595 * The "maint set python auto-load on|off" command has been renamed to
5596 "set auto-load-scripts on|off".
5598 * GDB has a new command: "set directories".
5599 It is like the "dir" command except that it replaces the
5600 source path list instead of augmenting it.
5602 * GDB now understands thread names.
5604 On GNU/Linux, "info threads" will display the thread name as set by
5605 prctl or pthread_setname_np.
5607 There is also a new command, "thread name", which can be used to
5608 assign a name internally for GDB to display.
5611 Initial support for the OpenCL C language (http://www.khronos.org/opencl)
5612 has been integrated into GDB.
5616 ** The function gdb.Write now accepts an optional keyword 'stream'.
5617 This keyword, when provided, will direct the output to either
5618 stdout, stderr, or GDB's logging output.
5620 ** Parameters can now be be sub-classed in Python, and in particular
5621 you may implement the get_set_doc and get_show_doc functions.
5622 This improves how Parameter set/show documentation is processed
5623 and allows for more dynamic content.
5625 ** Symbols, Symbol Table, Symbol Table and Line, Object Files,
5626 Inferior, Inferior Thread, Blocks, and Block Iterator APIs now
5627 have an is_valid method.
5629 ** Breakpoints can now be sub-classed in Python, and in particular
5630 you may implement a 'stop' function that is executed each time
5631 the inferior reaches that breakpoint.
5633 ** New function gdb.lookup_global_symbol looks up a global symbol.
5635 ** GDB values in Python are now callable if the value represents a
5636 function. For example, if 'some_value' represents a function that
5637 takes two integer parameters and returns a value, you can call
5638 that function like so:
5640 result = some_value (10,20)
5642 ** Module gdb.types has been added.
5643 It contains a collection of utilities for working with gdb.Types objects:
5644 get_basic_type, has_field, make_enum_dict.
5646 ** Module gdb.printing has been added.
5647 It contains utilities for writing and registering pretty-printers.
5648 New classes: PrettyPrinter, SubPrettyPrinter,
5649 RegexpCollectionPrettyPrinter.
5650 New function: register_pretty_printer.
5652 ** New commands "info pretty-printers", "enable pretty-printer" and
5653 "disable pretty-printer" have been added.
5655 ** gdb.parameter("directories") is now available.
5657 ** New function gdb.newest_frame returns the newest frame in the
5660 ** The gdb.InferiorThread class has a new "name" attribute. This
5661 holds the thread's name.
5663 ** Python Support for Inferior events.
5664 Python scripts can add observers to be notified of events
5665 occurring in the process being debugged.
5666 The following events are currently supported:
5667 - gdb.events.cont Continue event.
5668 - gdb.events.exited Inferior exited event.
5669 - gdb.events.stop Signal received, and Breakpoint hit events.
5673 ** GDB now puts template parameters in scope when debugging in an
5674 instantiation. For example, if you have:
5676 template<int X> int func (void) { return X; }
5678 then if you step into func<5>, "print X" will show "5". This
5679 feature requires proper debuginfo support from the compiler; it
5680 was added to GCC 4.5.
5682 ** The motion commands "next", "finish", "until", and "advance" now
5683 work better when exceptions are thrown. In particular, GDB will
5684 no longer lose control of the inferior; instead, the GDB will
5685 stop the inferior at the point at which the exception is caught.
5686 This functionality requires a change in the exception handling
5687 code that was introduced in GCC 4.5.
5689 * GDB now follows GCC's rules on accessing volatile objects when
5690 reading or writing target state during expression evaluation.
5691 One notable difference to prior behavior is that "print x = 0"
5692 no longer generates a read of x; the value of the assignment is
5693 now always taken directly from the value being assigned.
5695 * GDB now has some support for using labels in the program's source in
5696 linespecs. For instance, you can use "advance label" to continue
5697 execution to a label.
5699 * GDB now has support for reading and writing a new .gdb_index
5700 section. This section holds a fast index of DWARF debugging
5701 information and can be used to greatly speed up GDB startup and
5702 operation. See the documentation for `save gdb-index' for details.
5704 * The "watch" command now accepts an optional "-location" argument.
5705 When used, this causes GDB to watch the memory referred to by the
5706 expression. Such a watchpoint is never deleted due to it going out
5709 * GDB now supports thread debugging of core dumps on GNU/Linux.
5711 GDB now activates thread debugging using the libthread_db library
5712 when debugging GNU/Linux core dumps, similarly to when debugging
5713 live processes. As a result, when debugging a core dump file, GDB
5714 is now able to display pthread_t ids of threads. For example, "info
5715 threads" shows the same output as when debugging the process when it
5716 was live. In earlier releases, you'd see something like this:
5719 * 1 LWP 6780 main () at main.c:10
5721 While now you see this:
5724 * 1 Thread 0x7f0f5712a700 (LWP 6780) main () at main.c:10
5726 It is also now possible to inspect TLS variables when debugging core
5729 When debugging a core dump generated on a machine other than the one
5730 used to run GDB, you may need to point GDB at the correct
5731 libthread_db library with the "set libthread-db-search-path"
5732 command. See the user manual for more details on this command.
5734 * When natively debugging programs on PowerPC BookE processors running
5735 a Linux kernel version 2.6.34 or later, GDB supports ranged breakpoints,
5736 which stop execution of the inferior whenever it executes an instruction
5737 at any address within the specified range. See the "PowerPC Embedded"
5738 section in the user manual for more details.
5740 * New features in the GDB remote stub, GDBserver
5742 ** GDBserver is now supported on PowerPC LynxOS (versions 4.x and 5.x),
5743 and i686 LynxOS (version 5.x).
5745 ** GDBserver is now supported on Blackfin Linux.
5747 * New native configurations
5749 ia64 HP-UX ia64-*-hpux*
5753 Analog Devices, Inc. Blackfin Processor bfin-*
5755 * Ada task switching is now supported on sparc-elf targets when
5756 debugging a program using the Ravenscar Profile. For more information,
5757 see the "Tasking Support when using the Ravenscar Profile" section
5758 in the GDB user manual.
5760 * Guile support was removed.
5762 * New features in the GNU simulator
5764 ** The --map-info flag lists all known core mappings.
5766 ** CFI flashes may be simulated via the "cfi" device.
5768 *** Changes in GDB 7.2
5770 * Shared library support for remote targets by default
5772 When GDB is configured for a generic, non-OS specific target, like
5773 for example, --target=arm-eabi or one of the many *-*-elf targets,
5774 GDB now queries remote stubs for loaded shared libraries using the
5775 `qXfer:libraries:read' packet. Previously, shared library support
5776 was always disabled for such configurations.
5780 ** Argument Dependent Lookup (ADL)
5782 In C++ ADL lookup directs function search to the namespaces of its
5783 arguments even if the namespace has not been imported.
5793 Here the compiler will search for `foo' in the namespace of 'b'
5794 and find A::foo. GDB now supports this. This construct is commonly
5795 used in the Standard Template Library for operators.
5797 ** Improved User Defined Operator Support
5799 In addition to member operators, GDB now supports lookup of operators
5800 defined in a namespace and imported with a `using' directive, operators
5801 defined in the global scope, operators imported implicitly from an
5802 anonymous namespace, and the ADL operators mentioned in the previous
5804 GDB now also supports proper overload resolution for all the previously
5805 mentioned flavors of operators.
5807 ** static const class members
5809 Printing of static const class members that are initialized in the
5810 class definition has been fixed.
5812 * Windows Thread Information Block access.
5814 On Windows targets, GDB now supports displaying the Windows Thread
5815 Information Block (TIB) structure. This structure is visible either
5816 by using the new command `info w32 thread-information-block' or, by
5817 dereferencing the new convenience variable named `$_tlb', a
5818 thread-specific pointer to the TIB. This feature is also supported
5819 when remote debugging using GDBserver.
5821 * Static tracepoints
5823 Static tracepoints are calls in the user program into a tracing
5824 library. One such library is a port of the LTTng kernel tracer to
5825 userspace --- UST (LTTng Userspace Tracer, http://lttng.org/ust).
5826 When debugging with GDBserver, GDB now supports combining the GDB
5827 tracepoint machinery with such libraries. For example: the user can
5828 use GDB to probe a static tracepoint marker (a call from the user
5829 program into the tracing library) with the new "strace" command (see
5830 "New commands" below). This creates a "static tracepoint" in the
5831 breakpoint list, that can be manipulated with the same feature set
5832 as fast and regular tracepoints. E.g., collect registers, local and
5833 global variables, collect trace state variables, and define
5834 tracepoint conditions. In addition, the user can collect extra
5835 static tracepoint marker specific data, by collecting the new
5836 $_sdata internal variable. When analyzing the trace buffer, you can
5837 inspect $_sdata like any other variable available to GDB. For more
5838 information, see the "Tracepoints" chapter in GDB user manual. New
5839 remote packets have been defined to support static tracepoints, see
5840 the "New remote packets" section below.
5842 * Better reconstruction of tracepoints after disconnected tracing
5844 GDB will attempt to download the original source form of tracepoint
5845 definitions when starting a trace run, and then will upload these
5846 upon reconnection to the target, resulting in a more accurate
5847 reconstruction of the tracepoints that are in use on the target.
5851 You can now exercise direct control over the ways that GDB can
5852 affect your program. For instance, you can disallow the setting of
5853 breakpoints, so that the program can run continuously (assuming
5854 non-stop mode). In addition, the "observer" variable is available
5855 to switch all of the different controls; in observer mode, GDB
5856 cannot affect the target's behavior at all, which is useful for
5857 tasks like diagnosing live systems in the field.
5859 * The new convenience variable $_thread holds the number of the
5862 * New remote packets
5866 Return the address of the Windows Thread Information Block of a given thread.
5870 In response to several of the tracepoint packets, the target may now
5871 also respond with a number of intermediate `qRelocInsn' request
5872 packets before the final result packet, to have GDB handle
5873 relocating an instruction to execute at a different address. This
5874 is particularly useful for stubs that support fast tracepoints. GDB
5875 reports support for this feature in the qSupported packet.
5879 List static tracepoint markers in the target program.
5883 List static tracepoint markers at a given address in the target
5886 qXfer:statictrace:read
5888 Read the static trace data collected (by a `collect $_sdata'
5889 tracepoint action). The remote stub reports support for this packet
5890 to gdb's qSupported query.
5894 Send the current settings of GDB's permission flags.
5898 Send part of the source (textual) form of a tracepoint definition,
5899 which includes location, conditional, and action list.
5901 * The source command now accepts a -s option to force searching for the
5902 script in the source search path even if the script name specifies
5905 * New features in the GDB remote stub, GDBserver
5907 - GDBserver now support tracepoints (including fast tracepoints, and
5908 static tracepoints). The feature is currently supported by the
5909 i386-linux and amd64-linux builds. See the "Tracepoints support
5910 in gdbserver" section in the manual for more information.
5912 GDBserver JIT compiles the tracepoint's conditional agent
5913 expression bytecode into native code whenever possible for low
5914 overhead dynamic tracepoints conditionals. For such tracepoints,
5915 an expression that examines program state is evaluated when the
5916 tracepoint is reached, in order to determine whether to capture
5917 trace data. If the condition is simple and false, processing the
5918 tracepoint finishes very quickly and no data is gathered.
5920 GDBserver interfaces with the UST (LTTng Userspace Tracer) library
5921 for static tracepoints support.
5923 - GDBserver now supports x86_64 Windows 64-bit debugging.
5925 * GDB now sends xmlRegisters= in qSupported packet to indicate that
5926 it understands register description.
5928 * The --batch flag now disables pagination and queries.
5930 * X86 general purpose registers
5932 GDB now supports reading/writing byte, word and double-word x86
5933 general purpose registers directly. This means you can use, say,
5934 $ah or $ax to refer, respectively, to the byte register AH and
5935 16-bit word register AX that are actually portions of the 32-bit
5936 register EAX or 64-bit register RAX.
5938 * The `commands' command now accepts a range of breakpoints to modify.
5939 A plain `commands' following a command that creates multiple
5940 breakpoints affects all the breakpoints set by that command. This
5941 applies to breakpoints set by `rbreak', and also applies when a
5942 single `break' command creates multiple breakpoints (e.g.,
5943 breakpoints on overloaded c++ functions).
5945 * The `rbreak' command now accepts a filename specification as part of
5946 its argument, limiting the functions selected by the regex to those
5947 in the specified file.
5949 * Support for remote debugging Windows and SymbianOS shared libraries
5950 from Unix hosts has been improved. Non Windows GDB builds now can
5951 understand target reported file names that follow MS-DOS based file
5952 system semantics, such as file names that include drive letters and
5953 use the backslash character as directory separator. This makes it
5954 possible to transparently use the "set sysroot" and "set
5955 solib-search-path" on Unix hosts to point as host copies of the
5956 target's shared libraries. See the new command "set
5957 target-file-system-kind" described below, and the "Commands to
5958 specify files" section in the user manual for more information.
5962 eval template, expressions...
5963 Convert the values of one or more expressions under the control
5964 of the string template to a command line, and call it.
5966 set target-file-system-kind unix|dos-based|auto
5967 show target-file-system-kind
5968 Set or show the assumed file system kind for target reported file
5971 save breakpoints <filename>
5972 Save all current breakpoint definitions to a file suitable for use
5973 in a later debugging session. To read the saved breakpoint
5974 definitions, use the `source' command.
5976 `save tracepoints' is a new alias for `save-tracepoints'. The latter
5979 info static-tracepoint-markers
5980 Display information about static tracepoint markers in the target.
5982 strace FN | FILE:LINE | *ADDR | -m MARKER_ID
5983 Define a static tracepoint by probing a marker at the given
5984 function, line, address, or marker ID.
5988 Enable and disable observer mode.
5990 set may-write-registers on|off
5991 set may-write-memory on|off
5992 set may-insert-breakpoints on|off
5993 set may-insert-tracepoints on|off
5994 set may-insert-fast-tracepoints on|off
5995 set may-interrupt on|off
5996 Set individual permissions for GDB effects on the target. Note that
5997 some of these settings can have undesirable or surprising
5998 consequences, particularly when changed in the middle of a session.
5999 For instance, disabling the writing of memory can prevent
6000 breakpoints from being inserted, cause single-stepping to fail, or
6001 even crash your program, if you disable after breakpoints have been
6002 inserted. However, GDB should not crash.
6004 set record memory-query on|off
6005 show record memory-query
6006 Control whether to stop the inferior if memory changes caused
6007 by an instruction cannot be recorded.
6012 The disassemble command now supports "start,+length" form of two arguments.
6016 ** GDB now provides a new directory location, called the python directory,
6017 where Python scripts written for GDB can be installed. The location
6018 of that directory is <data-directory>/python, where <data-directory>
6019 is the GDB data directory. For more details, see section `Scripting
6020 GDB using Python' in the manual.
6022 ** The GDB Python API now has access to breakpoints, symbols, symbol
6023 tables, program spaces, inferiors, threads and frame's code blocks.
6024 Additionally, GDB Parameters can now be created from the API, and
6025 manipulated via set/show in the CLI.
6027 ** New functions gdb.target_charset, gdb.target_wide_charset,
6028 gdb.progspaces, gdb.current_progspace, and gdb.string_to_argv.
6030 ** New exception gdb.GdbError.
6032 ** Pretty-printers are now also looked up in the current program space.
6034 ** Pretty-printers can now be individually enabled and disabled.
6036 ** GDB now looks for names of Python scripts to auto-load in a
6037 special section named `.debug_gdb_scripts', in addition to looking
6038 for a OBJFILE-gdb.py script when OBJFILE is read by the debugger.
6040 * Tracepoint actions were unified with breakpoint commands. In particular,
6041 there are no longer differences in "info break" output for breakpoints and
6042 tracepoints and the "commands" command can be used for both tracepoints and
6043 regular breakpoints.
6047 ARM Symbian arm*-*-symbianelf*
6049 * D language support.
6050 GDB now supports debugging programs written in the D programming
6053 * GDB now supports the extended ptrace interface for PowerPC which is
6054 available since Linux kernel version 2.6.34. This automatically enables
6055 any hardware breakpoints and additional hardware watchpoints available in
6056 the processor. The old ptrace interface exposes just one hardware
6057 watchpoint and no hardware breakpoints.
6059 * GDB is now able to use the Data Value Compare (DVC) register available on
6060 embedded PowerPC processors to implement in hardware simple watchpoint
6061 conditions of the form:
6063 watch ADDRESS|VARIABLE if ADDRESS|VARIABLE == CONSTANT EXPRESSION
6065 This works in native GDB running on Linux kernels with the extended ptrace
6066 interface mentioned above.
6068 *** Changes in GDB 7.1
6072 ** Namespace Support
6074 GDB now supports importing of namespaces in C++. This enables the
6075 user to inspect variables from imported namespaces. Support for
6076 namespace aliasing has also been added. So, if a namespace is
6077 aliased in the current scope (e.g. namespace C=A; ) the user can
6078 print variables using the alias (e.g. (gdb) print C::x).
6082 All known bugs relating to the printing of virtual base class were
6083 fixed. It is now possible to call overloaded static methods using a
6088 The C++ cast operators static_cast<>, dynamic_cast<>, const_cast<>,
6089 and reinterpret_cast<> are now handled by the C++ expression parser.
6093 Xilinx MicroBlaze microblaze-*-*
6098 Xilinx MicroBlaze microblaze
6101 * Multi-program debugging.
6103 GDB now has support for multi-program (a.k.a. multi-executable or
6104 multi-exec) debugging. This allows for debugging multiple inferiors
6105 simultaneously each running a different program under the same GDB
6106 session. See "Debugging Multiple Inferiors and Programs" in the
6107 manual for more information. This implied some user visible changes
6108 in the multi-inferior support. For example, "info inferiors" now
6109 lists inferiors that are not running yet or that have exited
6110 already. See also "New commands" and "New options" below.
6112 * New tracing features
6114 GDB's tracepoint facility now includes several new features:
6116 ** Trace state variables
6118 GDB tracepoints now include support for trace state variables, which
6119 are variables managed by the target agent during a tracing
6120 experiment. They are useful for tracepoints that trigger each
6121 other, so for instance one tracepoint can count hits in a variable,
6122 and then a second tracepoint has a condition that is true when the
6123 count reaches a particular value. Trace state variables share the
6124 $-syntax of GDB convenience variables, and can appear in both
6125 tracepoint actions and condition expressions. Use the "tvariable"
6126 command to create, and "info tvariables" to view; see "Trace State
6127 Variables" in the manual for more detail.
6131 GDB now includes an option for defining fast tracepoints, which
6132 targets may implement more efficiently, such as by installing a jump
6133 into the target agent rather than a trap instruction. The resulting
6134 speedup can be by two orders of magnitude or more, although the
6135 tradeoff is that some program locations on some target architectures
6136 might not allow fast tracepoint installation, for instance if the
6137 instruction to be replaced is shorter than the jump. To request a
6138 fast tracepoint, use the "ftrace" command, with syntax identical to
6139 the regular trace command.
6141 ** Disconnected tracing
6143 It is now possible to detach GDB from the target while it is running
6144 a trace experiment, then reconnect later to see how the experiment
6145 is going. In addition, a new variable disconnected-tracing lets you
6146 tell the target agent whether to continue running a trace if the
6147 connection is lost unexpectedly.
6151 GDB now has the ability to save the trace buffer into a file, and
6152 then use that file as a target, similarly to you can do with
6153 corefiles. You can select trace frames, print data that was
6154 collected in them, and use tstatus to display the state of the
6155 tracing run at the moment that it was saved. To create a trace
6156 file, use "tsave <filename>", and to use it, do "target tfile
6159 ** Circular trace buffer
6161 You can ask the target agent to handle the trace buffer as a
6162 circular buffer, discarding the oldest trace frames to make room for
6163 newer ones, by setting circular-trace-buffer to on. This feature may
6164 not be available for all target agents.
6169 The disassemble command, when invoked with two arguments, now requires
6170 the arguments to be comma-separated.
6173 The info variables command now displays variable definitions. Files
6174 which only declare a variable are not shown.
6177 The source command is now capable of sourcing Python scripts.
6178 This feature is dependent on the debugger being build with Python
6181 Related to this enhancement is also the introduction of a new command
6182 "set script-extension" (see below).
6184 * New commands (for set/show, see "New options" below)
6186 record save [<FILENAME>]
6187 Save a file (in core file format) containing the process record
6188 execution log for replay debugging at a later time.
6190 record restore <FILENAME>
6191 Restore the process record execution log that was saved at an
6192 earlier time, for replay debugging.
6194 add-inferior [-copies <N>] [-exec <FILENAME>]
6197 clone-inferior [-copies <N>] [ID]
6198 Make a new inferior ready to execute the same program another
6199 inferior has loaded.
6204 maint info program-spaces
6205 List the program spaces loaded into GDB.
6207 set remote interrupt-sequence [Ctrl-C | BREAK | BREAK-g]
6208 show remote interrupt-sequence
6209 Allow the user to select one of ^C, a BREAK signal or BREAK-g
6210 as the sequence to the remote target in order to interrupt the execution.
6211 Ctrl-C is a default. Some system prefers BREAK which is high level of
6212 serial line for some certain time. Linux kernel prefers BREAK-g, a.k.a
6213 Magic SysRq g. It is BREAK signal and character 'g'.
6215 set remote interrupt-on-connect [on | off]
6216 show remote interrupt-on-connect
6217 When interrupt-on-connect is ON, gdb sends interrupt-sequence to
6218 remote target when gdb connects to it. This is needed when you debug
6221 set remotebreak [on | off]
6223 Deprecated. Use "set/show remote interrupt-sequence" instead.
6225 tvariable $NAME [ = EXP ]
6226 Create or modify a trace state variable.
6229 List trace state variables and their values.
6231 delete tvariable $NAME ...
6232 Delete one or more trace state variables.
6235 Evaluate the given expressions without collecting anything into the
6236 trace buffer. (Valid in tracepoint actions only.)
6238 ftrace FN / FILE:LINE / *ADDR
6239 Define a fast tracepoint at the given function, line, or address.
6241 * New expression syntax
6243 GDB now parses the 0b prefix of binary numbers the same way as GCC does.
6244 GDB now parses 0b101010 identically with 42.
6248 set follow-exec-mode new|same
6249 show follow-exec-mode
6250 Control whether GDB reuses the same inferior across an exec call or
6251 creates a new one. This is useful to be able to restart the old
6252 executable after the inferior having done an exec call.
6254 set default-collect EXPR, ...
6255 show default-collect
6256 Define a list of expressions to be collected at each tracepoint.
6257 This is a useful way to ensure essential items are not overlooked,
6258 such as registers or a critical global variable.
6260 set disconnected-tracing
6261 show disconnected-tracing
6262 If set to 1, the target is instructed to continue tracing if it
6263 loses its connection to GDB. If 0, the target is to stop tracing
6266 set circular-trace-buffer
6267 show circular-trace-buffer
6268 If set to on, the target is instructed to use a circular trace buffer
6269 and discard the oldest trace frames instead of stopping the trace due
6270 to a full trace buffer. If set to off, the trace stops when the buffer
6271 fills up. Some targets may not support this.
6273 set script-extension off|soft|strict
6274 show script-extension
6275 If set to "off", the debugger does not perform any script language
6276 recognition, and all sourced files are assumed to be GDB scripts.
6277 If set to "soft" (the default), files are sourced according to
6278 filename extension, falling back to GDB scripts if the first
6280 If set to "strict", files are sourced according to filename extension.
6282 set ada trust-PAD-over-XVS on|off
6283 show ada trust-PAD-over-XVS
6284 If off, activate a workaround against a bug in the debugging information
6285 generated by the compiler for PAD types (see gcc/exp_dbug.ads in
6286 the GCC sources for more information about the GNAT encoding and
6287 PAD types in particular). It is always safe to set this option to
6288 off, but this introduces a slight performance penalty. The default
6291 * Python API Improvements
6293 ** GDB provides the new class gdb.LazyString. This is useful in
6294 some pretty-printing cases. The new method gdb.Value.lazy_string
6295 provides a simple way to create objects of this type.
6297 ** The fields returned by gdb.Type.fields now have an
6298 `is_base_class' attribute.
6300 ** The new method gdb.Type.range returns the range of an array type.
6302 ** The new method gdb.parse_and_eval can be used to parse and
6303 evaluate an expression.
6305 * New remote packets
6308 Define a trace state variable.
6311 Get the current value of a trace state variable.
6314 Set desired tracing behavior upon disconnection.
6317 Set the trace buffer to be linear or circular.
6320 Get data about the tracepoints currently in use.
6324 Process record now works correctly with hardware watchpoints.
6326 Multiple bug fixes have been made to the mips-irix port, making it
6327 much more reliable. In particular:
6328 - Debugging threaded applications is now possible again. Previously,
6329 GDB would hang while starting the program, or while waiting for
6330 the program to stop at a breakpoint.
6331 - Attaching to a running process no longer hangs.
6332 - An error occurring while loading a core file has been fixed.
6333 - Changing the value of the PC register now works again. This fixes
6334 problems observed when using the "jump" command, or when calling
6335 a function from GDB, or even when assigning a new value to $pc.
6336 - With the "finish" and "return" commands, the return value for functions
6337 returning a small array is now correctly printed.
6338 - It is now possible to break on shared library code which gets executed
6339 during a shared library init phase (code executed while executing
6340 their .init section). Previously, the breakpoint would have no effect.
6341 - GDB is now able to backtrace through the signal handler for
6342 non-threaded programs.
6344 PIE (Position Independent Executable) programs debugging is now supported.
6345 This includes debugging execution of PIC (Position Independent Code) shared
6346 libraries although for that, it should be possible to run such libraries as an
6349 *** Changes in GDB 7.0
6351 * GDB now has an interface for JIT compilation. Applications that
6352 dynamically generate code can create symbol files in memory and register
6353 them with GDB. For users, the feature should work transparently, and
6354 for JIT developers, the interface is documented in the GDB manual in the
6355 "JIT Compilation Interface" chapter.
6357 * Tracepoints may now be conditional. The syntax is as for
6358 breakpoints; either an "if" clause appended to the "trace" command,
6359 or the "condition" command is available. GDB sends the condition to
6360 the target for evaluation using the same bytecode format as is used
6361 for tracepoint actions.
6363 * The disassemble command now supports: an optional /r modifier, print the
6364 raw instructions in hex as well as in symbolic form, and an optional /m
6365 modifier to print mixed source+assembly.
6367 * Process record and replay
6369 In a architecture environment that supports ``process record and
6370 replay'', ``process record and replay'' target can record a log of
6371 the process execution, and replay it with both forward and reverse
6374 * Reverse debugging: GDB now has new commands reverse-continue, reverse-
6375 step, reverse-next, reverse-finish, reverse-stepi, reverse-nexti, and
6376 set execution-direction {forward|reverse}, for targets that support
6379 * GDB now supports hardware watchpoints on MIPS/Linux systems. This
6380 feature is available with a native GDB running on kernel version
6383 * GDB now has support for multi-byte and wide character sets on the
6384 target. Strings whose character type is wchar_t, char16_t, or
6385 char32_t are now correctly printed. GDB supports wide- and unicode-
6386 literals in C, that is, L'x', L"string", u'x', u"string", U'x', and
6387 U"string" syntax. And, GDB allows the "%ls" and "%lc" formats in
6388 `printf'. This feature requires iconv to work properly; if your
6389 system does not have a working iconv, GDB can use GNU libiconv. See
6390 the installation instructions for more information.
6392 * GDB now supports automatic retrieval of shared library files from
6393 remote targets. To use this feature, specify a system root that begins
6394 with the `remote:' prefix, either via the `set sysroot' command or via
6395 the `--with-sysroot' configure-time option.
6397 * "info sharedlibrary" now takes an optional regex of libraries to show,
6398 and it now reports if a shared library has no debugging information.
6400 * Commands `set debug-file-directory', `set solib-search-path' and `set args'
6401 now complete on file names.
6403 * When completing in expressions, gdb will attempt to limit
6404 completions to allowable structure or union fields, where appropriate.
6405 For instance, consider:
6407 # struct example { int f1; double f2; };
6408 # struct example variable;
6411 If the user types TAB at the end of this command line, the available
6412 completions will be "f1" and "f2".
6414 * Inlined functions are now supported. They show up in backtraces, and
6415 the "step", "next", and "finish" commands handle them automatically.
6417 * GDB now supports the token-splicing (##) and stringification (#)
6418 operators when expanding macros. It also supports variable-arity
6421 * GDB now supports inspecting extra signal information, exported by
6422 the new $_siginfo convenience variable. The feature is currently
6423 implemented on linux ARM, i386 and amd64.
6425 * GDB can now display the VFP floating point registers and NEON vector
6426 registers on ARM targets. Both ARM GNU/Linux native GDB and gdbserver
6427 can provide these registers (requires Linux 2.6.30 or later). Remote
6428 and simulator targets may also provide them.
6430 * New remote packets
6433 Search memory for a sequence of bytes.
6436 Turn off `+'/`-' protocol acknowledgments to permit more efficient
6437 operation over reliable transport links. Use of this packet is
6438 controlled by the `set remote noack-packet' command.
6441 Kill the process with the specified process ID. Use this in preference
6442 to `k' when multiprocess protocol extensions are supported.
6445 Obtains additional operating system information
6449 Read or write additional signal information.
6451 * Removed remote protocol undocumented extension
6453 An undocumented extension to the remote protocol's `S' stop reply
6454 packet that permitted the stub to pass a process id was removed.
6455 Remote servers should use the `T' stop reply packet instead.
6457 * GDB now supports multiple function calling conventions according to the
6458 DWARF-2 DW_AT_calling_convention function attribute.
6460 * The SH target utilizes the aforementioned change to distinguish between gcc
6461 and Renesas calling convention. It also adds the new CLI commands
6462 `set/show sh calling-convention'.
6464 * GDB can now read compressed debug sections, as produced by GNU gold
6465 with the --compress-debug-sections=zlib flag.
6467 * 64-bit core files are now supported on AIX.
6469 * Thread switching is now supported on Tru64.
6471 * Watchpoints can now be set on unreadable memory locations, e.g. addresses
6472 which will be allocated using malloc later in program execution.
6474 * The qXfer:libraries:read remote protocol packet now allows passing a
6475 list of section offsets.
6477 * On GNU/Linux, GDB can now attach to stopped processes. Several race
6478 conditions handling signals delivered during attach or thread creation
6479 have also been fixed.
6481 * GDB now supports the use of DWARF boolean types for Ada's type Boolean.
6482 From the user's standpoint, all unqualified instances of True and False
6483 are treated as the standard definitions, regardless of context.
6485 * GDB now parses C++ symbol and type names more flexibly. For
6488 template<typename T> class C { };
6491 GDB will now correctly handle all of:
6493 ptype C<char const *>
6494 ptype C<char const*>
6495 ptype C<const char *>
6496 ptype C<const char*>
6498 * New features in the GDB remote stub, gdbserver
6500 - The "--wrapper" command-line argument tells gdbserver to use a
6501 wrapper program to launch programs for debugging.
6503 - On PowerPC and S/390 targets, it is now possible to use a single
6504 gdbserver executable to debug both 32-bit and 64-bit programs.
6505 (This requires gdbserver itself to be built as a 64-bit executable.)
6507 - gdbserver uses the new noack protocol mode for TCP connections to
6508 reduce communications latency, if also supported and enabled in GDB.
6510 - Support for the sparc64-linux-gnu target is now included in
6513 - The amd64-linux build of gdbserver now supports debugging both
6514 32-bit and 64-bit programs.
6516 - The i386-linux, amd64-linux, and i386-win32 builds of gdbserver
6517 now support hardware watchpoints, and will use them automatically
6522 GDB now has support for scripting using Python. Whether this is
6523 available is determined at configure time.
6525 New GDB commands can now be written in Python.
6527 * Ada tasking support
6529 Ada tasks can now be inspected in GDB. The following commands have
6533 Print the list of Ada tasks.
6535 Print detailed information about task number N.
6537 Print the task number of the current task.
6539 Switch the context of debugging to task number N.
6541 * Support for user-defined prefixed commands. The "define" command can
6542 add new commands to existing prefixes, e.g. "target".
6544 * Multi-inferior, multi-process debugging.
6546 GDB now has generalized support for multi-inferior debugging. See
6547 "Debugging Multiple Inferiors" in the manual for more information.
6548 Although availability still depends on target support, the command
6549 set is more uniform now. The GNU/Linux specific multi-forks support
6550 has been migrated to this new framework. This implied some user
6551 visible changes; see "New commands" and also "Removed commands"
6554 * Target descriptions can now describe the target OS ABI. See the
6555 "Target Description Format" section in the user manual for more
6558 * Target descriptions can now describe "compatible" architectures
6559 to indicate that the target can execute applications for a different
6560 architecture in addition to those for the main target architecture.
6561 See the "Target Description Format" section in the user manual for
6564 * Multi-architecture debugging.
6566 GDB now includes general supports for debugging applications on
6567 hybrid systems that use more than one single processor architecture
6568 at the same time. Each such hybrid architecture still requires
6569 specific support to be added. The only hybrid architecture supported
6570 in this version of GDB is the Cell Broadband Engine.
6572 * GDB now supports integrated debugging of Cell/B.E. applications that
6573 use both the PPU and SPU architectures. To enable support for hybrid
6574 Cell/B.E. debugging, you need to configure GDB to support both the
6575 powerpc-linux or powerpc64-linux and the spu-elf targets, using the
6576 --enable-targets configure option.
6578 * Non-stop mode debugging.
6580 For some targets, GDB now supports an optional mode of operation in
6581 which you can examine stopped threads while other threads continue
6582 to execute freely. This is referred to as non-stop mode, with the
6583 old mode referred to as all-stop mode. See the "Non-Stop Mode"
6584 section in the user manual for more information.
6586 To be able to support remote non-stop debugging, a remote stub needs
6587 to implement the non-stop mode remote protocol extensions, as
6588 described in the "Remote Non-Stop" section of the user manual. The
6589 GDB remote stub, gdbserver, has been adjusted to support these
6590 extensions on linux targets.
6592 * New commands (for set/show, see "New options" below)
6594 catch syscall [NAME(S) | NUMBER(S)]
6595 Catch system calls. Arguments, which should be names of system
6596 calls or their numbers, mean catch only those syscalls. Without
6597 arguments, every syscall will be caught. When the inferior issues
6598 any of the specified syscalls, GDB will stop and announce the system
6599 call, both when it is called and when its call returns. This
6600 feature is currently available with a native GDB running on the
6601 Linux Kernel, under the following architectures: x86, x86_64,
6602 PowerPC and PowerPC64.
6604 find [/size-char] [/max-count] start-address, end-address|+search-space-size,
6606 Search memory for a sequence of bytes.
6608 maint set python print-stack
6609 maint show python print-stack
6610 Show a stack trace when an error is encountered in a Python script.
6613 Invoke CODE by passing it to the Python interpreter.
6618 These allow macros to be defined, undefined, and listed
6622 Show operating system information about processes.
6625 List the inferiors currently under GDB's control.
6628 Switch focus to inferior number NUM.
6631 Detach from inferior number NUM.
6634 Kill inferior number NUM.
6638 set spu stop-on-load
6639 show spu stop-on-load
6640 Control whether to stop for new SPE threads during Cell/B.E. debugging.
6642 set spu auto-flush-cache
6643 show spu auto-flush-cache
6644 Control whether to automatically flush the software-managed cache
6645 during Cell/B.E. debugging.
6647 set sh calling-convention
6648 show sh calling-convention
6649 Control the calling convention used when calling SH target functions.
6652 show debug timestamp
6653 Control display of timestamps with GDB debugging output.
6655 set disassemble-next-line
6656 show disassemble-next-line
6657 Control display of disassembled source lines or instructions when
6660 set remote noack-packet
6661 show remote noack-packet
6662 Set/show the use of remote protocol QStartNoAckMode packet. See above
6663 under "New remote packets."
6665 set remote query-attached-packet
6666 show remote query-attached-packet
6667 Control use of remote protocol `qAttached' (query-attached) packet.
6669 set remote read-siginfo-object
6670 show remote read-siginfo-object
6671 Control use of remote protocol `qXfer:siginfo:read' (read-siginfo-object)
6674 set remote write-siginfo-object
6675 show remote write-siginfo-object
6676 Control use of remote protocol `qXfer:siginfo:write' (write-siginfo-object)
6679 set remote reverse-continue
6680 show remote reverse-continue
6681 Control use of remote protocol 'bc' (reverse-continue) packet.
6683 set remote reverse-step
6684 show remote reverse-step
6685 Control use of remote protocol 'bs' (reverse-step) packet.
6687 set displaced-stepping
6688 show displaced-stepping
6689 Control displaced stepping mode. Displaced stepping is a way to
6690 single-step over breakpoints without removing them from the debuggee.
6691 Also known as "out-of-line single-stepping".
6694 show debug displaced
6695 Control display of debugging info for displaced stepping.
6697 maint set internal-error
6698 maint show internal-error
6699 Control what GDB does when an internal error is detected.
6701 maint set internal-warning
6702 maint show internal-warning
6703 Control what GDB does when an internal warning is detected.
6708 Use a wrapper program to launch programs for debugging.
6710 set multiple-symbols (all|ask|cancel)
6711 show multiple-symbols
6712 The value of this variable can be changed to adjust the debugger behavior
6713 when an expression or a breakpoint location contains an ambiguous symbol
6714 name (an overloaded function name, for instance).
6716 set breakpoint always-inserted
6717 show breakpoint always-inserted
6718 Keep breakpoints always inserted in the target, as opposed to inserting
6719 them when resuming the target, and removing them when the target stops.
6720 This option can improve debugger performance on slow remote targets.
6722 set arm fallback-mode (arm|thumb|auto)
6723 show arm fallback-mode
6724 set arm force-mode (arm|thumb|auto)
6726 These commands control how ARM GDB determines whether instructions
6727 are ARM or Thumb. The default for both settings is auto, which uses
6728 the current CPSR value for instructions without symbols; previous
6729 versions of GDB behaved as if "set arm fallback-mode arm".
6731 set arm unwind-secure-frames
6732 Enable unwinding from Non-secure to Secure mode on Cortex-M with
6734 This can trigger security exceptions when unwinding exception stacks.
6736 set disable-randomization
6737 show disable-randomization
6738 Standalone programs run with the virtual address space randomization enabled
6739 by default on some platforms. This option keeps the addresses stable across
6740 multiple debugging sessions.
6744 Control whether other threads are stopped or not when some thread hits
6749 Requests that asynchronous execution is enabled in the target, if available.
6750 In this case, it's possible to resume target in the background, and interact
6751 with GDB while the target is running. "show target-async" displays the
6752 current state of asynchronous execution of the target.
6754 set target-wide-charset
6755 show target-wide-charset
6756 The target-wide-charset is the name of the character set that GDB
6757 uses when printing characters whose type is wchar_t.
6759 set tcp auto-retry (on|off)
6761 set tcp connect-timeout
6762 show tcp connect-timeout
6763 These commands allow GDB to retry failed TCP connections to a remote stub
6764 with a specified timeout period; this is useful if the stub is launched
6765 in parallel with GDB but may not be ready to accept connections immediately.
6767 set libthread-db-search-path
6768 show libthread-db-search-path
6769 Control list of directories which GDB will search for appropriate
6772 set schedule-multiple (on|off)
6773 show schedule-multiple
6774 Allow GDB to resume all threads of all processes or only threads of
6775 the current process.
6779 Use more aggressive caching for accesses to the stack. This improves
6780 performance of remote debugging (particularly backtraces) without
6781 affecting correctness.
6783 set interactive-mode (on|off|auto)
6784 show interactive-mode
6785 Control whether GDB runs in interactive mode (on) or not (off).
6786 When in interactive mode, GDB waits for the user to answer all
6787 queries. Otherwise, GDB does not wait and assumes the default
6788 answer. When set to auto (the default), GDB determines which
6789 mode to use based on the stdin settings.
6794 For program forks, this is replaced by the new more generic `info
6795 inferiors' command. To list checkpoints, you can still use the
6796 `info checkpoints' command, which was an alias for the `info forks'
6800 Replaced by the new `inferior' command. To switch between
6801 checkpoints, you can still use the `restart' command, which was an
6802 alias for the `fork' command.
6805 This is removed, since some targets don't have a notion of
6806 processes. To switch between processes, you can still use the
6807 `inferior' command using GDB's own inferior number.
6810 For program forks, this is replaced by the new more generic `kill
6811 inferior' command. To delete a checkpoint, you can still use the
6812 `delete checkpoint' command, which was an alias for the `delete
6816 For program forks, this is replaced by the new more generic `detach
6817 inferior' command. To detach a checkpoint, you can still use the
6818 `detach checkpoint' command, which was an alias for the `detach
6821 * New native configurations
6823 x86/x86_64 Darwin i[34567]86-*-darwin*
6825 x86_64 MinGW x86_64-*-mingw*
6829 Lattice Mico32 lm32-*
6830 x86 DICOS i[34567]86-*-dicos*
6831 x86_64 DICOS x86_64-*-dicos*
6834 * The GDB remote stub, gdbserver, now supports x86 Windows CE
6835 (mingw32ce) debugging.
6841 These commands were actually not implemented on any target.
6843 *** Changes in GDB 6.8
6845 * New native configurations
6847 NetBSD/hppa hppa*-*netbsd*
6848 Xtensa GNU/Linux xtensa*-*-linux*
6852 NetBSD/hppa hppa*-*-netbsd*
6853 Xtensa GNU/Linux xtensa*-*-linux*
6855 * Change in command line behavior -- corefiles vs. process ids.
6857 When the '-p NUMBER' or '--pid NUMBER' options are used, and
6858 attaching to process NUMBER fails, GDB no longer attempts to open a
6859 core file named NUMBER. Attaching to a program using the -c option
6860 is no longer supported. Instead, use the '-p' or '--pid' options.
6862 * GDB can now be built as a native debugger for debugging Windows x86
6863 (mingw32) Portable Executable (PE) programs.
6865 * Pending breakpoints no longer change their number when their address
6868 * GDB now supports breakpoints with multiple locations,
6869 including breakpoints on C++ constructors, inside C++ templates,
6870 and in inlined functions.
6872 * GDB's ability to debug optimized code has been improved. GDB more
6873 accurately identifies function bodies and lexical blocks that occupy
6874 more than one contiguous range of addresses.
6876 * Target descriptions can now describe registers for PowerPC.
6878 * The GDB remote stub, gdbserver, now supports the AltiVec and SPE
6879 registers on PowerPC targets.
6881 * The GDB remote stub, gdbserver, now supports thread debugging on GNU/Linux
6882 targets even when the libthread_db library is not available.
6884 * The GDB remote stub, gdbserver, now supports the new file transfer
6885 commands (remote put, remote get, and remote delete).
6887 * The GDB remote stub, gdbserver, now supports run and attach in
6888 extended-remote mode.
6890 * hppa*64*-*-hpux11* target broken
6891 The debugger is unable to start a program and fails with the following
6892 error: "Error trying to get information about dynamic linker".
6893 The gdb-6.7 release is also affected.
6895 * GDB now supports the --enable-targets= configure option to allow
6896 building a single GDB executable that supports multiple remote
6897 target architectures.
6899 * GDB now supports debugging C and C++ programs which use the
6900 Decimal Floating Point extension. In addition, the PowerPC target
6901 now has a set of pseudo-registers to inspect decimal float values
6902 stored in two consecutive float registers.
6904 * The -break-insert MI command can optionally create pending
6907 * Improved support for debugging Ada
6908 Many improvements to the Ada language support have been made. These
6910 - Better support for Ada2005 interface types
6911 - Improved handling of arrays and slices in general
6912 - Better support for Taft-amendment types
6913 - The '{type} ADDRESS' expression is now allowed on the left hand-side
6915 - Improved command completion in Ada
6918 * GDB on GNU/Linux and HP/UX can now debug through "exec" of a new
6923 set print frame-arguments (all|scalars|none)
6924 show print frame-arguments
6925 The value of this variable can be changed to control which argument
6926 values should be printed by the debugger when displaying a frame.
6931 Transfer files to and from a remote target, and delete remote files.
6938 Transfer files to and from a remote target, and delete remote files.
6940 * New remote packets
6947 Open, close, read, write, and delete files on the remote system.
6950 Attach to an existing process on the remote system, in extended-remote
6954 Run a new process on the remote system, in extended-remote mode.
6956 *** Changes in GDB 6.7
6958 * Resolved 101 resource leaks, null pointer dereferences, etc. in gdb,
6959 bfd, libiberty and opcodes, as revealed by static analysis donated by
6960 Coverity, Inc. (http://scan.coverity.com).
6962 * When looking up multiply-defined global symbols, GDB will now prefer the
6963 symbol definition in the current shared library if it was built using the
6964 -Bsymbolic linker option.
6966 * When the Text User Interface (TUI) is not configured, GDB will now
6967 recognize the -tui command-line option and print a message that the TUI
6970 * The GDB remote stub, gdbserver, now has lower overhead for high
6971 frequency signals (e.g. SIGALRM) via the QPassSignals packet.
6973 * GDB for MIPS targets now autodetects whether a remote target provides
6974 32-bit or 64-bit register values.
6976 * Support for C++ member pointers has been improved.
6978 * GDB now understands XML target descriptions, which specify the
6979 target's overall architecture. GDB can read a description from
6980 a local file or over the remote serial protocol.
6982 * Vectors of single-byte data use a new integer type which is not
6983 automatically displayed as character or string data.
6985 * The /s format now works with the print command. It displays
6986 arrays of single-byte integers and pointers to single-byte integers
6989 * Target descriptions can now describe target-specific registers,
6990 for architectures which have implemented the support (currently
6991 only ARM, M68K, and MIPS).
6993 * GDB and the GDB remote stub, gdbserver, now support the XScale
6996 * The GDB remote stub, gdbserver, has been updated to support
6997 ARM Windows CE (mingw32ce) debugging, and GDB Windows CE support
6998 has been rewritten to use the standard GDB remote protocol.
7000 * GDB can now step into C++ functions which are called through thunks.
7002 * GDB for the Cell/B.E. SPU now supports overlay debugging.
7004 * The GDB remote protocol "qOffsets" packet can now honor ELF segment
7005 layout. It also supports a TextSeg= and DataSeg= response when only
7006 segment base addresses (rather than offsets) are available.
7008 * The /i format now outputs any trailing branch delay slot instructions
7009 immediately following the last instruction within the count specified.
7011 * The GDB remote protocol "T" stop reply packet now supports a
7012 "library" response. Combined with the new "qXfer:libraries:read"
7013 packet, this response allows GDB to debug shared libraries on targets
7014 where the operating system manages the list of loaded libraries (e.g.
7015 Windows and SymbianOS).
7017 * The GDB remote stub, gdbserver, now supports dynamic link libraries
7018 (DLLs) on Windows and Windows CE targets.
7020 * GDB now supports a faster verification that a .debug file matches its binary
7021 according to its build-id signature, if the signature is present.
7027 Enable or disable hardware flow control (RTS/CTS) on the serial port
7028 when debugging using remote targets.
7030 set mem inaccessible-by-default
7031 show mem inaccessible-by-default
7032 If the target supplies a memory map, for instance via the remote
7033 protocol's "qXfer:memory-map:read" packet, setting this variable
7034 prevents GDB from accessing memory outside the memory map. This
7035 is useful for targets with memory mapped registers or which react
7036 badly to accesses of unmapped address space.
7038 set breakpoint auto-hw
7039 show breakpoint auto-hw
7040 If the target supplies a memory map, for instance via the remote
7041 protocol's "qXfer:memory-map:read" packet, setting this variable
7042 lets GDB use hardware breakpoints automatically for memory regions
7043 where it can not use software breakpoints. This covers both the
7044 "break" command and internal breakpoints used for other commands
7045 including "next" and "finish".
7048 catch exception unhandled
7049 Stop the program execution when Ada exceptions are raised.
7052 Stop the program execution when an Ada assertion failed.
7056 Set an alternate system root for target files. This is a more
7057 general version of "set solib-absolute-prefix", which is now
7058 an alias to "set sysroot".
7061 Provide extended SPU facility status information. This set of
7062 commands is available only when debugging the Cell/B.E. SPU
7065 * New native configurations
7067 OpenBSD/sh sh*-*openbsd*
7070 unset tdesc filename
7072 Use the specified local file as an XML target description, and do
7073 not query the target for its built-in description.
7077 OpenBSD/sh sh*-*-openbsd*
7078 MIPS64 GNU/Linux (gdbserver) mips64-linux-gnu
7079 Toshiba Media Processor mep-elf
7081 * New remote packets
7084 Ignore the specified signals; pass them directly to the debugged program
7085 without stopping other threads or reporting them to GDB.
7087 qXfer:features:read:
7088 Read an XML target description from the target, which describes its
7093 Read or write contents of an spufs file on the target system. These
7094 packets are available only on the Cell/B.E. SPU architecture.
7096 qXfer:libraries:read:
7097 Report the loaded shared libraries. Combined with new "T" packet
7098 response, this packet allows GDB to debug shared libraries on
7099 targets where the operating system manages the list of loaded
7100 libraries (e.g. Windows and SymbianOS).
7104 Support for these obsolete configurations has been removed.
7112 i[34567]86-*-lynxos*
7113 i[34567]86-*-netware*
7114 i[34567]86-*-sco3.2v5*
7115 i[34567]86-*-sco3.2v4*
7117 i[34567]86-*-sysv4.2*
7120 i[34567]86-*-unixware2*
7121 i[34567]86-*-unixware*
7130 * Other removed features
7137 Various m68k-only ROM monitors.
7144 Various Renesas ROM monitors and debugging interfaces for SH and
7149 Support for a Macraigor serial interface to on-chip debugging.
7150 GDB does not directly support the newer parallel or USB
7155 A debug information format. The predecessor to DWARF 2 and
7156 DWARF 3, which are still supported.
7158 Support for the HP aCC compiler on HP-UX/PA-RISC
7160 SOM-encapsulated symbolic debugging information, automatic
7161 invocation of pxdb, and the aCC custom C++ ABI. This does not
7162 affect HP-UX for Itanium or GCC for HP-UX/PA-RISC. Code compiled
7163 with aCC can still be debugged on an assembly level.
7165 MIPS ".pdr" sections
7167 A MIPS-specific format used to describe stack frame layout
7168 in debugging information.
7172 GDB could work with an older version of Guile to debug
7173 the interpreter and Scheme programs running in it.
7175 set mips stack-arg-size
7176 set mips saved-gpreg-size
7178 Use "set mips abi" to control parameter passing for MIPS.
7180 *** Changes in GDB 6.6
7185 Cell Broadband Engine SPU spu-elf
7187 * GDB can now be configured as a cross-debugger targeting native Windows
7188 (mingw32) or Cygwin. It can communicate with a remote debugging stub
7189 running on a Windows system over TCP/IP to debug Windows programs.
7191 * The GDB remote stub, gdbserver, has been updated to support Windows and
7192 Cygwin debugging. Both single-threaded and multi-threaded programs are
7195 * The "set trust-readonly-sections" command works again. This command was
7196 broken in GDB 6.3, 6.4, and 6.5.
7198 * The "load" command now supports writing to flash memory, if the remote
7199 stub provides the required support.
7201 * Support for GNU/Linux Thread Local Storage (TLS, per-thread variables) no
7202 longer requires symbolic debug information (e.g. DWARF-2).
7207 unset substitute-path
7208 show substitute-path
7209 Manage a list of substitution rules that GDB uses to rewrite the name
7210 of the directories where the sources are located. This can be useful
7211 for instance when the sources were moved to a different location
7212 between compilation and debugging.
7216 Print each CLI command as it is executed. Each command is prefixed with
7217 a number of `+' symbols representing the nesting depth.
7218 The source command now has a `-v' option to enable the same feature.
7222 The ARM Demon monitor support (RDP protocol, "target rdp").
7224 Kernel Object Display, an embedded debugging feature which only worked with
7225 an obsolete version of Cisco IOS.
7227 The 'set download-write-size' and 'show download-write-size' commands.
7229 * New remote packets
7232 Tell a stub about GDB client features, and request remote target features.
7233 The first feature implemented is PacketSize, which allows the target to
7234 specify the size of packets it can handle - to minimize the number of
7235 packets required and improve performance when connected to a remote
7239 Fetch an OS auxiliary vector from the remote stub. This packet is a
7240 more efficient replacement for qPart:auxv:read.
7242 qXfer:memory-map:read:
7243 Fetch a memory map from the remote stub, including information about
7244 RAM, ROM, and flash memory devices.
7249 Erase and program a flash memory device.
7251 * Removed remote packets
7254 This packet has been replaced by qXfer:auxv:read. Only GDB 6.4 and 6.5
7255 used it, and only gdbserver implemented it.
7257 *** Changes in GDB 6.5
7261 Renesas M32C/M16C m32c-elf
7263 Morpho Technologies ms1 ms1-elf
7267 init-if-undefined Initialize a convenience variable, but
7268 only if it doesn't already have a value.
7270 The following commands are presently only implemented for native GNU/Linux:
7272 checkpoint Save a snapshot of the program state.
7274 restart <n> Return the program state to a
7275 previously saved state.
7277 info checkpoints List currently saved checkpoints.
7279 delete-checkpoint <n> Delete a previously saved checkpoint.
7281 set|show detach-on-fork Tell gdb whether to detach from a newly
7282 forked process, or to keep debugging it.
7284 info forks List forks of the user program that
7285 are available to be debugged.
7287 fork <n> Switch to debugging one of several
7288 forks of the user program that are
7289 available to be debugged.
7291 delete-fork <n> Delete a fork from the list of forks
7292 that are available to be debugged (and
7293 kill the forked process).
7295 detach-fork <n> Delete a fork from the list of forks
7296 that are available to be debugged (and
7297 allow the process to continue).
7301 Morpho Technologies ms2 ms1-elf
7303 * Improved Windows host support
7305 GDB now builds as a cross debugger hosted on i686-mingw32, including
7306 native console support, and remote communications using either
7307 network sockets or serial ports.
7309 * Improved Modula-2 language support
7311 GDB can now print most types in the Modula-2 syntax. This includes:
7312 basic types, set types, record types, enumerated types, range types,
7313 pointer types and ARRAY types. Procedure var parameters are correctly
7314 printed and hexadecimal addresses and character constants are also
7315 written in the Modula-2 syntax. Best results can be obtained by using
7316 GNU Modula-2 together with the -gdwarf-2 command line option.
7320 The ARM rdi-share module.
7322 The Netware NLM debug server.
7324 *** Changes in GDB 6.4
7326 * New native configurations
7328 OpenBSD/arm arm*-*-openbsd*
7329 OpenBSD/mips64 mips64-*-openbsd*
7333 Morpho Technologies ms1 ms1-elf
7335 * New command line options
7337 --batch-silent As for --batch, but totally silent.
7338 --return-child-result The debugger will exist with the same value
7339 the child (debugged) program exited with.
7340 --eval-command COMMAND, -ex COMMAND
7341 Execute a single GDB CLI command. This may be
7342 specified multiple times and in conjunction
7343 with the --command (-x) option.
7345 * Deprecated commands removed
7347 The following commands, that were deprecated in 2000, have been
7351 set|show arm disassembly-flavor set|show arm disassembler
7352 othernames set arm disassembler
7353 set|show remotedebug set|show debug remote
7354 set|show archdebug set|show debug arch
7355 set|show eventdebug set|show debug event
7358 * New BSD user-level threads support
7360 It is now possible to debug programs using the user-level threads
7361 library on OpenBSD and FreeBSD. Currently supported (target)
7364 FreeBSD/amd64 x86_64-*-freebsd*
7365 FreeBSD/i386 i386-*-freebsd*
7366 OpenBSD/i386 i386-*-openbsd*
7368 Note that the new kernel threads libraries introduced in FreeBSD 5.x
7369 are not yet supported.
7371 * New support for Matsushita MN10300 w/sim added
7372 (Work in progress). mn10300-elf.
7374 * REMOVED configurations and files
7376 VxWorks and the XDR protocol *-*-vxworks
7377 Motorola MCORE mcore-*-*
7378 National Semiconductor NS32000 ns32k-*-*
7380 * New "set print array-indexes" command
7382 After turning this setting "on", GDB prints the index of each element
7383 when displaying arrays. The default is "off" to preserve the previous
7386 * VAX floating point support
7388 GDB now supports the not-quite-ieee VAX F and D floating point formats.
7390 * User-defined command support
7392 In addition to using $arg0..$arg9 for argument passing, it is now possible
7393 to use $argc to determine now many arguments have been passed. See the
7394 section on user-defined commands in the user manual for more information.
7396 *** Changes in GDB 6.3:
7398 * New command line option
7400 GDB now accepts -l followed by a number to set the timeout for remote
7403 * GDB works with GCC -feliminate-dwarf2-dups
7405 GDB now supports a more compact representation of DWARF-2 debug
7406 information using DW_FORM_ref_addr references. These are produced
7407 by GCC with the option -feliminate-dwarf2-dups and also by some
7408 proprietary compilers. With GCC, you must use GCC 3.3.4 or later
7409 to use -feliminate-dwarf2-dups.
7411 * Internationalization
7413 When supported by the host system, GDB will be built with
7414 internationalization (libintl). The task of marking up the sources is
7415 continued, we're looking forward to our first translation.
7419 Initial support for debugging programs compiled with the GNAT
7420 implementation of the Ada programming language has been integrated
7421 into GDB. In this release, support is limited to expression evaluation.
7423 * New native configurations
7425 GNU/Linux/m32r m32r-*-linux-gnu
7429 GDB's remote protocol now includes support for the 'p' packet. This
7430 packet is used to fetch individual registers from a remote inferior.
7432 * END-OF-LIFE registers[] compatibility module
7434 GDB's internal register infrastructure has been completely rewritten.
7435 The new infrastructure making possible the implementation of key new
7436 features including 32x64 (e.g., 64-bit amd64 GDB debugging a 32-bit
7439 GDB 6.3 will be the last release to include the registers[]
7440 compatibility module that allowed out-of-date configurations to
7441 continue to work. This change directly impacts the following
7451 powerpc bdm protocol
7453 Unless there is activity to revive these configurations, they will be
7454 made OBSOLETE in GDB 6.4, and REMOVED from GDB 6.5.
7456 * OBSOLETE configurations and files
7458 Configurations that have been declared obsolete in this release have
7459 been commented out. Unless there is activity to revive these
7460 configurations, the next release of GDB will have their sources
7461 permanently REMOVED.
7470 *** Changes in GDB 6.2.1:
7472 * MIPS `break main; run' gave an heuristic-fence-post warning
7474 When attempting to run even a simple program, a warning about
7475 heuristic-fence-post being hit would be reported. This problem has
7478 * MIPS IRIX 'long double' crashed GDB
7480 When examining a long double variable, GDB would get a segmentation
7481 fault. The crash has been fixed (but GDB 6.2 cannot correctly examine
7482 IRIX long double values).
7486 A bug in the VAX stack code was causing problems with the "next"
7487 command. This problem has been fixed.
7489 *** Changes in GDB 6.2:
7491 * Fix for ``many threads''
7493 On GNU/Linux systems that use the NPTL threads library, a program
7494 rapidly creating and deleting threads would confuse GDB leading to the
7497 ptrace: No such process.
7498 thread_db_get_info: cannot get thread info: generic error
7500 This problem has been fixed.
7502 * "-async" and "-noasync" options removed.
7504 Support for the broken "-noasync" option has been removed (it caused
7507 * New ``start'' command.
7509 This command runs the program until the beginning of the main procedure.
7511 * New BSD Kernel Data Access Library (libkvm) interface
7513 Using ``target kvm'' it is now possible to debug kernel core dumps and
7514 live kernel memory images on various FreeBSD, NetBSD and OpenBSD
7515 platforms. Currently supported (native-only) configurations are:
7517 FreeBSD/amd64 x86_64-*-freebsd*
7518 FreeBSD/i386 i?86-*-freebsd*
7519 NetBSD/i386 i?86-*-netbsd*
7520 NetBSD/m68k m68*-*-netbsd*
7521 NetBSD/sparc sparc-*-netbsd*
7522 OpenBSD/amd64 x86_64-*-openbsd*
7523 OpenBSD/i386 i?86-*-openbsd*
7524 OpenBSD/m68k m68*-openbsd*
7525 OpenBSD/sparc sparc-*-openbsd*
7527 * Signal trampoline code overhauled
7529 Many generic problems with GDB's signal handling code have been fixed.
7530 These include: backtraces through non-contiguous stacks; recognition
7531 of sa_sigaction signal trampolines; backtrace from a NULL pointer
7532 call; backtrace through a signal trampoline; step into and out of
7533 signal handlers; and single-stepping in the signal trampoline.
7535 Please note that kernel bugs are a limiting factor here. These
7536 features have been shown to work on an s390 GNU/Linux system that
7537 include a 2.6.8-rc1 kernel. Ref PR breakpoints/1702.
7539 * Cygwin support for DWARF 2 added.
7541 * New native configurations
7543 GNU/Linux/hppa hppa*-*-linux*
7544 OpenBSD/hppa hppa*-*-openbsd*
7545 OpenBSD/m68k m68*-*-openbsd*
7546 OpenBSD/m88k m88*-*-openbsd*
7547 OpenBSD/powerpc powerpc-*-openbsd*
7548 NetBSD/vax vax-*-netbsd*
7549 OpenBSD/vax vax-*-openbsd*
7551 * END-OF-LIFE frame compatibility module
7553 GDB's internal frame infrastructure has been completely rewritten.
7554 The new infrastructure making it possible to support key new features
7555 including DWARF 2 Call Frame Information. To aid in the task of
7556 migrating old configurations to this new infrastructure, a
7557 compatibility module, that allowed old configurations to continue to
7558 work, was also included.
7560 GDB 6.2 will be the last release to include this frame compatibility
7561 module. This change directly impacts the following configurations:
7571 Unless there is activity to revive these configurations, they will be
7572 made OBSOLETE in GDB 6.3, and REMOVED from GDB 6.4.
7574 * REMOVED configurations and files
7576 Sun 3, running SunOS 3 m68*-*-sunos3*
7577 Sun 3, running SunOS 4 m68*-*-sunos4*
7578 Sun 2, running SunOS 3 m68000-*-sunos3*
7579 Sun 2, running SunOS 4 m68000-*-sunos4*
7580 Motorola 680x0 running LynxOS m68*-*-lynxos*
7581 AT&T 3b1/Unix pc m68*-att-*
7582 Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
7583 decstation mips-dec-* mips-little-*
7584 riscos mips-*-riscos* mips-*-sysv*
7585 sonymips mips-sony-*
7586 sysv mips*-*-sysv4* (IRIX 5/6 not included)
7588 *** Changes in GDB 6.1.1:
7590 * TUI (Text-mode User Interface) built-in (also included in GDB 6.1)
7592 The TUI (Text-mode User Interface) is now built as part of a default
7593 GDB configuration. It is enabled by either selecting the TUI with the
7594 command line option "-i=tui" or by running the separate "gdbtui"
7595 program. For more information on the TUI, see the manual "Debugging
7598 * Pending breakpoint support (also included in GDB 6.1)
7600 Support has been added to allow you to specify breakpoints in shared
7601 libraries that have not yet been loaded. If a breakpoint location
7602 cannot be found, and the "breakpoint pending" option is set to auto,
7603 GDB queries you if you wish to make the breakpoint pending on a future
7604 shared-library load. If and when GDB resolves the breakpoint symbol,
7605 the pending breakpoint is removed as one or more regular breakpoints
7608 Pending breakpoints are very useful for GCJ Java debugging.
7610 * Fixed ISO-C build problems
7612 The files bfd/elf-bfd.h, gdb/dictionary.c and gdb/types.c contained
7613 non ISO-C code that stopped them being built using a more strict ISO-C
7614 compiler (e.g., IBM's C compiler).
7616 * Fixed build problem on IRIX 5
7618 Due to header problems with <sys/proc.h>, the file gdb/proc-api.c
7619 wasn't able to compile compile on an IRIX 5 system.
7621 * Added execute permission to gdb/gdbserver/configure
7623 The shell script gdb/testsuite/gdb.stabs/configure lacked execute
7624 permission. This bug would cause configure to fail on a number of
7625 systems (Solaris, IRIX). Ref: server/519.
7627 * Fixed build problem on hpux2.0w-hp-hpux11.00 using the HP ANSI C compiler
7629 Older HPUX ANSI C compilers did not accept variable array sizes. somsolib.c
7630 has been updated to use constant array sizes.
7632 * Fixed a panic in the DWARF Call Frame Info code on Solaris 2.7
7634 GCC 3.3.2, on Solaris 2.7, includes the DW_EH_PE_funcrel encoding in
7635 its generated DWARF Call Frame Info. This encoding was causing GDB to
7636 panic, that panic has been fixed. Ref: gdb/1628.
7638 * Fixed a problem when examining parameters in shared library code.
7640 When examining parameters in optimized shared library code generated
7641 by a mainline GCC, GDB would incorrectly report ``Variable "..." is
7642 not available''. GDB now correctly displays the variable's value.
7644 *** Changes in GDB 6.1:
7646 * Removed --with-mmalloc
7648 Support for the mmalloc memory manager has been removed, as it
7649 conflicted with the internal gdb byte cache.
7651 * Changes in AMD64 configurations
7653 The AMD64 target now includes the %cs and %ss registers. As a result
7654 the AMD64 remote protocol has changed; this affects the floating-point
7655 and SSE registers. If you rely on those registers for your debugging,
7656 you should upgrade gdbserver on the remote side.
7658 * Revised SPARC target
7660 The SPARC target has been completely revised, incorporating the
7661 FreeBSD/sparc64 support that was added for GDB 6.0. As a result
7662 support for LynxOS and SunOS 4 has been dropped. Calling functions
7663 from within GDB on operating systems with a non-executable stack
7664 (Solaris, OpenBSD) now works.
7668 GDB has a new C++ demangler which does a better job on the mangled
7669 names generated by current versions of g++. It also runs faster, so
7670 with this and other changes gdb should now start faster on large C++
7673 * DWARF 2 Location Expressions
7675 GDB support for location expressions has been extended to support function
7676 arguments and frame bases. Older versions of GDB could crash when they
7679 * C++ nested types and namespaces
7681 GDB's support for nested types and namespaces in C++ has been
7682 improved, especially if you use the DWARF 2 debugging format. (This
7683 is the default for recent versions of GCC on most platforms.)
7684 Specifically, if you have a class "Inner" defined within a class or
7685 namespace "Outer", then GDB realizes that the class's name is
7686 "Outer::Inner", not simply "Inner". This should greatly reduce the
7687 frequency of complaints about not finding RTTI symbols. In addition,
7688 if you are stopped at inside of a function defined within a namespace,
7689 GDB modifies its name lookup accordingly.
7691 * New native configurations
7693 NetBSD/amd64 x86_64-*-netbsd*
7694 OpenBSD/amd64 x86_64-*-openbsd*
7695 OpenBSD/alpha alpha*-*-openbsd*
7696 OpenBSD/sparc sparc-*-openbsd*
7697 OpenBSD/sparc64 sparc64-*-openbsd*
7699 * New debugging protocols
7701 M32R with SDI protocol m32r-*-elf*
7703 * "set prompt-escape-char" command deleted.
7705 The command "set prompt-escape-char" has been deleted. This command,
7706 and its very obscure effect on GDB's prompt, was never documented,
7707 tested, nor mentioned in the NEWS file.
7709 * OBSOLETE configurations and files
7711 Configurations that have been declared obsolete in this release have
7712 been commented out. Unless there is activity to revive these
7713 configurations, the next release of GDB will have their sources
7714 permanently REMOVED.
7716 Sun 3, running SunOS 3 m68*-*-sunos3*
7717 Sun 3, running SunOS 4 m68*-*-sunos4*
7718 Sun 2, running SunOS 3 m68000-*-sunos3*
7719 Sun 2, running SunOS 4 m68000-*-sunos4*
7720 Motorola 680x0 running LynxOS m68*-*-lynxos*
7721 AT&T 3b1/Unix pc m68*-att-*
7722 Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
7723 decstation mips-dec-* mips-little-*
7724 riscos mips-*-riscos* mips-*-sysv*
7725 sonymips mips-sony-*
7726 sysv mips*-*-sysv4* (IRIX 5/6 not included)
7728 * REMOVED configurations and files
7730 SGI Irix-4.x mips-sgi-irix4 or iris4
7731 SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris
7732 Z8000 simulator z8k-zilog-none or z8ksim
7733 Matsushita MN10200 w/simulator mn10200-*-*
7734 H8/500 simulator h8500-hitachi-hms or h8500hms
7735 HP/PA running BSD hppa*-*-bsd*
7736 HP/PA running OSF/1 hppa*-*-osf*
7737 HP/PA Pro target hppa*-*-pro*
7738 PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
7739 386BSD i[3456]86-*-bsd*
7740 Sequent family i[3456]86-sequent-sysv4*
7741 i[3456]86-sequent-sysv*
7742 i[3456]86-sequent-bsd*
7743 SPARC running LynxOS sparc-*-lynxos*
7744 SPARC running SunOS 4 sparc-*-sunos4*
7745 Tsqware Sparclet sparclet-*-*
7746 Fujitsu SPARClite sparclite-fujitsu-none or sparclite
7748 *** Changes in GDB 6.0:
7752 Support for debugging the Objective-C programming language has been
7753 integrated into GDB.
7755 * New backtrace mechanism (includes DWARF 2 Call Frame Information).
7757 DWARF 2's Call Frame Information makes available compiler generated
7758 information that more exactly describes the program's run-time stack.
7759 By using this information, GDB is able to provide more robust stack
7762 The i386, amd64 (nee, x86-64), Alpha, m68hc11, ia64, and m32r targets
7763 have been updated to use a new backtrace mechanism which includes
7764 DWARF 2 CFI support.
7768 GDB's remote protocol has been extended to include support for hosted
7769 file I/O (where the remote target uses GDB's file system). See GDB's
7770 remote protocol documentation for details.
7772 * All targets using the new architecture framework.
7774 All of GDB's targets have been updated to use the new internal
7775 architecture framework. The way is now open for future GDB releases
7776 to include cross-architecture native debugging support (i386 on amd64,
7779 * GNU/Linux's Thread Local Storage (TLS)
7781 GDB now includes support for for the GNU/Linux implementation of
7782 per-thread variables.
7784 * GNU/Linux's Native POSIX Thread Library (NPTL)
7786 GDB's thread code has been updated to work with either the new
7787 GNU/Linux NPTL thread library or the older "LinuxThreads" library.
7789 * Separate debug info.
7791 GDB, in conjunction with BINUTILS, now supports a mechanism for
7792 automatically loading debug information from a separate file. Instead
7793 of shipping full debug and non-debug versions of system libraries,
7794 system integrators can now instead ship just the stripped libraries
7795 and optional debug files.
7797 * DWARF 2 Location Expressions
7799 DWARF 2 Location Expressions allow the compiler to more completely
7800 describe the location of variables (even in optimized code) to the
7803 GDB now includes preliminary support for location expressions (support
7804 for DW_OP_piece is still missing).
7808 A number of long standing bugs that caused GDB to die while starting a
7809 Java application have been fixed. GDB's Java support is now
7810 considered "usable".
7812 * GNU/Linux support for fork, vfork, and exec.
7814 The "catch fork", "catch exec", "catch vfork", and "set follow-fork-mode"
7815 commands are now implemented for GNU/Linux. They require a 2.5.x or later
7818 * GDB supports logging output to a file
7820 There are two new commands, "set logging" and "show logging", which can be
7821 used to capture GDB's output to a file.
7823 * The meaning of "detach" has changed for gdbserver
7825 The "detach" command will now resume the application, as documented. To
7826 disconnect from gdbserver and leave it stopped, use the new "disconnect"
7829 * d10v, m68hc11 `regs' command deprecated
7831 The `info registers' command has been updated so that it displays the
7832 registers using a format identical to the old `regs' command.
7836 A new command, "maint set profile on/off", has been added. This command can
7837 be used to enable or disable profiling while running GDB, to profile a
7838 session or a set of commands. In addition there is a new configure switch,
7839 "--enable-profiling", which will cause GDB to be compiled with profiling
7840 data, for more informative profiling results.
7842 * Default MI syntax changed to "mi2".
7844 The default MI (machine interface) syntax, enabled by the command line
7845 option "-i=mi", has been changed to "mi2". The previous MI syntax,
7846 "mi1", can be enabled by specifying the option "-i=mi1".
7848 Support for the original "mi0" syntax (included in GDB 5.0) has been
7851 Fix for gdb/192: removed extraneous space when displaying frame level.
7852 Fix for gdb/672: update changelist is now output in mi list format.
7853 Fix for gdb/702: a -var-assign that updates the value now shows up
7854 in a subsequent -var-update.
7856 * New native configurations.
7858 FreeBSD/amd64 x86_64-*-freebsd*
7860 * Multi-arched targets.
7862 HP/PA HPUX11 hppa*-*-hpux*
7863 Renesas M32R/D w/simulator m32r-*-elf*
7865 * OBSOLETE configurations and files
7867 Configurations that have been declared obsolete in this release have
7868 been commented out. Unless there is activity to revive these
7869 configurations, the next release of GDB will have their sources
7870 permanently REMOVED.
7872 Z8000 simulator z8k-zilog-none or z8ksim
7873 Matsushita MN10200 w/simulator mn10200-*-*
7874 H8/500 simulator h8500-hitachi-hms or h8500hms
7875 HP/PA running BSD hppa*-*-bsd*
7876 HP/PA running OSF/1 hppa*-*-osf*
7877 HP/PA Pro target hppa*-*-pro*
7878 PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
7879 Sequent family i[3456]86-sequent-sysv4*
7880 i[3456]86-sequent-sysv*
7881 i[3456]86-sequent-bsd*
7882 Tsqware Sparclet sparclet-*-*
7883 Fujitsu SPARClite sparclite-fujitsu-none or sparclite
7885 * REMOVED configurations and files
7888 Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
7889 IBM AIX PS/2 i[3456]86-*-aix
7890 i386 running Mach 3.0 i[3456]86-*-mach3*
7891 i386 running Mach i[3456]86-*-mach*
7892 i386 running OSF/1 i[3456]86-*osf1mk*
7893 HP/Apollo 68k Family m68*-apollo*-sysv*,
7895 m68*-hp-bsd*, m68*-hp-hpux*
7896 Argonaut Risc Chip (ARC) arc-*-*
7897 Mitsubishi D30V d30v-*-*
7898 Fujitsu FR30 fr30-*-elf*
7899 OS/9000 i[34]86-*-os9k
7900 I960 with MON960 i960-*-coff
7902 * MIPS $fp behavior changed
7904 The convenience variable $fp, for the MIPS, now consistently returns
7905 the address of the current frame's base. Previously, depending on the
7906 context, $fp could refer to either $sp or the current frame's base
7907 address. See ``8.10 Registers'' in the manual ``Debugging with GDB:
7908 The GNU Source-Level Debugger''.
7910 *** Changes in GDB 5.3:
7912 * GNU/Linux shared library multi-threaded performance improved.
7914 When debugging a multi-threaded application on GNU/Linux, GDB now uses
7915 `/proc', in preference to `ptrace' for memory reads. This may result
7916 in an improvement in the start-up time of multi-threaded, shared
7917 library applications when run under GDB. One GDB user writes: ``loads
7918 shared libs like mad''.
7920 * ``gdbserver'' now supports multi-threaded applications on some targets
7922 Support for debugging multi-threaded applications which use
7923 the GNU/Linux LinuxThreads package has been added for
7924 arm*-*-linux*-gnu*, i[3456]86-*-linux*-gnu*, mips*-*-linux*-gnu*,
7925 powerpc*-*-linux*-gnu*, and sh*-*-linux*-gnu*.
7927 * GDB now supports C/C++ preprocessor macros.
7929 GDB now expands preprocessor macro invocations in C/C++ expressions,
7930 and provides various commands for showing macro definitions and how
7933 The new command `macro expand EXPRESSION' expands any macro
7934 invocations in expression, and shows the result.
7936 The new command `show macro MACRO-NAME' shows the definition of the
7937 macro named MACRO-NAME, and where it was defined.
7939 Most compilers don't include information about macros in the debugging
7940 information by default. In GCC 3.1, for example, you need to compile
7941 your program with the options `-gdwarf-2 -g3'. If the macro
7942 information is present in the executable, GDB will read it.
7944 * Multi-arched targets.
7946 DEC Alpha (partial) alpha*-*-*
7947 DEC VAX (partial) vax-*-*
7949 National Semiconductor NS32000 (partial) ns32k-*-*
7950 Motorola 68000 (partial) m68k-*-*
7951 Motorola MCORE mcore-*-*
7955 Fujitsu FRV architecture added by Red Hat frv*-*-*
7958 * New native configurations
7960 Alpha NetBSD alpha*-*-netbsd*
7961 SH NetBSD sh*-*-netbsdelf*
7962 MIPS NetBSD mips*-*-netbsd*
7963 UltraSPARC NetBSD sparc64-*-netbsd*
7965 * OBSOLETE configurations and files
7967 Configurations that have been declared obsolete in this release have
7968 been commented out. Unless there is activity to revive these
7969 configurations, the next release of GDB will have their sources
7970 permanently REMOVED.
7972 Mitsubishi D30V d30v-*-*
7973 OS/9000 i[34]86-*-os9k
7974 IBM AIX PS/2 i[3456]86-*-aix
7975 Fujitsu FR30 fr30-*-elf*
7976 Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
7977 Argonaut Risc Chip (ARC) arc-*-*
7978 i386 running Mach 3.0 i[3456]86-*-mach3*
7979 i386 running Mach i[3456]86-*-mach*
7980 i386 running OSF/1 i[3456]86-*osf1mk*
7981 HP/Apollo 68k Family m68*-apollo*-sysv*,
7983 m68*-hp-bsd*, m68*-hp-hpux*
7984 I960 with MON960 i960-*-coff
7986 * OBSOLETE languages
7988 CHILL, a Pascal like language used by telecommunications companies.
7990 * REMOVED configurations and files
7992 AMD 29k family via UDI a29k-amd-udi, udi29k
7993 A29K VxWorks a29k-*-vxworks
7994 AMD 29000 embedded, using EBMON a29k-none-none
7995 AMD 29000 embedded with COFF a29k-none-coff
7996 AMD 29000 embedded with a.out a29k-none-aout
7998 testsuite/gdb.hp/gdb.threads-hp/ directory
8000 * New command "set max-user-call-depth <nnn>"
8002 This command allows the user to limit the call depth of user-defined
8003 commands. The default is 1024.
8005 * Changes in FreeBSD/i386 native debugging.
8007 Support for the "generate-core-file" has been added.
8009 * New commands "dump", "append", and "restore".
8011 These commands allow data to be copied from target memory
8012 to a bfd-format or binary file (dump and append), and back
8013 from a file into memory (restore).
8015 * Improved "next/step" support on multi-processor Alpha Tru64.
8017 The previous single-step mechanism could cause unpredictable problems,
8018 including the random appearance of SIGSEGV or SIGTRAP signals. The use
8019 of a software single-step mechanism prevents this.
8021 *** Changes in GDB 5.2.1:
8029 gdb/182: gdb/323: gdb/237: On alpha, gdb was reporting:
8030 mdebugread.c:2443: gdb-internal-error: sect_index_data not initialized
8031 Fix, by Joel Brobecker imported from mainline.
8033 gdb/439: gdb/291: On some ELF object files, gdb was reporting:
8034 dwarf2read.c:1072: gdb-internal-error: sect_index_text not initialize
8035 Fix, by Fred Fish, imported from mainline.
8037 Dwarf2 .debug_frame & .eh_frame handler improved in many ways.
8038 Surprisingly enough, it works now.
8039 By Michal Ludvig, imported from mainline.
8041 i386 hardware watchpoint support:
8042 avoid misses on second run for some targets.
8043 By Pierre Muller, imported from mainline.
8045 *** Changes in GDB 5.2:
8047 * New command "set trust-readonly-sections on[off]".
8049 This command is a hint that tells gdb that read-only sections
8050 really are read-only (ie. that their contents will not change).
8051 In this mode, gdb will go to the object file rather than the
8052 target to read memory from read-only sections (such as ".text").
8053 This can be a significant performance improvement on some
8054 (notably embedded) targets.
8056 * New command "generate-core-file" (or "gcore").
8058 This new gdb command allows the user to drop a core file of the child
8059 process state at any time. So far it's been implemented only for
8060 GNU/Linux and Solaris, but should be relatively easily ported to other
8061 hosts. Argument is core file name (defaults to core.<pid>).
8063 * New command line option
8065 GDB now accepts --pid or -p followed by a process id.
8067 * Change in command line behavior -- corefiles vs. process ids.
8069 There is a subtle behavior in the way in which GDB handles
8070 command line arguments. The first non-flag argument is always
8071 a program to debug, but the second non-flag argument may either
8072 be a corefile or a process id. Previously, GDB would attempt to
8073 open the second argument as a corefile, and if that failed, would
8074 issue a superfluous error message and then attempt to attach it as
8075 a process. Now, if the second argument begins with a non-digit,
8076 it will be treated as a corefile. If it begins with a digit,
8077 GDB will attempt to attach it as a process, and if no such process
8078 is found, will then attempt to open it as a corefile.
8080 * Changes in ARM configurations.
8082 Multi-arch support is enabled for all ARM configurations. The ARM/NetBSD
8083 configuration is fully multi-arch.
8085 * New native configurations
8087 ARM NetBSD arm*-*-netbsd*
8088 x86 OpenBSD i[3456]86-*-openbsd*
8089 AMD x86-64 running GNU/Linux x86_64-*-linux-*
8090 Sparc64 running FreeBSD sparc64-*-freebsd*
8094 Sanyo XStormy16 xstormy16-elf
8096 * OBSOLETE configurations and files
8098 Configurations that have been declared obsolete in this release have
8099 been commented out. Unless there is activity to revive these
8100 configurations, the next release of GDB will have their sources
8101 permanently REMOVED.
8103 AMD 29k family via UDI a29k-amd-udi, udi29k
8104 A29K VxWorks a29k-*-vxworks
8105 AMD 29000 embedded, using EBMON a29k-none-none
8106 AMD 29000 embedded with COFF a29k-none-coff
8107 AMD 29000 embedded with a.out a29k-none-aout
8109 testsuite/gdb.hp/gdb.threads-hp/ directory
8111 * REMOVED configurations and files
8113 TI TMS320C80 tic80-*-*
8115 PowerPC Solaris powerpcle-*-solaris*
8116 PowerPC Windows NT powerpcle-*-cygwin32
8117 PowerPC Netware powerpc-*-netware*
8118 Harris/CXUX m88k m88*-harris-cxux*
8119 Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-*
8120 ns32k-utek-sysv* ns32k-utek-*
8121 SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
8122 Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
8123 Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
8124 ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
8125 Apple Macintosh (MPW) host and target N/A host, powerpc-*-macos*
8127 * Changes to command line processing
8129 The new `--args' feature can be used to specify command-line arguments
8130 for the inferior from gdb's command line.
8132 * Changes to key bindings
8134 There is a new `operate-and-get-next' function bound to `C-o'.
8136 *** Changes in GDB 5.1.1
8138 Fix compile problem on DJGPP.
8140 Fix a problem with floating-point registers on the i386 being
8143 Fix to stop GDB crashing on .debug_str debug info.
8145 Numerous documentation fixes.
8147 Numerous testsuite fixes.
8149 *** Changes in GDB 5.1:
8151 * New native configurations
8153 Alpha FreeBSD alpha*-*-freebsd*
8154 x86 FreeBSD 3.x and 4.x i[3456]86*-freebsd[34]*
8155 MIPS GNU/Linux mips*-*-linux*
8156 MIPS SGI Irix 6.x mips*-sgi-irix6*
8157 ia64 AIX ia64-*-aix*
8158 s390 and s390x GNU/Linux {s390,s390x}-*-linux*
8162 Motorola 68HC11 and 68HC12 m68hc11-elf
8164 UltraSparc running GNU/Linux sparc64-*-linux*
8166 * OBSOLETE configurations and files
8168 x86 FreeBSD before 2.2 i[3456]86*-freebsd{1,2.[01]}*,
8169 Harris/CXUX m88k m88*-harris-cxux*
8170 Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-*
8171 ns32k-utek-sysv* ns32k-utek-*
8172 TI TMS320C80 tic80-*-*
8174 Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
8175 PowerPC Solaris powerpcle-*-solaris*
8176 PowerPC Windows NT powerpcle-*-cygwin32
8177 PowerPC Netware powerpc-*-netware*
8178 SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
8179 Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
8180 ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
8181 Apple Macintosh (MPW) host N/A
8183 stuff.c (Program to stuff files into a specially prepared space in kdb)
8184 kdb-start.c (Main loop for the standalone kernel debugger)
8186 Configurations that have been declared obsolete in this release have
8187 been commented out. Unless there is activity to revive these
8188 configurations, the next release of GDB will have their sources
8189 permanently REMOVED.
8191 * REMOVED configurations and files
8193 Altos 3068 m68*-altos-*
8194 Convex c1-*-*, c2-*-*
8196 ARM RISCix arm-*-* (as host)
8200 * GDB has been converted to ISO C.
8202 GDB's source code has been converted to ISO C. In particular, the
8203 sources are fully protoized, and rely on standard headers being
8208 * "info symbol" works on platforms which use COFF, ECOFF, XCOFF, and NLM.
8210 * The MI enabled by default.
8212 The new machine oriented interface (MI) introduced in GDB 5.0 has been
8213 revised and enabled by default. Packages which use GDB as a debugging
8214 engine behind a UI or another front end are encouraged to switch to
8215 using the GDB/MI interface, instead of the old annotations interface
8216 which is now deprecated.
8218 * Support for debugging Pascal programs.
8220 GDB now includes support for debugging Pascal programs. The following
8221 main features are supported:
8223 - Pascal-specific data types such as sets;
8225 - automatic recognition of Pascal sources based on file-name
8228 - Pascal-style display of data types, variables, and functions;
8230 - a Pascal expression parser.
8232 However, some important features are not yet supported.
8234 - Pascal string operations are not supported at all;
8236 - there are some problems with boolean types;
8238 - Pascal type hexadecimal constants are not supported
8239 because they conflict with the internal variables format;
8241 - support for Pascal objects and classes is not full yet;
8243 - unlike Pascal, GDB is case-sensitive for symbol names.
8245 * Changes in completion.
8247 Commands such as `shell', `run' and `set args', which pass arguments
8248 to inferior programs, now complete on file names, similar to what
8249 users expect at the shell prompt.
8251 Commands which accept locations, such as `disassemble', `print',
8252 `breakpoint', `until', etc. now complete on filenames as well as
8253 program symbols. Thus, if you type "break foob TAB", and the source
8254 files linked into the programs include `foobar.c', that file name will
8255 be one of the candidates for completion. However, file names are not
8256 considered for completion after you typed a colon that delimits a file
8257 name from a name of a function in that file, as in "break foo.c:bar".
8259 `set demangle-style' completes on available demangling styles.
8261 * New platform-independent commands:
8263 It is now possible to define a post-hook for a command as well as a
8264 hook that runs before the command. For more details, see the
8265 documentation of `hookpost' in the GDB manual.
8267 * Changes in GNU/Linux native debugging.
8269 Support for debugging multi-threaded programs has been completely
8270 revised for all platforms except m68k and sparc. You can now debug as
8271 many threads as your system allows you to have.
8273 Attach/detach is supported for multi-threaded programs.
8275 Support for SSE registers was added for x86. This doesn't work for
8276 multi-threaded programs though.
8278 * Changes in MIPS configurations.
8280 Multi-arch support is enabled for all MIPS configurations.
8282 GDB can now be built as native debugger on SGI Irix 6.x systems for
8283 debugging n32 executables. (Debugging 64-bit executables is not yet
8286 * Unified support for hardware watchpoints in all x86 configurations.
8288 Most (if not all) native x86 configurations support hardware-assisted
8289 breakpoints and watchpoints in a unified manner. This support
8290 implements debug register sharing between watchpoints, which allows to
8291 put a virtually infinite number of watchpoints on the same address,
8292 and also supports watching regions up to 16 bytes with several debug
8295 The new maintenance command `maintenance show-debug-regs' toggles
8296 debugging print-outs in functions that insert, remove, and test
8297 watchpoints and hardware breakpoints.
8299 * Changes in the DJGPP native configuration.
8301 New command ``info dos sysinfo'' displays assorted information about
8302 the CPU, OS, memory, and DPMI server.
8304 New commands ``info dos gdt'', ``info dos ldt'', and ``info dos idt''
8305 display information about segment descriptors stored in GDT, LDT, and
8308 New commands ``info dos pde'' and ``info dos pte'' display entries
8309 from Page Directory and Page Tables (for now works with CWSDPMI only).
8310 New command ``info dos address-pte'' displays the Page Table entry for
8311 a given linear address.
8313 GDB can now pass command lines longer than 126 characters to the
8314 program being debugged (requires an update to the libdbg.a library
8315 which is part of the DJGPP development kit).
8317 DWARF2 debug info is now supported.
8319 It is now possible to `step' and `next' through calls to `longjmp'.
8321 * Changes in documentation.
8323 All GDB documentation was converted to GFDL, the GNU Free
8324 Documentation License.
8326 Tracepoints-related commands are now fully documented in the GDB
8329 TUI, the Text-mode User Interface, is now documented in the manual.
8331 Tracepoints-related commands are now fully documented in the GDB
8334 The "GDB Internals" manual now has an index. It also includes
8335 documentation of `ui_out' functions, GDB coding standards, x86
8336 hardware watchpoints, and memory region attributes.
8338 * GDB's version number moved to ``version.in''
8340 The Makefile variable VERSION has been replaced by the file
8341 ``version.in''. People creating GDB distributions should update the
8342 contents of this file.
8346 GUD support is now a standard part of the EMACS distribution.
8348 *** Changes in GDB 5.0:
8350 * Improved support for debugging FP programs on x86 targets
8352 Unified and much-improved support for debugging floating-point
8353 programs on all x86 targets. In particular, ``info float'' now
8354 displays the FP registers in the same format on all x86 targets, with
8355 greater level of detail.
8357 * Improvements and bugfixes in hardware-assisted watchpoints
8359 It is now possible to watch array elements, struct members, and
8360 bitfields with hardware-assisted watchpoints. Data-read watchpoints
8361 on x86 targets no longer erroneously trigger when the address is
8364 * Improvements in the native DJGPP version of GDB
8366 The distribution now includes all the scripts and auxiliary files
8367 necessary to build the native DJGPP version on MS-DOS/MS-Windows
8368 machines ``out of the box''.
8370 The DJGPP version can now debug programs that use signals. It is
8371 possible to catch signals that happened in the debuggee, deliver
8372 signals to it, interrupt it with Ctrl-C, etc. (Previously, a signal
8373 would kill the program being debugged.) Programs that hook hardware
8374 interrupts (keyboard, timer, etc.) can also be debugged.
8376 It is now possible to debug DJGPP programs that redirect their
8377 standard handles or switch them to raw (as opposed to cooked) mode, or
8378 even close them. The command ``run < foo > bar'' works as expected,
8379 and ``info terminal'' reports useful information about the debuggee's
8380 terminal, including raw/cooked mode, redirection, etc.
8382 The DJGPP version now uses termios functions for console I/O, which
8383 enables debugging graphics programs. Interrupting GDB with Ctrl-C
8386 DOS-style file names with drive letters are now fully supported by
8389 It is now possible to debug DJGPP programs that switch their working
8390 directory. It is also possible to rerun the debuggee any number of
8391 times without restarting GDB; thus, you can use the same setup,
8392 breakpoints, etc. for many debugging sessions.
8394 * New native configurations
8396 ARM GNU/Linux arm*-*-linux*
8397 PowerPC GNU/Linux powerpc-*-linux*
8401 Motorola MCore mcore-*-*
8402 x86 VxWorks i[3456]86-*-vxworks*
8403 PowerPC VxWorks powerpc-*-vxworks*
8404 TI TMS320C80 tic80-*-*
8406 * OBSOLETE configurations
8408 Altos 3068 m68*-altos-*
8409 Convex c1-*-*, c2-*-*
8411 ARM RISCix arm-*-* (as host)
8414 Configurations that have been declared obsolete will be commented out,
8415 but the code will be left in place. If there is no activity to revive
8416 these configurations before the next release of GDB, the sources will
8417 be permanently REMOVED.
8419 * Gould support removed
8421 Support for the Gould PowerNode and NP1 has been removed.
8423 * New features for SVR4
8425 On SVR4 native platforms (such as Solaris), if you attach to a process
8426 without first loading a symbol file, GDB will now attempt to locate and
8427 load symbols from the running process's executable file.
8429 * Many C++ enhancements
8431 C++ support has been greatly improved. Overload resolution now works properly
8432 in almost all cases. RTTI support is on the way.
8434 * Remote targets can connect to a sub-program
8436 A popen(3) style serial-device has been added. This device starts a
8437 sub-process (such as a stand-alone simulator) and then communicates
8438 with that. The sub-program to run is specified using the syntax
8439 ``|<program> <args>'' vis:
8441 (gdb) set remotedebug 1
8442 (gdb) target extended-remote |mn10300-elf-sim program-args
8444 * MIPS 64 remote protocol
8446 A long standing bug in the mips64 remote protocol where by GDB
8447 expected certain 32 bit registers (ex SR) to be transferred as 32
8448 instead of 64 bits has been fixed.
8450 The command ``set remote-mips64-transfers-32bit-regs on'' has been
8451 added to provide backward compatibility with older versions of GDB.
8453 * ``set remotebinarydownload'' replaced by ``set remote X-packet''
8455 The command ``set remotebinarydownload'' command has been replaced by
8456 ``set remote X-packet''. Other commands in ``set remote'' family
8457 include ``set remote P-packet''.
8459 * Breakpoint commands accept ranges.
8461 The breakpoint commands ``enable'', ``disable'', and ``delete'' now
8462 accept a range of breakpoints, e.g. ``5-7''. The tracepoint command
8463 ``tracepoint passcount'' also accepts a range of tracepoints.
8465 * ``apropos'' command added.
8467 The ``apropos'' command searches through command names and
8468 documentation strings, printing out matches, making it much easier to
8469 try to find a command that does what you are looking for.
8473 A new machine oriented interface (MI) has been added to GDB. This
8474 interface is designed for debug environments running GDB as a separate
8475 process. This is part of the long term libGDB project. See the
8476 "GDB/MI" chapter of the GDB manual for further information. It can be
8477 enabled by configuring with:
8479 .../configure --enable-gdbmi
8481 *** Changes in GDB-4.18:
8483 * New native configurations
8485 HP-UX 10.20 hppa*-*-hpux10.20
8486 HP-UX 11.x hppa*-*-hpux11.0*
8487 M68K GNU/Linux m68*-*-linux*
8491 Fujitsu FR30 fr30-*-elf*
8492 Intel StrongARM strongarm-*-*
8493 Mitsubishi D30V d30v-*-*
8495 * OBSOLETE configurations
8497 Gould PowerNode, NP1 np1-*-*, pn-*-*
8499 Configurations that have been declared obsolete will be commented out,
8500 but the code will be left in place. If there is no activity to revive
8501 these configurations before the next release of GDB, the sources will
8502 be permanently REMOVED.
8506 As a compatibility experiment, GDB's source files buildsym.h and
8507 buildsym.c have been converted to pure standard C, no longer
8508 containing any K&R compatibility code. We believe that all systems in
8509 use today either come with a standard C compiler, or have a GCC port
8510 available. If this is not true, please report the affected
8511 configuration to bug-gdb@gnu.org immediately. See the README file for
8512 information about getting a standard C compiler if you don't have one
8517 GDB now uses readline 2.2.
8519 * set extension-language
8521 You can now control the mapping between filename extensions and source
8522 languages by using the `set extension-language' command. For instance,
8523 you can ask GDB to treat .c files as C++ by saying
8524 set extension-language .c c++
8525 The command `info extensions' lists all of the recognized extensions
8526 and their associated languages.
8528 * Setting processor type for PowerPC and RS/6000
8530 When GDB is configured for a powerpc*-*-* or an rs6000*-*-* target,
8531 you can use the `set processor' command to specify what variant of the
8532 PowerPC family you are debugging. The command
8536 sets the PowerPC/RS6000 variant to NAME. GDB knows about the
8537 following PowerPC and RS6000 variants:
8539 ppc-uisa PowerPC UISA - a PPC processor as viewed by user-level code
8540 rs6000 IBM RS6000 ("POWER") architecture, user-level view
8542 403GC IBM PowerPC 403GC
8543 505 Motorola PowerPC 505
8544 860 Motorola PowerPC 860 or 850
8545 601 Motorola PowerPC 601
8546 602 Motorola PowerPC 602
8547 603 Motorola/IBM PowerPC 603 or 603e
8548 604 Motorola PowerPC 604 or 604e
8549 750 Motorola/IBM PowerPC 750 or 750
8551 At the moment, this command just tells GDB what to name the
8552 special-purpose processor registers. Since almost all the affected
8553 registers are inaccessible to user-level programs, this command is
8554 only useful for remote debugging in its present form.
8558 Thanks to a major code donation from Hewlett-Packard, GDB now has much
8559 more extensive support for HP-UX. Added features include shared
8560 library support, kernel threads and hardware watchpoints for 11.00,
8561 support for HP's ANSI C and C++ compilers, and a compatibility mode
8562 for xdb and dbx commands.
8566 HP's donation includes the new concept of catchpoints, which is a
8567 generalization of the old catch command. On HP-UX, it is now possible
8568 to catch exec, fork, and vfork, as well as library loading.
8570 This means that the existing catch command has changed; its first
8571 argument now specifies the type of catch to be set up. See the
8572 output of "help catch" for a list of catchpoint types.
8574 * Debugging across forks
8576 On HP-UX, you can choose which process to debug when a fork() happens
8581 HP has donated a curses-based terminal user interface (TUI). To get
8582 it, build with --enable-tui. Although this can be enabled for any
8583 configuration, at present it only works for native HP debugging.
8585 * GDB remote protocol additions
8587 A new protocol packet 'X' that writes binary data is now available.
8588 Default behavior is to try 'X', then drop back to 'M' if the stub
8589 fails to respond. The settable variable `remotebinarydownload'
8590 allows explicit control over the use of 'X'.
8592 For 64-bit targets, the memory packets ('M' and 'm') can now contain a
8593 full 64-bit address. The command
8595 set remoteaddresssize 32
8597 can be used to revert to the old behavior. For existing remote stubs
8598 the change should not be noticed, as the additional address information
8601 In order to assist in debugging stubs, you may use the maintenance
8602 command `packet' to send any text string to the stub. For instance,
8604 maint packet heythere
8606 sends the packet "$heythere#<checksum>". Note that it is very easy to
8607 disrupt a debugging session by sending the wrong packet at the wrong
8610 The compare-sections command allows you to compare section data on the
8611 target to what is in the executable file without uploading or
8612 downloading, by comparing CRC checksums.
8614 * Tracing can collect general expressions
8616 You may now collect general expressions at tracepoints. This requires
8617 further additions to the target-side stub; see tracepoint.c and
8618 doc/agentexpr.texi for further details.
8620 * mask-address variable for Mips
8622 For Mips targets, you may control the zeroing of the upper 32 bits of
8623 a 64-bit address by entering `set mask-address on'. This is mainly
8624 of interest to users of embedded R4xxx and R5xxx processors.
8626 * Higher serial baud rates
8628 GDB's serial code now allows you to specify baud rates 57600, 115200,
8629 230400, and 460800 baud. (Note that your host system may not be able
8630 to achieve all of these rates.)
8634 The i960 configuration now includes an initial implementation of a
8635 builtin simulator, contributed by Jim Wilson.
8638 *** Changes in GDB-4.17:
8640 * New native configurations
8642 Alpha GNU/Linux alpha*-*-linux*
8643 Unixware 2.x i[3456]86-unixware2*
8644 Irix 6.x mips*-sgi-irix6*
8645 PowerPC GNU/Linux powerpc-*-linux*
8646 PowerPC Solaris powerpcle-*-solaris*
8647 Sparc GNU/Linux sparc-*-linux*
8648 Motorola sysV68 R3V7.1 m68k-motorola-sysv
8652 Argonaut Risc Chip (ARC) arc-*-*
8653 Hitachi H8/300S h8300*-*-*
8654 Matsushita MN10200 w/simulator mn10200-*-*
8655 Matsushita MN10300 w/simulator mn10300-*-*
8656 MIPS NEC VR4100 mips64*vr4100*{,el}-*-elf*
8657 MIPS NEC VR5000 mips64*vr5000*{,el}-*-elf*
8658 MIPS Toshiba TX39 mips64*tx39*{,el}-*-elf*
8659 Mitsubishi D10V w/simulator d10v-*-*
8660 Mitsubishi M32R/D w/simulator m32r-*-elf*
8661 Tsqware Sparclet sparclet-*-*
8662 NEC V850 w/simulator v850-*-*
8664 * New debugging protocols
8666 ARM with RDI protocol arm*-*-*
8667 M68K with dBUG monitor m68*-*-{aout,coff,elf}
8668 DDB and LSI variants of PMON protocol mips*-*-*
8669 PowerPC with DINK32 monitor powerpc{,le}-*-eabi
8670 PowerPC with SDS protocol powerpc{,le}-*-eabi
8671 Macraigor OCD (Wiggler) devices powerpc{,le}-*-eabi
8675 All configurations can now understand and use the DWARF 2 debugging
8676 format. The choice is automatic, if the symbol file contains DWARF 2
8681 GDB now includes basic Java language support. This support is
8682 only useful with Java compilers that produce native machine code.
8684 * solib-absolute-prefix and solib-search-path
8686 For SunOS and SVR4 shared libraries, you may now set the prefix for
8687 loading absolute shared library symbol files, and the search path for
8688 locating non-absolute shared library symbol files.
8690 * Live range splitting
8692 GDB can now effectively debug code for which GCC has performed live
8693 range splitting as part of its optimization. See gdb/doc/LRS for
8694 more details on the expected format of the stabs information.
8698 GDB's support for the GNU Hurd, including thread debugging, has been
8699 updated to work with current versions of the Hurd.
8703 GDB's ARM target configuration now handles the ARM7T (Thumb) 16-bit
8704 instruction set. ARM GDB automatically detects when Thumb
8705 instructions are in use, and adjusts disassembly and backtracing
8710 GDB's MIPS target configurations now handle the MIP16 16-bit
8715 GDB now includes support for overlays; if an executable has been
8716 linked such that multiple sections are based at the same address, GDB
8717 will decide which section to use for symbolic info. You can choose to
8718 control the decision manually, using overlay commands, or implement
8719 additional target-side support and use "overlay load-target" to bring
8720 in the overlay mapping. Do "help overlay" for more detail.
8724 The command "info symbol <address>" displays information about
8725 the symbol at the specified address.
8729 The standard remote protocol now includes an extension that allows
8730 asynchronous collection and display of trace data. This requires
8731 extensive support in the target-side debugging stub. Tracing mode
8732 includes a new interaction mode in GDB and new commands: see the
8733 file tracepoint.c for more details.
8737 Configurations for embedded MIPS now include a simulator contributed
8738 by Cygnus Solutions. The simulator supports the instruction sets
8739 of most MIPS variants.
8743 Sparc configurations may now include the ERC32 simulator contributed
8744 by the European Space Agency. The simulator is not built into
8745 Sparc targets by default; configure with --enable-sim to include it.
8749 For target configurations that may include multiple variants of a
8750 basic architecture (such as MIPS and SH), you may now set the
8751 architecture explicitly. "set arch" sets, "info arch" lists
8752 the possible architectures.
8754 *** Changes in GDB-4.16:
8756 * New native configurations
8758 Windows 95, x86 Windows NT i[345]86-*-cygwin32
8759 M68K NetBSD m68k-*-netbsd*
8760 PowerPC AIX 4.x powerpc-*-aix*
8761 PowerPC MacOS powerpc-*-macos*
8762 PowerPC Windows NT powerpcle-*-cygwin32
8763 RS/6000 AIX 4.x rs6000-*-aix4*
8767 ARM with RDP protocol arm-*-*
8768 I960 with MON960 i960-*-coff
8769 MIPS VxWorks mips*-*-vxworks*
8770 MIPS VR4300 with PMON mips64*vr4300{,el}-*-elf*
8771 PowerPC with PPCBUG monitor powerpc{,le}-*-eabi*
8773 Matra Sparclet sparclet-*-*
8777 The powerpc-eabi configuration now includes the PSIM simulator,
8778 contributed by Andrew Cagney, with assistance from Mike Meissner.
8779 PSIM is a very elaborate model of the PowerPC, including not only
8780 basic instruction set execution, but also details of execution unit
8781 performance and I/O hardware. See sim/ppc/README for more details.
8785 GDB now works with Solaris 2.5.
8787 * Windows 95/NT native
8789 GDB will now work as a native debugger on Windows 95 and Windows NT.
8790 To build it from source, you must use the "gnu-win32" environment,
8791 which uses a DLL to emulate enough of Unix to run the GNU tools.
8792 Further information, binaries, and sources are available at
8793 ftp.cygnus.com, under pub/gnu-win32.
8795 * dont-repeat command
8797 If a user-defined command includes the command `dont-repeat', then the
8798 command will not be repeated if the user just types return. This is
8799 useful if the command is time-consuming to run, so that accidental
8800 extra keystrokes don't run the same command many times.
8802 * Send break instead of ^C
8804 The standard remote protocol now includes an option to send a break
8805 rather than a ^C to the target in order to interrupt it. By default,
8806 GDB will send ^C; to send a break, set the variable `remotebreak' to 1.
8808 * Remote protocol timeout
8810 The standard remote protocol includes a new variable `remotetimeout'
8811 that allows you to set the number of seconds before GDB gives up trying
8812 to read from the target. The default value is 2.
8814 * Automatic tracking of dynamic object loading (HPUX and Solaris only)
8816 By default GDB will automatically keep track of objects as they are
8817 loaded and unloaded by the dynamic linker. By using the command `set
8818 stop-on-solib-events 1' you can arrange for GDB to stop the inferior
8819 when shared library events occur, thus allowing you to set breakpoints
8820 in shared libraries which are explicitly loaded by the inferior.
8822 Note this feature does not work on hpux8. On hpux9 you must link
8823 /usr/lib/end.o into your program. This feature should work
8824 automatically on hpux10.
8826 * Irix 5.x hardware watchpoint support
8828 Irix 5 configurations now support the use of hardware watchpoints.
8830 * Mips protocol "SYN garbage limit"
8832 When debugging a Mips target using the `target mips' protocol, you
8833 may set the number of characters that GDB will ignore by setting
8834 the `syn-garbage-limit'. A value of -1 means that GDB will ignore
8835 every character. The default value is 1050.
8837 * Recording and replaying remote debug sessions
8839 If you set `remotelogfile' to the name of a file, gdb will write to it
8840 a recording of a remote debug session. This recording may then be
8841 replayed back to gdb using "gdbreplay". See gdbserver/README for
8842 details. This is useful when you have a problem with GDB while doing
8843 remote debugging; you can make a recording of the session and send it
8844 to someone else, who can then recreate the problem.
8846 * Speedups for remote debugging
8848 GDB includes speedups for downloading and stepping MIPS systems using
8849 the IDT monitor, fast downloads to the Hitachi SH E7000 emulator,
8850 and more efficient S-record downloading.
8852 * Memory use reductions and statistics collection
8854 GDB now uses less memory and reports statistics about memory usage.
8855 Try the `maint print statistics' command, for example.
8857 *** Changes in GDB-4.15:
8859 * Psymtabs for XCOFF
8861 The symbol reader for AIX GDB now uses partial symbol tables. This
8862 can greatly improve startup time, especially for large executables.
8864 * Remote targets use caching
8866 Remote targets now use a data cache to speed up communication with the
8867 remote side. The data cache could lead to incorrect results because
8868 it doesn't know about volatile variables, thus making it impossible to
8869 debug targets which use memory mapped I/O devices. `set remotecache
8870 off' turns the data cache off.
8872 * Remote targets may have threads
8874 The standard remote protocol now includes support for multiple threads
8875 in the target system, using new protocol commands 'H' and 'T'. See
8876 gdb/remote.c for details.
8880 If GDB is configured with `--enable-netrom', then it will include
8881 support for the NetROM ROM emulator from XLNT Designs. The NetROM
8882 acts as though it is a bank of ROM on the target board, but you can
8883 write into it over the network. GDB's support consists only of
8884 support for fast loading into the emulated ROM; to debug, you must use
8885 another protocol, such as standard remote protocol. The usual
8886 sequence is something like
8888 target nrom <netrom-hostname>
8890 target remote <netrom-hostname>:1235
8894 GDB now includes support for the Apple Macintosh, as a host only. It
8895 may be run as either an MPW tool or as a standalone application, and
8896 it can debug through the serial port. All the usual GDB commands are
8897 available, but to the target command, you must supply "serial" as the
8898 device type instead of "/dev/ttyXX". See mpw-README in the main
8899 directory for more information on how to build. The MPW configuration
8900 scripts */mpw-config.in support only a few targets, and only the
8901 mips-idt-ecoff target has been tested.
8905 GDB configuration now uses autoconf. This is not user-visible,
8906 but does simplify configuration and building.
8910 GDB now supports hpux10.
8912 *** Changes in GDB-4.14:
8914 * New native configurations
8916 x86 FreeBSD i[345]86-*-freebsd
8917 x86 NetBSD i[345]86-*-netbsd
8918 NS32k NetBSD ns32k-*-netbsd
8919 Sparc NetBSD sparc-*-netbsd
8923 A29K VxWorks a29k-*-vxworks
8924 HP PA PRO embedded (WinBond W89K & Oki OP50N) hppa*-*-pro*
8925 CPU32 EST-300 emulator m68*-*-est*
8926 PowerPC ELF powerpc-*-elf
8929 * Alpha OSF/1 support for procfs
8931 GDB now supports procfs under OSF/1-2.x and higher, which makes it
8932 possible to attach to running processes. As the mounting of the /proc
8933 filesystem is optional on the Alpha, GDB automatically determines
8934 the availability of /proc during startup. This can lead to problems
8935 if /proc is unmounted after GDB has been started.
8937 * Arguments to user-defined commands
8939 User commands may accept up to 10 arguments separated by whitespace.
8940 Arguments are accessed within the user command via $arg0..$arg9. A
8943 print $arg0 + $arg1 + $arg2
8945 To execute the command use:
8948 Defines the command "adder" which prints the sum of its three arguments.
8949 Note the arguments are text substitutions, so they may reference variables,
8950 use complex expressions, or even perform inferior function calls.
8952 * New `if' and `while' commands
8954 This makes it possible to write more sophisticated user-defined
8955 commands. Both commands take a single argument, which is the
8956 expression to evaluate, and must be followed by the commands to
8957 execute, one per line, if the expression is nonzero, the list being
8958 terminated by the word `end'. The `if' command list may include an
8959 `else' word, which causes the following commands to be executed only
8960 if the expression is zero.
8962 * Fortran source language mode
8964 GDB now includes partial support for Fortran 77. It will recognize
8965 Fortran programs and can evaluate a subset of Fortran expressions, but
8966 variables and functions may not be handled correctly. GDB will work
8967 with G77, but does not yet know much about symbols emitted by other
8970 * Better HPUX support
8972 Most debugging facilities now work on dynamic executables for HPPAs
8973 running hpux9 or later. You can attach to running dynamically linked
8974 processes, but by default the dynamic libraries will be read-only, so
8975 for instance you won't be able to put breakpoints in them. To change
8976 that behavior do the following before running the program:
8982 This will cause the libraries to be mapped private and read-write.
8983 To revert to the normal behavior, do this:
8989 You cannot set breakpoints or examine data in the library until after
8990 the library is loaded if the function/data symbols do not have
8993 GDB can now also read debug symbols produced by the HP C compiler on
8994 HPPAs (sorry, no C++, Fortran or 68k support).
8996 * Target byte order now dynamically selectable
8998 You can choose which byte order to use with a target system, via the
8999 commands "set endian big" and "set endian little", and you can see the
9000 current setting by using "show endian". You can also give the command
9001 "set endian auto", in which case GDB will use the byte order
9002 associated with the executable. Currently, only embedded MIPS
9003 configurations support dynamic selection of target byte order.
9005 * New DOS host serial code
9007 This version uses DPMI interrupts to handle buffered I/O, so you
9008 no longer need to run asynctsr when debugging boards connected to
9011 *** Changes in GDB-4.13:
9013 * New "complete" command
9015 This lists all the possible completions for the rest of the line, if it
9016 were to be given as a command itself. This is intended for use by emacs.
9018 * Trailing space optional in prompt
9020 "set prompt" no longer adds a space for you after the prompt you set. This
9021 allows you to set a prompt which ends in a space or one that does not.
9023 * Breakpoint hit counts
9025 "info break" now displays a count of the number of times the breakpoint
9026 has been hit. This is especially useful in conjunction with "ignore"; you
9027 can ignore a large number of breakpoint hits, look at the breakpoint info
9028 to see how many times the breakpoint was hit, then run again, ignoring one
9029 less than that number, and this will get you quickly to the last hit of
9032 * Ability to stop printing at NULL character
9034 "set print null-stop" will cause GDB to stop printing the characters of
9035 an array when the first NULL is encountered. This is useful when large
9036 arrays actually contain only short strings.
9038 * Shared library breakpoints
9040 In SunOS 4.x, SVR4, and Alpha OSF/1 configurations, you can now set
9041 breakpoints in shared libraries before the executable is run.
9043 * Hardware watchpoints
9045 There is a new hardware breakpoint for the watch command for sparclite
9046 targets. See gdb/sparclite/hw_breakpoint.note.
9048 Hardware watchpoints are also now supported under GNU/Linux.
9052 Annotations have been added. These are for use with graphical interfaces,
9053 and are still experimental. Currently only gdba.el uses these.
9055 * Improved Irix 5 support
9057 GDB now works properly with Irix 5.2.
9059 * Improved HPPA support
9061 GDB now works properly with the latest GCC and GAS.
9063 * New native configurations
9065 Sequent PTX4 i[34]86-sequent-ptx4
9066 HPPA running OSF/1 hppa*-*-osf*
9067 Atari TT running SVR4 m68*-*-sysv4*
9068 RS/6000 LynxOS rs6000-*-lynxos*
9072 OS/9000 i[34]86-*-os9k
9073 MIPS R4000 mips64*{,el}-*-{ecoff,elf}
9076 * Hitachi SH7000 and E7000-PC ICE support
9078 There is now support for communicating with the Hitachi E7000-PC ICE.
9079 This is available automatically when GDB is configured for the SH.
9083 As usual, a variety of small fixes and improvements, both generic
9084 and configuration-specific. See the ChangeLog for more detail.
9086 *** Changes in GDB-4.12:
9088 * Irix 5 is now supported
9092 GDB-4.12 on the HPPA has a number of changes which make it unable
9093 to debug the output from the currently released versions of GCC and
9094 GAS (GCC 2.5.8 and GAS-2.2 or PAGAS-1.36). Until the next major release
9095 of GCC and GAS, versions of these tools designed to work with GDB-4.12
9096 can be retrieved via anonymous ftp from jaguar.cs.utah.edu:/dist.
9099 *** Changes in GDB-4.11:
9101 * User visible changes:
9105 The "set remotedebug" option is now consistent between the mips remote
9106 target, remote targets using the gdb-specific protocol, UDI (AMD's
9107 debug protocol for the 29k) and the 88k bug monitor. It is now an
9108 integer specifying a debug level (normally 0 or 1, but 2 means more
9109 debugging info for the mips target).
9111 * DEC Alpha native support
9113 GDB now works on the DEC Alpha. GCC 2.4.5 does not produce usable
9114 debug info, but GDB works fairly well with the DEC compiler and should
9115 work with a future GCC release. See the README file for a few
9116 Alpha-specific notes.
9118 * Preliminary thread implementation
9120 GDB now has preliminary thread support for both SGI/Irix and LynxOS.
9122 * LynxOS native and target support for 386
9124 This release has been hosted on LynxOS 2.2, and also can be configured
9125 to remotely debug programs running under LynxOS (see gdb/gdbserver/README
9128 * Improvements in C++ mangling/demangling.
9130 This release has much better g++ debugging, specifically in name
9131 mangling/demangling, virtual function calls, print virtual table,
9132 call methods, ...etc.
9134 *** Changes in GDB-4.10:
9136 * User visible changes:
9138 Remote debugging using the GDB-specific (`target remote') protocol now
9139 supports the `load' command. This is only useful if you have some
9140 other way of getting the stub to the target system, and you can put it
9141 somewhere in memory where it won't get clobbered by the download.
9143 Filename completion now works.
9145 When run under emacs mode, the "info line" command now causes the
9146 arrow to point to the line specified. Also, "info line" prints
9147 addresses in symbolic form (as well as hex).
9149 All vxworks based targets now support a user settable option, called
9150 vxworks-timeout. This option represents the number of seconds gdb
9151 should wait for responses to rpc's. You might want to use this if
9152 your vxworks target is, perhaps, a slow software simulator or happens
9153 to be on the far side of a thin network line.
9157 This release contains support for using a DEC alpha as a GDB host for
9158 cross debugging. Native alpha debugging is not supported yet.
9161 *** Changes in GDB-4.9:
9165 This is the first GDB release which is accompanied by a matching testsuite.
9166 The testsuite requires installation of dejagnu, which should be available
9167 via ftp from most sites that carry GNU software.
9171 'Cfront' style demangling has had its name changed to 'ARM' style, to
9172 emphasize that it was written from the specifications in the C++ Annotated
9173 Reference Manual, not necessarily to be compatible with AT&T cfront. Despite
9174 disclaimers, it still generated too much confusion with users attempting to
9175 use gdb with AT&T cfront.
9179 GDB now uses a standard remote interface to a simulator library.
9180 So far, the library contains simulators for the Zilog Z8001/2, the
9181 Hitachi H8/300, H8/500 and Super-H.
9183 * New targets supported
9185 H8/300 simulator h8300-hitachi-hms or h8300hms
9186 H8/500 simulator h8500-hitachi-hms or h8500hms
9187 SH simulator sh-hitachi-hms or sh
9188 Z8000 simulator z8k-zilog-none or z8ksim
9189 IDT MIPS board over serial line mips-idt-ecoff
9191 Cross-debugging to GO32 targets is supported. It requires a custom
9192 version of the i386-stub.c module which is integrated with the
9193 GO32 memory extender.
9195 * New remote protocols
9197 MIPS remote debugging protocol.
9199 * New source languages supported
9201 This version includes preliminary support for Chill, a Pascal like language
9202 used by telecommunications companies. Chill support is also being integrated
9203 into the GNU compiler, but we don't know when it will be publicly available.
9206 *** Changes in GDB-4.8:
9208 * HP Precision Architecture supported
9210 GDB now supports HP PA-RISC machines running HPUX. A preliminary
9211 version of this support was available as a set of patches from the
9212 University of Utah. GDB does not support debugging of programs
9213 compiled with the HP compiler, because HP will not document their file
9214 format. Instead, you must use GCC (version 2.3.2 or later) and PA-GAS
9215 (as available from jaguar.cs.utah.edu:/dist/pa-gas.u4.tar.Z).
9217 Many problems in the preliminary version have been fixed.
9219 * Faster and better demangling
9221 We have improved template demangling and fixed numerous bugs in the GNU style
9222 demangler. It can now handle type modifiers such as `static' or `const'. Wide
9223 character types (wchar_t) are now supported. Demangling of each symbol is now
9224 only done once, and is cached when the symbol table for a file is read in.
9225 This results in a small increase in memory usage for C programs, a moderate
9226 increase in memory usage for C++ programs, and a fantastic speedup in
9229 `Cfront' style demangling still doesn't work with AT&T cfront. It was written
9230 from the specifications in the Annotated Reference Manual, which AT&T's
9231 compiler does not actually implement.
9233 * G++ multiple inheritance compiler problem
9235 In the 2.3.2 release of gcc/g++, how the compiler resolves multiple
9236 inheritance lattices was reworked to properly discover ambiguities. We
9237 recently found an example which causes this new algorithm to fail in a
9238 very subtle way, producing bad debug information for those classes.
9239 The file 'gcc.patch' (in this directory) can be applied to gcc to
9240 circumvent the problem. A future GCC release will contain a complete
9243 The previous G++ debug info problem (mentioned below for the gdb-4.7
9244 release) is fixed in gcc version 2.3.2.
9246 * Improved configure script
9248 The `configure' script will now attempt to guess your system type if
9249 you don't supply a host system type. The old scheme of supplying a
9250 host system triplet is preferable over using this. All the magic is
9251 done in the new `config.guess' script. Examine it for details.
9253 We have also brought our configure script much more in line with the FSF's
9254 version. It now supports the --with-xxx options. In particular,
9255 `--with-minimal-bfd' can be used to make the GDB binary image smaller.
9256 The resulting GDB will not be able to read arbitrary object file formats --
9257 only the format ``expected'' to be used on the configured target system.
9258 We hope to make this the default in a future release.
9260 * Documentation improvements
9262 There's new internal documentation on how to modify GDB, and how to
9263 produce clean changes to the code. We implore people to read it
9264 before submitting changes.
9266 The GDB manual uses new, sexy Texinfo conditionals, rather than arcane
9267 M4 macros. The new texinfo.tex is provided in this release. Pre-built
9268 `info' files are also provided. To build `info' files from scratch,
9269 you will need the latest `makeinfo' release, which will be available in
9270 a future texinfo-X.Y release.
9272 *NOTE* The new texinfo.tex can cause old versions of TeX to hang.
9273 We're not sure exactly which versions have this problem, but it has
9274 been seen in 3.0. We highly recommend upgrading to TeX version 3.141
9275 or better. If that isn't possible, there is a patch in
9276 `texinfo/tex3patch' that will modify `texinfo/texinfo.tex' to work
9277 around this problem.
9281 GDB now supports array constants that can be used in expressions typed in by
9282 the user. The syntax is `{element, element, ...}'. Ie: you can now type
9283 `print {1, 2, 3}', and it will build up an array in memory malloc'd in
9286 The new directory `gdb/sparclite' contains a program that demonstrates
9287 how the sparc-stub.c remote stub runs on a Fujitsu SPARClite processor.
9289 * New native hosts supported
9291 HP/PA-RISC under HPUX using GNU tools hppa1.1-hp-hpux
9292 386 CPUs running SCO Unix 3.2v4 i386-unknown-sco3.2v4
9294 * New targets supported
9296 AMD 29k family via UDI a29k-amd-udi or udi29k
9298 * New file formats supported
9300 BFD now supports reading HP/PA-RISC executables (SOM file format?),
9301 HPUX core files, and SCO 3.2v2 core files.
9305 Attaching to processes now works again; thanks for the many bug reports.
9307 We have also stomped on a bunch of core dumps caused by
9308 printf_filtered("%s") problems.
9310 We eliminated a copyright problem on the rpc and ptrace header files
9311 for VxWorks, which was discovered at the last minute during the 4.7
9312 release. You should now be able to build a VxWorks GDB.
9314 You can now interrupt gdb while an attached process is running. This
9315 will cause the attached process to stop, and give control back to GDB.
9317 We fixed problems caused by using too many file descriptors
9318 for reading symbols from object files and libraries. This was
9319 especially a problem for programs that used many (~100) shared
9322 The `step' command now only enters a subroutine if there is line number
9323 information for the subroutine. Otherwise it acts like the `next'
9324 command. Previously, `step' would enter subroutines if there was
9325 any debugging information about the routine. This avoids problems
9326 when using `cc -g1' on MIPS machines.
9328 * Internal improvements
9330 GDB's internal interfaces have been improved to make it easier to support
9331 debugging of multiple languages in the future.
9333 GDB now uses a common structure for symbol information internally.
9334 Minimal symbols (derived from linkage symbols in object files), partial
9335 symbols (from a quick scan of debug information), and full symbols
9336 contain a common subset of information, making it easier to write
9337 shared code that handles any of them.
9339 * New command line options
9341 We now accept --silent as an alias for --quiet.
9345 The memory-mapped-malloc library is now licensed under the GNU Library
9346 General Public License.
9348 *** Changes in GDB-4.7:
9350 * Host/native/target split
9352 GDB has had some major internal surgery to untangle the support for
9353 hosts and remote targets. Now, when you configure GDB for a remote
9354 target, it will no longer load in all of the support for debugging
9355 local programs on the host. When fully completed and tested, this will
9356 ensure that arbitrary host/target combinations are possible.
9358 The primary conceptual shift is to separate the non-portable code in
9359 GDB into three categories. Host specific code is required any time GDB
9360 is compiled on that host, regardless of the target. Target specific
9361 code relates to the peculiarities of the target, but can be compiled on
9362 any host. Native specific code is everything else: it can only be
9363 built when the host and target are the same system. Child process
9364 handling and core file support are two common `native' examples.
9366 GDB's use of /proc for controlling Unix child processes is now cleaner.
9367 It has been split out into a single module under the `target_ops' vector,
9368 plus two native-dependent functions for each system that uses /proc.
9370 * New hosts supported
9372 HP/Apollo 68k (under the BSD domain) m68k-apollo-bsd or apollo68bsd
9373 386 CPUs running various BSD ports i386-unknown-bsd or 386bsd
9374 386 CPUs running SCO Unix i386-unknown-scosysv322 or i386sco
9376 * New targets supported
9378 Fujitsu SPARClite sparclite-fujitsu-none or sparclite
9379 68030 and CPU32 m68030-*-*, m68332-*-*
9381 * New native hosts supported
9383 386 CPUs running various BSD ports i386-unknown-bsd or 386bsd
9384 (386bsd is not well tested yet)
9385 386 CPUs running SCO Unix i386-unknown-scosysv322 or sco
9387 * New file formats supported
9389 BFD now supports COFF files for the Zilog Z8000 microprocessor. It
9390 supports reading of `a.out.adobe' object files, which are an a.out
9391 format extended with minimal information about multiple sections.
9395 `show copying' is the same as the old `info copying'.
9396 `show warranty' is the same as `info warrantee'.
9397 These were renamed for consistency. The old commands continue to work.
9399 `info handle' is a new alias for `info signals'.
9401 You can now define pre-command hooks, which attach arbitrary command
9402 scripts to any command. The commands in the hook will be executed
9403 prior to the user's command. You can also create a hook which will be
9404 executed whenever the program stops. See gdb.texinfo.
9408 We now deal with Cfront style name mangling, and can even extract type
9409 info from mangled symbols. GDB can automatically figure out which
9410 symbol mangling style your C++ compiler uses.
9412 Calling of methods and virtual functions has been improved as well.
9416 The crash that occurred when debugging Sun Ansi-C compiled binaries is
9417 fixed. This was due to mishandling of the extra N_SO stabs output
9420 We also finally got Ultrix 4.2 running in house, and fixed core file
9421 support, with help from a dozen people on the net.
9423 John M. Farrell discovered that the reason that single-stepping was so
9424 slow on all of the Mips based platforms (primarily SGI and DEC) was
9425 that we were trying to demangle and lookup a symbol used for internal
9426 purposes on every instruction that was being stepped through. Changing
9427 the name of that symbol so that it couldn't be mistaken for a C++
9428 mangled symbol sped things up a great deal.
9430 Rich Pixley sped up symbol lookups in general by getting much smarter
9431 about when C++ symbol mangling is necessary. This should make symbol
9432 completion (TAB on the command line) much faster. It's not as fast as
9433 we'd like, but it's significantly faster than gdb-4.6.
9437 A new user controllable variable 'call_scratch_address' can
9438 specify the location of a scratch area to be used when GDB
9439 calls a function in the target. This is necessary because the
9440 usual method of putting the scratch area on the stack does not work
9441 in systems that have separate instruction and data spaces.
9443 We integrated changes to support the 29k UDI (Universal Debugger
9444 Interface), but discovered at the last minute that we didn't have all
9445 of the appropriate copyright paperwork. We are working with AMD to
9446 resolve this, and hope to have it available soon.
9450 We have sped up the remote serial line protocol, especially for targets
9451 with lots of registers. It now supports a new `expedited status' ('T')
9452 message which can be used in place of the existing 'S' status message.
9453 This allows the remote stub to send only the registers that GDB
9454 needs to make a quick decision about single-stepping or conditional
9455 breakpoints, eliminating the need to fetch the entire register set for
9456 each instruction being stepped through.
9458 The GDB remote serial protocol now implements a write-through cache for
9459 registers, only re-reading the registers if the target has run.
9461 There is also a new remote serial stub for SPARC processors. You can
9462 find it in gdb-4.7/gdb/sparc-stub.c. This was written to support the
9463 Fujitsu SPARClite processor, but will run on any stand-alone SPARC
9464 processor with a serial port.
9468 Configure.in files have become much easier to read and modify. A new
9469 `table driven' format makes it more obvious what configurations are
9470 supported, and what files each one uses.
9474 There is a new opcodes library which will eventually contain all of the
9475 disassembly routines and opcode tables. At present, it only contains
9476 Sparc and Z8000 routines. This will allow the assembler, debugger, and
9477 disassembler (binutils/objdump) to share these routines.
9479 The libiberty library is now copylefted under the GNU Library General
9480 Public License. This allows more liberal use, and was done so libg++
9481 can use it. This makes no difference to GDB, since the Library License
9482 grants all the rights from the General Public License.
9486 The file gdb-4.7/gdb/doc/stabs.texinfo is a (relatively) complete
9487 reference to the stabs symbol info used by the debugger. It is (as far
9488 as we know) the only published document on this fascinating topic. We
9489 encourage you to read it, compare it to the stabs information on your
9490 system, and send improvements on the document in general (to
9491 bug-gdb@prep.ai.mit.edu).
9493 And, of course, many bugs have been fixed.
9496 *** Changes in GDB-4.6:
9498 * Better support for C++ function names
9500 GDB now accepts as input the "demangled form" of C++ overloaded function
9501 names and member function names, and can do command completion on such names
9502 (using TAB, TAB-TAB, and ESC-?). The names have to be quoted with a pair of
9503 single quotes. Examples are 'func (int, long)' and 'obj::operator==(obj&)'.
9504 Make use of command completion, it is your friend.
9506 GDB also now accepts a variety of C++ mangled symbol formats. They are
9507 the GNU g++ style, the Cfront (ARM) style, and the Lucid (lcc) style.
9508 You can tell GDB which format to use by doing a 'set demangle-style {gnu,
9509 lucid, cfront, auto}'. 'gnu' is the default. Do a 'set demangle-style foo'
9510 for the list of formats.
9512 * G++ symbol mangling problem
9514 Recent versions of gcc have a bug in how they emit debugging information for
9515 C++ methods (when using dbx-style stabs). The file 'gcc.patch' (in this
9516 directory) can be applied to gcc to fix the problem. Alternatively, if you
9517 can't fix gcc, you can #define GCC_MANGLE_BUG when compiling gdb/symtab.c. The
9518 usual symptom is difficulty with setting breakpoints on methods. GDB complains
9519 about the method being non-existent. (We believe that version 2.2.2 of GCC has
9522 * New 'maintenance' command
9524 All of the commands related to hacking GDB internals have been moved out of
9525 the main command set, and now live behind the 'maintenance' command. This
9526 can also be abbreviated as 'mt'. The following changes were made:
9528 dump-me -> maintenance dump-me
9529 info all-breakpoints -> maintenance info breakpoints
9530 printmsyms -> maintenance print msyms
9531 printobjfiles -> maintenance print objfiles
9532 printpsyms -> maintenance print psymbols
9533 printsyms -> maintenance print symbols
9535 The following commands are new:
9537 maintenance demangle Call internal GDB demangler routine to
9538 demangle a C++ link name and prints the result.
9539 maintenance print type Print a type chain for a given symbol
9541 * Change to .gdbinit file processing
9543 We now read the $HOME/.gdbinit file before processing the argv arguments
9544 (e.g. reading symbol files or core files). This allows global parameters to
9545 be set, which will apply during the symbol reading. The ./.gdbinit is still
9546 read after argv processing.
9548 * New hosts supported
9550 Solaris-2.0 !!! sparc-sun-solaris2 or sun4sol2
9552 GNU/Linux support i386-unknown-linux or linux
9554 We are also including code to support the HP/PA running BSD and HPUX. This
9555 is almost guaranteed not to work, as we didn't have time to test or build it
9556 for this release. We are including it so that the more adventurous (or
9557 masochistic) of you can play with it. We also had major problems with the
9558 fact that the compiler that we got from HP doesn't support the -g option.
9561 * New targets supported
9563 Hitachi H8/300 h8300-hitachi-hms or h8300hms
9565 * More smarts about finding #include files
9567 GDB now remembers the compilation directory for all include files, and for
9568 all files from which C is generated (like yacc and lex sources). This
9569 greatly improves GDB's ability to find yacc/lex sources, and include files,
9570 especially if you are debugging your program from a directory different from
9571 the one that contains your sources.
9573 We also fixed a bug which caused difficulty with listing and setting
9574 breakpoints in include files which contain C code. (In the past, you had to
9575 try twice in order to list an include file that you hadn't looked at before.)
9577 * Interesting infernals change
9579 GDB now deals with arbitrary numbers of sections, where the symbols for each
9580 section must be relocated relative to that section's landing place in the
9581 target's address space. This work was needed to support ELF with embedded
9582 stabs used by Solaris-2.0.
9584 * Bug fixes (of course!)
9586 There have been loads of fixes for the following things:
9587 mips, rs6000, 29k/udi, m68k, g++, type handling, elf/dwarf, m88k,
9588 i960, stabs, DOS(GO32), procfs, etc...
9590 See the ChangeLog for details.
9592 *** Changes in GDB-4.5:
9594 * New machines supported (host and target)
9596 IBM RS6000 running AIX rs6000-ibm-aix or rs6000
9598 SGI Irix-4.x mips-sgi-irix4 or iris4
9600 * New malloc package
9602 GDB now uses a new memory manager called mmalloc, based on gmalloc.
9603 Mmalloc is capable of handling multiple heaps of memory. It is also
9604 capable of saving a heap to a file, and then mapping it back in later.
9605 This can be used to greatly speedup the startup of GDB by using a
9606 pre-parsed symbol table which lives in a mmalloc managed heap. For
9607 more details, please read mmalloc/mmalloc.texi.
9611 The 'info proc' command (SVR4 only) has been enhanced quite a bit. See
9612 'help info proc' for details.
9614 * MIPS ecoff symbol table format
9616 The code that reads MIPS symbol table format is now supported on all hosts.
9617 Thanks to MIPS for releasing the sym.h and symconst.h files to make this
9620 * File name changes for MS-DOS
9622 Many files in the config directories have been renamed to make it easier to
9623 support GDB on MS-DOSe systems (which have very restrictive file name
9624 conventions :-( ). MS-DOSe host support (under DJ Delorie's GO32
9625 environment) is close to working but has some remaining problems. Note
9626 that debugging of DOS programs is not supported, due to limitations
9627 in the ``operating system'', but it can be used to host cross-debugging.
9629 * Cross byte order fixes
9631 Many fixes have been made to support cross debugging of Sparc and MIPS
9632 targets from hosts whose byte order differs.
9634 * New -mapped and -readnow options
9636 If memory-mapped files are available on your system through the 'mmap'
9637 system call, you can use the -mapped option on the `file' or
9638 `symbol-file' commands to cause GDB to write the symbols from your
9639 program into a reusable file. If the program you are debugging is
9640 called `/path/fred', the mapped symbol file will be `./fred.syms'.
9641 Future GDB debugging sessions will notice the presence of this file,
9642 and will quickly map in symbol information from it, rather than reading
9643 the symbol table from the executable program. Using the '-mapped'
9644 option in a GDB `file' or `symbol-file' command has the same effect as
9645 starting GDB with the '-mapped' command-line option.
9647 You can cause GDB to read the entire symbol table immediately by using
9648 the '-readnow' option with any of the commands that load symbol table
9649 information (or on the GDB command line). This makes the command
9650 slower, but makes future operations faster.
9652 The -mapped and -readnow options are typically combined in order to
9653 build a `fred.syms' file that contains complete symbol information.
9654 A simple GDB invocation to do nothing but build a `.syms' file for future
9657 gdb -batch -nx -mapped -readnow programname
9659 The `.syms' file is specific to the host machine on which GDB is run.
9660 It holds an exact image of GDB's internal symbol table. It cannot be
9661 shared across multiple host platforms.
9663 * longjmp() handling
9665 GDB is now capable of stepping and nexting over longjmp(), _longjmp(), and
9666 siglongjmp() without losing control. This feature has not yet been ported to
9667 all systems. It currently works on many 386 platforms, all MIPS-based
9668 platforms (SGI, DECstation, etc), and Sun3/4.
9672 Preliminary work has been put in to support the new Solaris OS from Sun. At
9673 this time, it can control and debug processes, but it is not capable of
9678 As always, many many bug fixes. The major areas were with g++, and mipsread.
9679 People using the MIPS-based platforms should experience fewer mysterious
9680 crashes and trashed symbol tables.
9682 *** Changes in GDB-4.4:
9684 * New machines supported (host and target)
9686 SCO Unix on i386 IBM PC clones i386-sco-sysv or i386sco
9688 BSD Reno on Vax vax-dec-bsd
9689 Ultrix on Vax vax-dec-ultrix
9691 * New machines supported (target)
9693 AMD 29000 embedded, using EBMON a29k-none-none
9697 GDB continues to improve its handling of C++. `References' work better.
9698 The demangler has also been improved, and now deals with symbols mangled as
9699 per the Annotated C++ Reference Guide.
9701 GDB also now handles `stabs' symbol information embedded in MIPS
9702 `ecoff' symbol tables. Since the ecoff format was not easily
9703 extensible to handle new languages such as C++, this appeared to be a
9704 good way to put C++ debugging info into MIPS binaries. This option
9705 will be supported in the GNU C compiler, version 2, when it is
9708 * New features for SVR4
9710 GDB now handles SVR4 shared libraries, in the same fashion as SunOS
9711 shared libraries. Debugging dynamically linked programs should present
9712 only minor differences from debugging statically linked programs.
9714 The `info proc' command will print out information about any process
9715 on an SVR4 system (including the one you are debugging). At the moment,
9716 it prints the address mappings of the process.
9718 If you bring up GDB on another SVR4 system, please send mail to
9719 bug-gdb@prep.ai.mit.edu to let us know what changes were required (if any).
9721 * Better dynamic linking support in SunOS
9723 Reading symbols from shared libraries which contain debugging symbols
9724 now works properly. However, there remain issues such as automatic
9725 skipping of `transfer vector' code during function calls, which
9726 make it harder to debug code in a shared library, than to debug the
9727 same code linked statically.
9731 GDB is now using the latest `getopt' routines from the FSF. This
9732 version accepts the -- prefix for options with long names. GDB will
9733 continue to accept the old forms (-option and +option) as well.
9734 Various single letter abbreviations for options have been explicitly
9735 added to the option table so that they won't get overshadowed in the
9736 future by other options that begin with the same letter.
9740 The `cleanup_undefined_types' bug that many of you noticed has been squashed.
9741 Many assorted bugs have been handled. Many more remain to be handled.
9742 See the various ChangeLog files (primarily in gdb and bfd) for details.
9745 *** Changes in GDB-4.3:
9747 * New machines supported (host and target)
9749 Amiga 3000 running Amix m68k-cbm-svr4 or amix
9750 NCR 3000 386 running SVR4 i386-ncr-svr4 or ncr3000
9751 Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
9753 * Almost SCO Unix support
9755 We had hoped to support:
9756 SCO Unix on i386 IBM PC clones i386-sco-sysv or i386sco
9757 (except for core file support), but we discovered very late in the release
9758 that it has problems with process groups that render gdb unusable. Sorry
9759 about that. I encourage people to fix it and post the fixes.
9761 * Preliminary ELF and DWARF support
9763 GDB can read ELF object files on System V Release 4, and can handle
9764 debugging records for C, in DWARF format, in ELF files. This support
9765 is preliminary. If you bring up GDB on another SVR4 system, please
9766 send mail to bug-gdb@prep.ai.mit.edu to let us know what changes were
9771 GDB now uses the latest `readline' library. One user-visible change
9772 is that two tabs will list possible command completions, which previously
9773 required typing M-? (meta-question mark, or ESC ?).
9777 The `stepi' bug that many of you noticed has been squashed.
9778 Many bugs in C++ have been handled. Many more remain to be handled.
9779 See the various ChangeLog files (primarily in gdb and bfd) for details.
9781 * State of the MIPS world (in case you wondered):
9783 GDB can understand the symbol tables emitted by the compilers
9784 supplied by most vendors of MIPS-based machines, including DEC. These
9785 symbol tables are in a format that essentially nobody else uses.
9787 Some versions of gcc come with an assembler post-processor called
9788 mips-tfile. This program is required if you want to do source-level
9789 debugging of gcc-compiled programs. I believe FSF does not ship
9790 mips-tfile with gcc version 1, but it will eventually come with gcc
9793 Debugging of g++ output remains a problem. g++ version 1.xx does not
9794 really support it at all. (If you're lucky, you should be able to get
9795 line numbers and stack traces to work, but no parameters or local
9796 variables.) With some work it should be possible to improve the
9799 When gcc version 2 is released, you will have somewhat better luck.
9800 However, even then you will get confusing results for inheritance and
9803 We will eventually provide full debugging of g++ output on
9804 DECstations. This will probably involve some kind of stabs-in-ecoff
9805 encapulation, but the details have not been worked out yet.
9808 *** Changes in GDB-4.2:
9810 * Improved configuration
9812 Only one copy of `configure' exists now, and it is not self-modifying.
9813 Porting BFD is simpler.
9817 The `step' and `next' commands now only stop at the first instruction
9818 of a source line. This prevents the multiple stops that used to occur
9819 in switch statements, for-loops, etc. `Step' continues to stop if a
9820 function that has debugging information is called within the line.
9824 Lots of small bugs fixed. More remain.
9826 * New host supported (not target)
9828 Intel 386 PC clone running Mach i386-none-mach
9831 *** Changes in GDB-4.1:
9833 * Multiple source language support
9835 GDB now has internal scaffolding to handle several source languages.
9836 It determines the type of each source file from its filename extension,
9837 and will switch expression parsing and number formatting to match the
9838 language of the function in the currently selected stack frame.
9839 You can also specifically set the language to be used, with
9840 `set language c' or `set language modula-2'.
9844 GDB now has preliminary support for the GNU Modula-2 compiler,
9845 currently under development at the State University of New York at
9846 Buffalo. Development of both GDB and the GNU Modula-2 compiler will
9847 continue through the fall of 1991 and into 1992.
9849 Other Modula-2 compilers are currently not supported, and attempting to
9850 debug programs compiled with them will likely result in an error as the
9851 symbol table is read. Feel free to work on it, though!
9853 There are hooks in GDB for strict type checking and range checking,
9854 in the `Modula-2 philosophy', but they do not currently work.
9858 GDB can now write to executable and core files (e.g. patch
9859 a variable's value). You must turn this switch on, specify
9860 the file ("exec foo" or "core foo"), *then* modify it, e.g.
9861 by assigning a new value to a variable. Modifications take
9864 * Automatic SunOS shared library reading
9866 When you run your program, GDB automatically determines where its
9867 shared libraries (if any) have been loaded, and reads their symbols.
9868 The `share' command is no longer needed. This also works when
9869 examining core files.
9873 You can specify the number of lines that the `list' command shows.
9876 * New machines supported (host and target)
9878 SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris
9879 Sony NEWS (68K) running NEWSOS 3.x: m68k-sony-sysv or news
9880 Ultracomputer (29K) running Sym1: a29k-nyu-sym1 or ultra3
9882 * New hosts supported (not targets)
9884 IBM RT/PC: romp-ibm-aix or rtpc
9886 * New targets supported (not hosts)
9888 AMD 29000 embedded with COFF a29k-none-coff
9889 AMD 29000 embedded with a.out a29k-none-aout
9890 Ultracomputer remote kernel debug a29k-nyu-kern
9892 * New remote interfaces
9898 *** Changes in GDB-4.0:
9902 Wide output is wrapped at good places to make the output more readable.
9904 Gdb now supports cross-debugging from a host machine of one type to a
9905 target machine of another type. Communication with the target system
9906 is over serial lines. The ``target'' command handles connecting to the
9907 remote system; the ``load'' command will download a program into the
9908 remote system. Serial stubs for the m68k and i386 are provided. Gdb
9909 also supports debugging of realtime processes running under VxWorks,
9910 using SunRPC Remote Procedure Calls over TCP/IP to talk to a debugger
9911 stub on the target system.
9913 New CPUs supported include the AMD 29000 and Intel 960.
9915 GDB now reads object files and symbol tables via a ``binary file''
9916 library, which allows a single copy of GDB to debug programs of multiple
9917 object file types such as a.out and coff.
9919 There is now a GDB reference card in "doc/refcard.tex". (Make targets
9920 refcard.dvi and refcard.ps are available to format it).
9923 * Control-Variable user interface simplified
9925 All variables that control the operation of the debugger can be set
9926 by the ``set'' command, and displayed by the ``show'' command.
9928 For example, ``set prompt new-gdb=>'' will change your prompt to new-gdb=>.
9929 ``Show prompt'' produces the response:
9930 Gdb's prompt is new-gdb=>.
9932 What follows are the NEW set commands. The command ``help set'' will
9933 print a complete list of old and new set commands. ``help set FOO''
9934 will give a longer description of the variable FOO. ``show'' will show
9935 all of the variable descriptions and their current settings.
9937 confirm on/off: Enables warning questions for operations that are
9938 hard to recover from, e.g. rerunning the program while
9939 it is already running. Default is ON.
9941 editing on/off: Enables EMACS style command line editing
9942 of input. Previous lines can be recalled with
9943 control-P, the current line can be edited with control-B,
9944 you can search for commands with control-R, etc.
9947 history filename NAME: NAME is where the gdb command history
9948 will be stored. The default is .gdb_history,
9949 or the value of the environment variable
9952 history size N: The size, in commands, of the command history. The
9953 default is 256, or the value of the environment variable
9956 history save on/off: If this value is set to ON, the history file will
9957 be saved after exiting gdb. If set to OFF, the
9958 file will not be saved. The default is OFF.
9960 history expansion on/off: If this value is set to ON, then csh-like
9961 history expansion will be performed on
9962 command line input. The default is OFF.
9964 radix N: Sets the default radix for input and output. It can be set
9965 to 8, 10, or 16. Note that the argument to "radix" is interpreted
9966 in the current radix, so "set radix 10" is always a no-op.
9968 height N: This integer value is the number of lines on a page. Default
9969 is 24, the current `stty rows'' setting, or the ``li#''
9970 setting from the termcap entry matching the environment
9973 width N: This integer value is the number of characters on a line.
9974 Default is 80, the current `stty cols'' setting, or the ``co#''
9975 setting from the termcap entry matching the environment
9978 Note: ``set screensize'' is obsolete. Use ``set height'' and
9979 ``set width'' instead.
9981 print address on/off: Print memory addresses in various command displays,
9982 such as stack traces and structure values. Gdb looks
9983 more ``symbolic'' if you turn this off; it looks more
9984 ``machine level'' with it on. Default is ON.
9986 print array on/off: Prettyprint arrays. New convenient format! Default
9989 print demangle on/off: Print C++ symbols in "source" form if on,
9992 print asm-demangle on/off: Same, for assembler level printouts
9995 print vtbl on/off: Prettyprint C++ virtual function tables. Default is OFF.
9998 * Support for Epoch Environment.
10000 The epoch environment is a version of Emacs v18 with windowing. One
10001 new command, ``inspect'', is identical to ``print'', except that if you
10002 are running in the epoch environment, the value is printed in its own
10006 * Support for Shared Libraries
10008 GDB can now debug programs and core files that use SunOS shared libraries.
10009 Symbols from a shared library cannot be referenced
10010 before the shared library has been linked with the program (this
10011 happens after you type ``run'' and before the function main() is entered).
10012 At any time after this linking (including when examining core files
10013 from dynamically linked programs), gdb reads the symbols from each
10014 shared library when you type the ``sharedlibrary'' command.
10015 It can be abbreviated ``share''.
10017 sharedlibrary REGEXP: Load shared object library symbols for files
10018 matching a unix regular expression. No argument
10019 indicates to load symbols for all shared libraries.
10021 info sharedlibrary: Status of loaded shared libraries.
10026 A watchpoint stops execution of a program whenever the value of an
10027 expression changes. Checking for this slows down execution
10028 tremendously whenever you are in the scope of the expression, but is
10029 quite useful for catching tough ``bit-spreader'' or pointer misuse
10030 problems. Some machines such as the 386 have hardware for doing this
10031 more quickly, and future versions of gdb will use this hardware.
10033 watch EXP: Set a watchpoint (breakpoint) for an expression.
10035 info watchpoints: Information about your watchpoints.
10037 delete N: Deletes watchpoint number N (same as breakpoints).
10038 disable N: Temporarily turns off watchpoint number N (same as breakpoints).
10039 enable N: Re-enables watchpoint number N (same as breakpoints).
10042 * C++ multiple inheritance
10044 When used with a GCC version 2 compiler, GDB supports multiple inheritance
10047 * C++ exception handling
10049 Gdb now supports limited C++ exception handling. Besides the existing
10050 ability to breakpoint on an exception handler, gdb can breakpoint on
10051 the raising of an exception (before the stack is peeled back to the
10052 handler's context).
10054 catch FOO: If there is a FOO exception handler in the dynamic scope,
10055 set a breakpoint to catch exceptions which may be raised there.
10056 Multiple exceptions (``catch foo bar baz'') may be caught.
10058 info catch: Lists all exceptions which may be caught in the
10059 current stack frame.
10062 * Minor command changes
10064 The command ``call func (arg, arg, ...)'' now acts like the print
10065 command, except it does not print or save a value if the function's result
10066 is void. This is similar to dbx usage.
10068 The ``up'' and ``down'' commands now always print the frame they end up
10069 at; ``up-silently'' and `down-silently'' can be used in scripts to change
10070 frames without printing.
10072 * New directory command
10074 'dir' now adds directories to the FRONT of the source search path.
10075 The path starts off empty. Source files that contain debug information
10076 about the directory in which they were compiled can be found even
10077 with an empty path; Sun CC and GCC include this information. If GDB can't
10078 find your source file in the current directory, type "dir .".
10080 * Configuring GDB for compilation
10082 For normal use, type ``./configure host''. See README or gdb.texinfo
10085 GDB now handles cross debugging. If you are remotely debugging between
10086 two different machines, type ``./configure host -target=targ''.
10087 Host is the machine where GDB will run; targ is the machine
10088 where the program that you are debugging will run.