1 What has changed in GDB?
2 (Organized release by release)
4 *** Changes since GDB 14
6 * Building GDB and GDBserver now requires a C++17 compiler.
7 For example, GCC 9 or later.
9 * GDB index now contains information about the main function. This speeds up
10 startup when it is being used for some large binaries.
12 * On hosts where threading is available, DWARF reading is now done in
13 the background, resulting in faster startup. This can be controlled
14 using "maint set dwarf synchronous".
19 Attempting to use both the 'r' and 'b' flags with the disassemble
20 command will now give an error. Previously the 'b' flag would
21 always override the 'r' flag.
23 maintenance info line-table
24 Add an EPILOGUE-BEGIN column to the output of the command. It indicates
25 if the line is considered the start of the epilgoue, and thus a point at
26 which the frame can be considered destroyed.
30 info missing-debug-handler
31 List all the registered missing debug handlers.
33 enable missing-debug-handler LOCUS HANDLER
34 disable missing-debug-handler LOCUS HANDLER
35 Enable or disable a missing debug handler with a name matching the
36 regular expression HANDLER, in LOCUS.
38 LOCUS can be 'global' to operate on global missing debug handler,
39 'progspace' to operate on handlers within the current program space,
40 or can be a regular expression which is matched against the filename
41 of the primary executable in each program space.
43 maintenance info linux-lwps
44 List all LWPs under control of the linux-nat target.
46 set remote thread-options-packet
47 show remote thread-options-packet
48 Set/show the use of the thread options packet.
50 * New features in the GDB remote stub, GDBserver
52 ** The --remote-debug and --event-loop-debug command line options
55 ** The --debug command line option now takes an optional comma
56 separated list of components to emit debug for. The currently
57 supported components are: all, threads, event-loop, and remote.
58 If no components are given then threads is assumed.
60 ** The 'monitor set remote-debug' and 'monitor set event-loop-debug'
61 command have been removed.
63 ** The 'monitor set debug 0|1' command has been extended to take a
64 component name, e.g.: 'monitor set debug COMPONENT off|on'.
65 Possible component names are: all, threads, event-loop, and
70 ** New function gdb.notify_mi(NAME, DATA), that emits custom
71 GDB/MI async notification.
73 ** New read/write attribute gdb.Value.bytes that contains a bytes
74 object holding the contents of this value.
76 ** New module gdb.missing_debug that facilitates dealing with
77 objfiles that are missing any debug information.
79 ** New function gdb.missing_debug.register_handler that can register
80 an instance of a sub-class of gdb.missing_debug.MissingDebugInfo
81 as a handler for objfiles that are missing debug information.
83 ** New class gdb.missing_debug.MissingDebugInfo which can be
84 sub-classed to create handlers for objfiles with missing debug
87 ** Stop events now have a "details" attribute that holds a
88 dictionary that carries the same information as an MI "*stopped"
91 ** New function gdb.interrupt(), that interrupts GDB as if the user
94 ** New gdb.InferiorThread.ptid_string attribute. This read-only
95 attribute contains the string that appears in the 'Target Id'
96 column of the 'info threads' command output.
98 ** It is no longer possible to create new gdb.Progspace object using
99 'gdb.Progspace()', this will result in a TypeError. Progspace
100 objects can still be obtained through calling other API
101 functions, for example 'gdb.current_progspace()'.
103 ** User defined attributes can be added to a gdb.Inferior object,
104 these will be stored in the object's new Inferior.__dict__
107 ** User defined attributes can be added to a gdb.InferiorThread
108 object, these will be stored in the object's new
109 InferiorThread.__dict__ attribute.
111 * Debugger Adapter Protocol changes
113 ** GDB now emits the "process" event.
115 ** GDB now supports the "cancel" request.
117 ** The "attach" request now supports specifying the program.
119 ** New command "set debug dap-log-level" controls DAP logging.
121 ** The "set debug dap-log-file" command is now documented. This
122 command was available in GDB 14 but not documented.
126 New stop reason: clone
127 Indicates that a clone system call was executed.
130 Enable/disable optional event reporting, on a per-thread basis.
131 Currently supported options are GDB_THREAD_OPTION_CLONE, to enable
132 clone event reporting, and GDB_THREAD_OPTION_EXIT to enable thread
133 exit event reporting.
135 QThreadOptions in qSupported
136 The qSupported packet allows GDB to inform the stub it supports the
137 QThreadOptions packet, and the qSupported response can contain the
138 set of thread options the remote stub supports.
140 *** Changes in GDB 14
142 * GDB now supports the AArch64 Scalable Matrix Extension 2 (SME2), which
143 includes a new 512 bit lookup table register named ZT0.
145 * GDB now supports the AArch64 Scalable Matrix Extension (SME), which includes
146 a new matrix register named ZA, a new thread register TPIDR2 and a new vector
147 length register SVG (streaming vector granule). GDB also supports tracking
148 ZA state across signal frames.
150 Some features are still under development or are dependent on ABI specs that
151 are still in alpha stage. For example, manual function calls with ZA state
152 don't have any special handling, and tracking of SVG changes based on
153 DWARF information is still not implemented, but there are plans to do so in
156 * GDB now recognizes the NO_COLOR environment variable and disables
157 styling according to the spec. See https://no-color.org/.
158 Styling can be re-enabled with "set style enabled on".
160 * The AArch64 'org.gnu.gdb.aarch64.pauth' Pointer Authentication feature string
161 has been deprecated in favor of the 'org.gnu.gdb.aarch64.pauth_v2' feature
164 * GDB now has some support for integer types larger than 64 bits.
166 * Removed targets and native configurations
168 GDB no longer supports AIX 4.x, AIX 5.x and AIX 6.x. The minimum supported
169 AIX version is now AIX 7.1.
171 * Multi-target feature configuration
173 GDB now supports the individual configuration of remote targets' feature
174 sets. Based on the current selection of a target, the commands 'set remote
175 <name>-packet (on|off|auto)' and 'show remote <name>-packet' can be used to
176 configure a target's feature packet and to display its configuration,
179 The individual packet sizes can be configured and shown using the commands
180 ** 'set remote memory-read-packet-size (number of bytes|fixed|limit)'
181 ** 'set remote memory-write-packet-size (number of bytes|fixed|limit)'
182 ** 'show remote memory-read-packet-size'
183 ** 'show remote memory-write-packet-size'.
185 The configuration of the packet itself, as well as the size of a memory-read
186 or memory-write packet applies to the currently selected target (if
187 available). If no target is selected, it applies to future remote
188 connections. Similarly, the show commands print the configuration of the
189 currently selected target. If no remote target is selected, the default
190 configuration for future connections is shown.
192 * GDB has initial built-in support for the Debugger Adapter Protocol.
193 This support requires that GDB be built with Python scripting
196 * For the break command, multiple uses of the 'thread' or 'task'
197 keywords will now give an error instead of just using the thread or
198 task id from the last instance of the keyword. E.g.:
199 break foo thread 1 thread 2
200 will now give an error rather than using 'thread 2'.
202 * For the watch command, multiple uses of the 'task' keyword will now
203 give an error instead of just using the task id from the last
204 instance of the keyword. E.g.:
205 watch my_var task 1 task 2
206 will now give an error rather than using 'task 2'. The 'thread'
207 keyword already gave an error when used multiple times with the
208 watch command, this remains unchanged.
210 * The 'set print elements' setting now helps when printing large arrays.
211 If an array would otherwise exceed max-value-size, but 'print elements'
212 is set such that the size of elements to print is less than or equal
213 to 'max-value-size', GDB will now still print the array, however only
214 'max-value-size' worth of data will be added into the value history.
216 * For both the break and watch commands, it is now invalid to use both
217 the 'thread' and 'task' keywords within the same command. For
218 example the following commnds will now give an error:
219 break foo thread 1 task 1
220 watch var thread 2 task 3
222 * The printf command now accepts a '%V' output format which will
223 format an expression just as the 'print' command would. Print
224 options can be placed withing '[...]' after the '%V' to modify how
225 the value is printed. E.g:
226 printf "%V", some_array
227 printf "%V[-array-indexes on]", some_array
228 will print the array without, or with array indexes included, just
229 as the array would be printed by the 'print' command. This
230 functionality is also available for dprintf when dprintf-style is
233 * When the printf command requires a string to be fetched from the
234 inferior, GDB now uses the existing 'max-value-size' setting to the
235 limit the memory allocated within GDB. The default 'max-value-size'
236 is 64k. To print longer strings you should increase
239 * The Ada 2022 Enum_Rep and Enum_Val attributes are now supported.
241 * The Ada 2022 target name symbol ('@') is now supported by the Ada
244 * The 'list' command now accepts '.' as an argument, which tells GDB to
245 print the location around the point of execution within the current frame.
246 If the inferior hasn't started yet, the command will print around the
247 beginning of the 'main' function.
249 * Using the 'list' command with no arguments in a situation where the
250 command would attempt to list past the end of the file now warns the
251 user that the end of file has been reached, refers the user to the
252 newly added '.' argument
254 * Breakpoints can now be inferior-specific. This is similar to the
255 existing thread-specific breakpoint support. Breakpoint conditions
256 can include the 'inferior' keyword followed by an inferior id (as
257 displayed in the 'info inferiors' output). It is invalid to use the
258 'inferior' keyword with either the 'thread' or 'task' keywords when
259 creating a breakpoint.
261 * New convenience function "$_shell", to execute a shell command and
262 return the result. This lets you run shell commands in expressions.
265 (gdb) p $_shell("true")
267 (gdb) p $_shell("false")
269 (gdb) break func if $_shell("some command") == 0
273 --additional-debug-dirs=PATHs
275 Provide a colon-separated list of additional directories to search for
276 separate debug info. These directories are added to the default value of
277 the 'debug-file-directory' GDB parameter.
281 set debug breakpoint on|off
282 show debug breakpoint
283 Print additional debug messages about breakpoint insertion and removal.
285 maintenance print record-instruction [ N ]
286 Print the recorded information for a given instruction. If N is not given
287 prints how GDB would undo the last instruction executed. If N is negative,
288 prints how GDB would undo the N-th previous instruction, and if N is
289 positive, it prints how GDB will redo the N-th following instruction.
291 maintenance info frame-unwinders
292 List the frame unwinders currently in effect, starting with the highest
295 maintenance wait-for-index-cache
296 Wait until all pending writes to the index cache have completed.
298 set always-read-ctf on|off
300 When off, CTF is only read if DWARF is not present. When on, CTF is
301 read regardless of whether DWARF is present. Off by default.
304 Get main symbol to identify entry point into program.
306 set tui mouse-events [on|off]
307 show tui mouse-events
308 When on (default), mouse clicks control the TUI and can be accessed by
309 Python extensions. When off, mouse clicks are handled by the terminal,
310 enabling terminal-native text selection.
314 ** MI version 1 has been removed.
316 ** mi now reports 'no-history' as a stop reason when hitting the end of the
317 reverse execution history.
319 ** When creating a thread-specific breakpoint using the '-p' option,
320 the -break-insert command would report the 'thread' field twice in
321 the reply. The content of both fields was always identical. This
322 has now been fixed; the 'thread' field will be reported just once
323 for thread-specific breakpoints, or not at all for breakpoints
324 without a thread restriction. The same is also true for the 'task'
325 field of an Ada task-specific breakpoint.
327 ** It is no longer possible to create a thread-specific breakpoint for
328 a thread that doesn't exist using '-break-insert -p ID'. Creating
329 breakpoints for non-existent threads is not allowed when using the
330 CLI, that the MI allowed it was a long standing bug, which has now
333 ** The '--simple-values' argument to the '-stack-list-arguments',
334 '-stack-list-locals', '-stack-list-variables', and '-var-list-children'
335 commands now takes reference types into account: that is, a value is now
336 considered simple if it is neither an array, structure, or union, nor a
337 reference to an array, structure, or union. (Previously all references were
338 considered simple.) Support for this feature can be verified by using the
339 '-list-features' command, which should contain "simple-values-ref-types".
341 ** The -break-insert command now accepts a '-g thread-group-id' option
342 to allow for the creation of inferior-specific breakpoints.
344 ** The bkpt tuple, which appears in breakpoint-created notifications,
345 and in the result of the -break-insert command can now include an
346 optional 'inferior' field for both the main breakpoint, and each
347 location, when the breakpoint is inferior-specific.
351 ** gdb.ThreadExitedEvent added. Emits a ThreadEvent.
353 ** The gdb.unwinder.Unwinder.name attribute is now read-only.
355 ** The name argument passed to gdb.unwinder.Unwinder.__init__ must
356 now be of type 'str' otherwise a TypeError will be raised.
358 ** The gdb.unwinder.Unwinder.enabled attribute can now only accept
359 values of type 'bool'. Changing this attribute will now
360 invalidate GDB's frame-cache, which means GDB will need to
361 rebuild its frame-cache when next required - either with, or
362 without the particular unwinder, depending on how 'enabled' was
365 ** New methods added to the gdb.PendingFrame class. These methods
366 have the same behaviour as the corresponding methods on
367 gdb.Frame. The new methods are:
369 - gdb.PendingFrame.name: Return the name for the frame's
371 - gdb.PendingFrame.is_valid: Return True if the pending frame
373 - gdb.PendingFrame.pc: Return the $pc register value for this
375 - gdb.PendingFrame.language: Return a string containing the
376 language for this frame, or None.
377 - gdb.PendingFrame.find_sal: Return a gdb.Symtab_and_line
378 object for the current location within the pending frame, or
380 - gdb.PendingFrame.block: Return a gdb.Block for the current
381 pending frame, or None.
382 - gdb.PendingFrame.function: Return a gdb.Symbol for the
383 current pending frame, or None.
385 ** The frame-id passed to gdb.PendingFrame.create_unwind_info can
386 now use either an integer or a gdb.Value object for each of its
387 'sp', 'pc', and 'special' attributes.
389 ** A new class gdb.unwinder.FrameId has been added. Instances of
390 this class are constructed with 'sp' (stack-pointer) and 'pc'
391 (program-counter) values, and can be used as the frame-id when
392 calling gdb.PendingFrame.create_unwind_info.
394 ** It is now no longer possible to sub-class the
395 gdb.disassembler.DisassemblerResult type.
397 ** The Disassembler API from the gdb.disassembler module has been
398 extended to include styling support:
400 - The DisassemblerResult class can now be initialized with a list
401 of parts. Each part represents part of the disassembled
402 instruction along with the associated style information. This
403 list of parts can be accessed with the new
404 DisassemblerResult.parts property.
406 - New constants gdb.disassembler.STYLE_* representing all the
407 different styles part of an instruction might have.
409 - New methods DisassembleInfo.text_part and
410 DisassembleInfo.address_part which are used to create the new
411 styled parts of a disassembled instruction.
413 - Changes are backwards compatible, the older API can still be
414 used to disassemble instructions without styling.
416 ** New function gdb.execute_mi(COMMAND, [ARG]...), that invokes a
417 GDB/MI command and returns the output as a Python dictionary.
419 ** New function gdb.block_signals(). This returns a context manager
420 that blocks any signals that GDB needs to handle itself.
422 ** New class gdb.Thread. This is a subclass of threading.Thread
423 that calls gdb.block_signals in its "start" method.
425 ** gdb.parse_and_eval now has a new "global_context" parameter.
426 This can be used to request that the parse only examine global
429 ** gdb.Inferior now has a new "arguments" attribute. This holds the
430 command-line arguments to the inferior, if known.
432 ** gdb.Inferior now has a new "main_name" attribute. This holds the
433 name of the inferior's "main", if known.
435 ** gdb.Inferior now has new methods "clear_env", "set_env", and
436 "unset_env". These can be used to modify the inferior's
437 environment before it is started.
439 ** gdb.Value now has the 'assign' method.
441 ** gdb.Value now has the 'to_array' method. This converts an
442 array-like Value to an array.
444 ** gdb.Progspace now has the new method "objfile_for_address". This
445 returns the gdb.Objfile, if any, that covers a given address.
447 ** gdb.Breakpoint now has an "inferior" attribute. If the
448 Breakpoint object is inferior specific then this attribute holds
449 the inferior-id (an integer). If the Breakpoint object is not
450 inferior specific, then this field contains None. This field can
453 ** gdb.Type now has the "is_array_like" and "is_string_like"
454 methods. These reflect GDB's internal idea of whether a type
455 might be array- or string-like, even if they do not have the
456 corresponding type code.
458 ** gdb.ValuePrinter is a new class that can be used as the base
459 class for the result of applying a pretty-printer. As a base
460 class, it signals to gdb that the printer may implement new
461 pretty-printer methods.
463 ** New attribute Progspace.symbol_file. This attribute holds the
464 gdb.Objfile that corresponds to Progspace.filename (when
465 Progspace.filename is not None), otherwise, this attribute is
468 ** New attribute Progspace.executable_filename. This attribute
469 holds a string containing a file name set by the "exec-file" or
470 "file" commands, or None if no executable file is set. This
471 isn't the exact string passed by the user to these commands; the
472 file name will have been partially resolved to an absolute file
475 ** A new executable_changed event registry is available. This event
476 emits ExecutableChangedEvent objects, which have 'progspace' (a
477 gdb.Progspace) and 'reload' (a Boolean) attributes. This event
478 is emitted when gdb.Progspace.executable_filename changes.
480 ** New event registries gdb.events.new_progspace and
481 gdb.events.free_progspace, these emit NewProgspaceEvent and
482 FreeProgspaceEvent event types respectively. Both of these event
483 types have a single 'progspace' attribute, which is the
484 gdb.Progspace that is either being added to GDB, or removed from
487 ** gdb.LazyString now implements the __str__ method.
489 ** New method gdb.Frame.static_link that returns the outer frame
490 of a nested function frame.
492 *** Changes in GDB 13
494 * MI version 1 is deprecated, and will be removed in GDB 14.
496 * GDB now supports dumping memory tag data for AArch64 MTE. It also supports
497 reading memory tag data for AArch64 MTE from core files generated by
498 the gcore command or the Linux kernel.
500 When a process uses memory-mapped pages protected by memory tags (for
501 example, AArch64 MTE), this additional information will be recorded in
502 the core file in the event of a crash or if GDB generates a core file
503 from the current process state. GDB will show this additional information
504 automatically, or through one of the memory-tag subcommands.
506 * Scheduler-locking and new threads
508 When scheduler-locking is in effect, only the current thread may run
509 when the inferior is resumed. However, previously, new threads
510 created by the resumed thread would still be able to run free. Now,
511 they are held stopped.
513 * "info breakpoints" now displays enabled breakpoint locations of
514 disabled breakpoints as in the "y-" state. For example:
516 (gdb) info breakpoints
517 Num Type Disp Enb Address What
518 1 breakpoint keep n <MULTIPLE>
519 1.1 y- 0x00000000000011b6 in ...
520 1.2 y- 0x00000000000011c2 in ...
521 1.3 n 0x00000000000011ce in ...
523 * Support for Thread Local Storage (TLS) variables on FreeBSD arm and
524 aarch64 architectures.
526 * GDB now supports hardware watchpoints on FreeBSD/Aarch64.
528 * Remove support for building against Python 2, it is now only possible to
529 build GDB against Python 3.
531 * DBX mode has been removed.
533 * GDB now honours the DWARF prologue_end line-table entry flag the compiler can
534 emit to indicate where a breakpoint should be placed to break in a function
537 * Completion now also offers "NUMBER" for "set" commands that accept
538 a numeric argument and the "unlimited" keyword. For example:
540 (gdb) set width <TAB>
545 (gdb) complete set width
549 * Disassembler styling using libopcodes. GDB now supports
550 disassembler styling using libopcodes. This is only available for
551 some targets (currently x86 and RISC-V). For unsupported targets
552 Python Pygments is still used. For supported targets, libopcodes
553 styling is used by default.
555 * The Windows native target now supports target async.
557 * gdb now supports zstd compressed debug sections (ELFCOMPRESS_ZSTD) for ELF.
559 * The format of 'disassemble /r' and 'record instruction-history /r'
560 has changed. The instruction bytes could now be grouped together,
561 and displayed in the endianness of the instruction. This is the
562 same layout as used by GNU objdump when disassembling.
564 There is now 'disassemble /b' and 'record instruction-history /b'
565 which will always display the instructions bytes one at a time in
566 memory order, that is, the byte at the lowest address first.
568 For both /r and /b GDB is now better at using whitespace in order to
569 align the disassembled instruction text.
571 * The TUI no longer styles the source and assembly code highlighted by
572 the current position indicator by default. You can however
573 re-enable styling using the new "set style tui-current-position"
576 * New convenience variable $_inferior_thread_count contains the number
577 of live threads in the current inferior.
579 * When a breakpoint with multiple code locations is hit, GDB now prints
580 the code location using the syntax <breakpoint_number>.<location_number>
582 Thread 1 "zeoes" hit Breakpoint 2.3, some_func () at zeoes.c:8
584 * When a breakpoint is hit, GDB now sets the convenience variables $_hit_bpnum
585 and $_hit_locno to the hit breakpoint number and code location number.
586 This allows to disable the last hit breakpoint using
587 (gdb) disable $_hit_bpnum
588 or disable only the specific breakpoint code location using
589 (gdb) disable $_hit_bpnum.$_hit_locno
590 These commands can be used inside the command list of a breakpoint to
591 automatically disable the just encountered breakpoint (or the just
592 encountered specific breakpoint code location).
593 When a breakpoint has only one location, $_hit_locno is set to 1 so that
594 (gdb) disable $_hit_bpnum.$_hit_locno
596 (gdb) disable $_hit_bpnum
597 are both disabling the breakpoint.
601 maintenance set ignore-prologue-end-flag on|off
602 maintenance show ignore-prologue-end-flag
603 This setting, which is off by default, controls whether GDB ignores the
604 PROLOGUE-END flag from the line-table when skipping prologue. This can be
605 used to force GDB to use prologue analyzers if the line-table is constructed
606 from erroneous debug information.
608 set print nibbles [on|off]
610 This controls whether the 'print/t' command will display binary values
611 in groups of four bits, known as "nibbles". The default is 'off'.
613 maintenance set libopcodes-styling on|off
614 maintenance show libopcodes-styling
615 These can be used to force off libopcodes based styling, the Python
616 Pygments styling will then be used instead.
618 set style disassembler comment
619 show style disassembler comment
620 set style disassembler immediate
621 show style disassembler immediate
622 set style disassembler mnemonic
623 show style disassembler mnemonic
624 set style disassembler register
625 show style disassembler register
626 set style disassembler address
627 show style disassembler address
628 set style disassembler symbol
629 show style disassembler symbol
630 For targets that support libopcodes based styling, these settings
631 control how various aspects of the disassembler output are styled.
632 The 'disassembler address' and 'disassembler symbol' styles are
633 aliases for the 'address' and 'function' styles respectively.
635 maintenance print frame-id [ LEVEL ]
636 Print GDB's internal frame-id for the frame at LEVEL. If LEVEL is
637 not given, then print the frame-id for the currently selected frame.
639 set debug infcall on|off
641 Print additional debug messages about inferior function calls.
643 set debug solib on|off
645 Print additional debug messages about shared library handling.
647 set style tui-current-position [on|off]
648 Whether to style the source and assembly code highlighted by the
649 TUI's current position indicator. The default is off.
651 set print characters LIMIT
652 show print characters
653 This new setting is like 'set print elements', but controls how many
654 characters of a string are printed. This functionality used to be
655 covered by 'set print elements', but it can be controlled separately
656 now. LIMIT can be set to a numerical value to request that particular
657 character count, to 'unlimited' to print all characters of a string,
658 or to 'elements', which is also the default, to follow the setting of
659 'set print elements' as it used to be.
661 print -characters LIMIT
662 This new option to the 'print' command has the same effect as a temporary
663 use of 'set print characters'.
667 document user-defined
668 It is now possible to document user-defined aliases.
669 When a user-defined alias is documented, the help and apropos commands
670 use the provided documentation instead of the documentation of the
672 Documenting a user-defined alias is particularly useful when the alias
673 is a set of nested 'with' commands to avoid showing the help of
674 the with command for an alias that will in fact launch the
675 last command given in the nested commands.
677 maintenance info line-table
678 Add a PROLOGUE-END column to the output which indicates that an
679 entry corresponds to an address where a breakpoint should be placed
680 to be at the first instruction past a function's prologue.
684 set debug aix-solib on|off
686 set debug solib-frv on|off
688 Removed in favor of "set/show debug solib".
690 maintenance info program-spaces
691 This command now includes a 'Core File' column which indicates the
692 name of the core file associated with each program space.
696 GNU/Linux/LoongArch (gdbserver) loongarch*-*-linux*
698 GNU/Linux/CSKY (gdbserver) csky*-*linux*
704 ** The async record stating the stopped reason 'breakpoint-hit' now
705 contains an optional field locno giving the code location number
706 when the breakpoint has multiple code locations.
710 ** GDB will now reformat the doc string for gdb.Command and
711 gdb.Parameter sub-classes to remove unnecessary leading
712 whitespace from each line before using the string as the help
715 ** New function gdb.format_address(ADDRESS, PROGSPACE, ARCHITECTURE),
716 that formats ADDRESS as 'address <symbol+offset>', where symbol is
717 looked up in PROGSPACE, and ARCHITECTURE is used to format address.
718 This is the same format that GDB uses when printing address, symbol,
719 and offset information from the disassembler.
721 ** New function gdb.current_language that returns the name of the
722 current language. Unlike gdb.parameter('language'), this will
725 ** New method gdb.Frame.language that returns the name of the
728 ** New Python API for wrapping GDB's disassembler:
730 - gdb.disassembler.register_disassembler(DISASSEMBLER, ARCH).
731 DISASSEMBLER is a sub-class of gdb.disassembler.Disassembler.
732 ARCH is either None or a string containing a bfd architecture
733 name. DISASSEMBLER is registered as a disassembler for
734 architecture ARCH, or for all architectures if ARCH is None.
735 The previous disassembler registered for ARCH is returned, this
736 can be None if no previous disassembler was registered.
738 - gdb.disassembler.Disassembler is the class from which all
739 disassemblers should inherit. Its constructor takes a string,
740 a name for the disassembler, which is currently only used in
741 some debug output. Sub-classes should override the __call__
742 method to perform disassembly, invoking __call__ on this base
743 class will raise an exception.
745 - gdb.disassembler.DisassembleInfo is the class used to describe
746 a single disassembly request from GDB. An instance of this
747 class is passed to the __call__ method of
748 gdb.disassembler.Disassembler and has the following read-only
749 attributes: 'address', and 'architecture', as well as the
750 following method: 'read_memory'.
752 - gdb.disassembler.builtin_disassemble(INFO, MEMORY_SOURCE),
753 calls GDB's builtin disassembler on INFO, which is a
754 gdb.disassembler.DisassembleInfo object. MEMORY_SOURCE is
755 optional, its default value is None. If MEMORY_SOURCE is not
756 None then it must be an object that has a 'read_memory' method.
758 - gdb.disassembler.DisassemblerResult is a class that can be used
759 to wrap the result of a call to a Disassembler. It has
760 read-only attributes 'length' and 'string'.
762 ** gdb.Objfile now has an attribute named "is_file". This is True
763 if the objfile comes from a file, and False otherwise.
765 ** New function gdb.print_options that returns a dictionary of the
766 prevailing print options, in the form accepted by
767 gdb.Value.format_string.
769 ** gdb.Value.format_string now uses the format provided by 'print',
770 if it is called during a 'print' or other similar operation.
772 ** gdb.Value.format_string now accepts the 'summary' keyword. This
773 can be used to request a shorter representation of a value, the
774 way that 'set print frame-arguments scalars' does.
776 ** New Python type gdb.BreakpointLocation.
777 The new attribute 'locations' of gdb.Breakpoint returns a list of
778 gdb.BreakpointLocation objects specifying the locations where the
779 breakpoint is inserted into the debuggee.
781 ** The gdb.register_window_type method now restricts the set of
782 acceptable window names. The first character of a window's name
783 must start with a character in the set [a-zA-Z], every subsequent
784 character of a window's name must be in the set [-_.a-zA-Z0-9].
786 * New features in the GDB remote stub, GDBserver
788 ** GDBserver is now supported on LoongArch GNU/Linux.
790 ** GDBserver is now supported on CSKY GNU/Linux.
792 * LoongArch floating-point support
794 GDB now supports floating-point on LoongArch GNU/Linux.
796 * AMD GPU ROCm debugging support
798 GDB now supports debugging programs offloaded to AMD GPUs using the ROCm
801 *** Changes in GDB 12
803 * DBX mode is deprecated, and will be removed in GDB 13
805 * GDB 12 is the last release of GDB that will support building against
806 Python 2. From GDB 13, it will only be possible to build GDB itself
807 with Python 3 support.
809 * The disable-randomization setting now works on Windows.
811 * Improved C++ template support
813 GDB now treats functions/types involving C++ templates like it does function
814 overloads. Users may omit parameter lists to set breakpoints on families of
815 template functions, including types/functions composed of multiple template types:
817 (gdb) break template_func(template_1, int)
819 The above will set breakpoints at every function `template_func' where
820 the first function parameter is any template type named `template_1' and
821 the second function parameter is `int'.
823 TAB completion also gains similar improvements.
825 * The FreeBSD native target now supports async mode.
831 Enable or disable multithreaded symbol loading. This is enabled
832 by default, but passing --disable-threading or --enable-threading=no
833 to configure will disable it.
835 Disabling this can cause a performance penalty when there are a lot of
836 symbols to load, but is useful for debugging purposes.
840 maint set backtrace-on-fatal-signal on|off
841 maint show backtrace-on-fatal-signal
842 This setting is 'on' by default. When 'on' GDB will print a limited
843 backtrace to stderr in the situation where GDB terminates with a
844 fatal signal. This only supported on some platforms where the
845 backtrace and backtrace_symbols_fd functions are available.
847 set source open on|off
849 This setting, which is on by default, controls whether GDB will try
850 to open source code files. Switching this off will stop GDB trying
851 to open and read source code files, which can be useful if the files
852 are located over a slow network connection.
856 These are now deprecated aliases for "set max-value-size" and
857 "show max-value-size".
859 task apply [all | TASK-IDS...] [FLAG]... COMMAND
860 Like "thread apply", but applies COMMAND to Ada tasks.
863 Watchpoints can now be restricted to a specific Ada task.
865 maint set internal-error backtrace on|off
866 maint show internal-error backtrace
867 maint set internal-warning backtrace on|off
868 maint show internal-warning backtrace
869 GDB can now print a backtrace of itself when it encounters either an
870 internal-error, or an internal-warning. This is on by default for
871 internal-error and off by default for internal-warning.
874 Deprecated and replaced by "set logging enabled on|off".
876 set logging enabled on|off
878 These commands set or show whether logging is enabled or disabled.
881 You can now exit GDB by using the new command "exit", in addition to
882 the existing "quit" command.
884 set debug threads on|off
886 Print additional debug messages about thread creation and deletion.
888 set debug linux-nat on|off
890 These new commands replaced the old 'set debug lin-lwp' and 'show
891 debug lin-lwp' respectively. Turning this setting on prints debug
892 messages relating to GDB's handling of native Linux inferiors.
894 maint flush source-cache
895 Flush the contents of the source code cache.
897 maint set gnu-source-highlight enabled on|off
898 maint show gnu-source-highlight enabled
899 Whether GDB should use the GNU Source Highlight library for adding
900 styling to source code. When off, the library will not be used, even
901 when available. When GNU Source Highlight isn't used, or can't add
902 styling to a particular source file, then the Python Pygments
903 library will be used instead.
905 set suppress-cli-notifications (on|off)
906 show suppress-cli-notifications
907 This controls whether printing the notifications is suppressed for CLI.
908 CLI notifications occur when you change the selected context
909 (i.e., the current inferior, thread and/or the frame), or when
910 the program being debugged stops (e.g., because of hitting a
911 breakpoint, completing source-stepping, an interrupt, etc.).
913 set style disassembler enabled on|off
914 show style disassembler enabled
915 If GDB is compiled with Python support, and the Python Pygments
916 package is available, then, when this setting is on, disassembler
917 output will have styling applied.
919 set ada source-charset
920 show ada source-charset
921 Set the character set encoding that is assumed for Ada symbols. Valid
922 values for this follow the values that can be passed to the GNAT
923 compiler via the '-gnati' option. The default is ISO-8859-1.
929 These are the new names for the old 'layout', 'focus', 'refresh',
930 and 'winheight' tui commands respectively. The old names still
931 exist as aliases to these new commands.
935 The new command 'tui window width', and the alias 'winwidth' allow
936 the width of a tui window to be adjusted when windows are laid out
941 Control the display of debug output about GDB's tui.
946 Printing of floating-point values with base-modifying formats like
947 /x has been changed to display the underlying bytes of the value in
948 the desired base. This was GDB's documented behavior, but was never
949 implemented correctly.
952 This command can now print a reply, if the reply includes
953 non-printable characters. Any non-printable characters are printed
954 as escaped hex, e.g. \x?? where '??' is replaces with the value of
955 the non-printable character.
958 The clone-inferior command now ensures that the TTY, CMD and ARGS
959 settings are copied from the original inferior to the new one.
960 All modifications to the environment variables done using the 'set
961 environment' or 'unset environment' commands are also copied to the new
964 set debug lin-lwp on|off
966 These commands have been removed from GDB. The new command 'set
967 debug linux-nat' and 'show debug linux-nat' should be used
971 This command now includes information about the width of the tui
972 windows in its output.
978 These commands are now aliases for the 'tui layout', 'tui focus',
979 'tui refresh', and 'tui window height' commands respectively.
981 * GDB's Ada parser now supports an extension for specifying the exact
982 byte contents of a floating-point literal. This can be useful for
983 setting floating-point registers to a precise value without loss of
984 precision. The syntax is an extension of the based literal syntax.
985 Use, e.g., "16lf#0123abcd#" -- the number of "l"s controls the width
986 of the floating-point type, and the "f" is the marker for floating
991 ** The '-add-inferior' with no option flags now inherits the
992 connection of the current inferior, this restores the behaviour of
993 GDB as it was prior to GDB 10.
995 ** The '-add-inferior' command now accepts a '--no-connection'
996 option, which causes the new inferior to start without a
999 ** The default version of the MI interpreter is now 4 (-i=mi4).
1001 ** The "script" field in breakpoint output (which is syntactically
1002 incorrect in MI 3 and below) has changed in MI 4 to become a list.
1003 This affects the following commands and events:
1007 - =breakpoint-created
1008 - =breakpoint-modified
1010 The -fix-breakpoint-script-output command can be used to enable
1011 this behavior with previous MI versions.
1015 GNU/Linux/LoongArch loongarch*-*-linux*
1023 ** New function gdb.add_history(), which takes a gdb.Value object
1024 and adds the value it represents to GDB's history list. An
1025 integer, the index of the new item in the history list, is
1028 ** New function gdb.history_count(), which returns the number of
1029 values in GDB's value history.
1031 ** New gdb.events.gdb_exiting event. This event is called with a
1032 gdb.GdbExitingEvent object which has the read-only attribute
1033 'exit_code', which contains the value of the GDB exit code. This
1034 event is triggered once GDB decides it is going to exit, but
1035 before GDB starts to clean up its internal state.
1037 ** New function gdb.architecture_names(), which returns a list
1038 containing all of the possible Architecture.name() values. Each
1041 ** New function gdb.Architecture.integer_type(), which returns an
1042 integer type given a size and a signed-ness.
1044 ** New gdb.TargetConnection object type that represents a connection
1045 (as displayed by the 'info connections' command). A sub-class,
1046 gdb.RemoteTargetConnection, is used to represent 'remote' and
1047 'extended-remote' connections.
1049 ** The gdb.Inferior type now has a 'connection' property which is an
1050 instance of gdb.TargetConnection, the connection used by this
1051 inferior. This can be None if the inferior has no connection.
1053 ** New 'gdb.events.connection_removed' event registry, which emits a
1054 'gdb.ConnectionEvent' when a connection is removed from GDB.
1055 This event has a 'connection' property, a gdb.TargetConnection
1056 object for the connection being removed.
1058 ** New gdb.connections() function that returns a list of all
1059 currently active connections.
1061 ** New gdb.RemoteTargetConnection.send_packet(PACKET) method. This
1062 is equivalent to the existing 'maint packet' CLI command; it
1063 allows a user specified packet to be sent to the remote target.
1065 ** New function gdb.host_charset(), returns a string, which is the
1066 name of the current host charset.
1068 ** New gdb.set_parameter(NAME, VALUE). This sets the gdb parameter
1071 ** New gdb.with_parameter(NAME, VALUE). This returns a context
1072 manager that temporarily sets the gdb parameter NAME to VALUE,
1073 then resets it when the context is exited.
1075 ** The gdb.Value.format_string method now takes a 'styling'
1076 argument, which is a boolean. When true, the returned string can
1077 include escape sequences to apply styling. The styling will only
1078 be present if styling is otherwise turned on in GDB (see 'help
1079 set styling'). When false, which is the default if the argument
1080 is not given, then no styling is applied to the returned string.
1082 ** New read-only attribute gdb.InferiorThread.details, which is
1083 either a string, containing additional, target specific thread
1084 state information, or None, if there is no such additional
1087 ** New read-only attribute gdb.Type.is_scalar, which is True for
1088 scalar types, and False for all other types.
1090 ** New read-only attribute gdb.Type.is_signed. This attribute
1091 should only be read when Type.is_scalar is True, and will be True
1092 for signed types, and False for all other types. Attempting to
1093 read this attribute for non-scalar types will raise a ValueError.
1095 ** It is now possible to add GDB/MI commands implemented in Python.
1097 * New features in the GDB remote stub, GDBserver
1099 ** GDBserver is now supported on OpenRISC GNU/Linux.
1101 * New native configurations
1103 GNU/Linux/OpenRISC or1k*-*-linux*
1105 *** Changes in GDB 11
1107 * The 'set disassembler-options' command now supports specifying options
1110 * GDB now supports general memory tagging functionality if the underlying
1111 architecture supports the proper primitives and hooks. Currently this is
1112 enabled only for AArch64 MTE.
1116 - Additional information when the inferior crashes with a SIGSEGV caused by
1117 a memory tag violation.
1119 - A new modifier 'm' for the "x" command, which displays allocation tags for a
1120 particular memory range.
1122 - Display of memory tag mismatches by "print", for addresses and
1123 pointers, if memory tagging is supported by the architecture.
1125 * Building GDB now requires GMP (The GNU Multiple Precision Arithmetic
1130 ** '-break-insert --qualified' and '-dprintf-insert --qualified'
1132 The MI -break-insert and -dprintf-insert commands now support a
1133 new "--qualified" option that makes GDB interpret a specified
1134 function name as a complete fully-qualified name. This is the
1135 equivalent of the CLI's "break -qualified" and "dprintf
1138 ** '-break-insert --force-condition' and '-dprintf-insert --force-condition'
1140 The MI -break-insert and -dprintf-insert commands now support a
1141 '--force-condition' flag to forcibly define a condition even when
1142 the condition is invalid at all locations of the breakpoint. This
1143 is equivalent to the '-force-condition' flag of the CLI's "break"
1146 ** '-break-condition --force'
1148 The MI -break-condition command now supports a '--force' flag to
1149 forcibly define a condition even when the condition is invalid at
1150 all locations of the selected breakpoint. This is equivalent to
1151 the '-force' flag of the CLI's "cond" command.
1153 ** '-file-list-exec-source-files [--group-by-objfile]
1154 [--basename | --dirname]
1157 The existing -file-list-exec-source-files command now takes an
1158 optional REGEXP which is used to filter the source files that are
1159 included in the results.
1161 By default REGEXP is matched against the full filename of the
1162 source file. When one of --basename or --dirname is given then
1163 REGEXP is only matched against the specified part of the full
1166 When the optional --group-by-objfile flag is used the output
1167 format is changed, the results are now a list of object files
1168 (executable and libraries) with the source files that are
1169 associated with each object file.
1171 The results from -file-list-exec-source-files now include a
1172 'debug-fully-read' field which takes the value 'true' or 'false'.
1173 A 'true' value indicates the source file is from a compilation
1174 unit that has had its debug information fully read in by GDB, a
1175 value of 'false' indicates GDB has only performed a partial scan
1176 of the debug information so far.
1178 * GDB now supports core file debugging for x86_64 Cygwin programs.
1180 * GDB will now look for the .gdbinit file in a config directory before
1181 looking for ~/.gdbinit. The file is searched for in the following
1182 locations: $XDG_CONFIG_HOME/gdb/gdbinit, $HOME/.config/gdb/gdbinit,
1183 $HOME/.gdbinit. On Apple hosts the search order is instead:
1184 $HOME/Library/Preferences/gdb/gdbinit, $HOME/.gdbinit.
1186 * GDB now supports fixed point types which are described in DWARF
1187 as base types with a fixed-point encoding. Additionally, support
1188 for the DW_AT_GNU_numerator and DW_AT_GNU_denominator has also
1191 For Ada, this allows support for fixed point types without requiring
1192 the use of the GNAT encoding (based on information added to the type's
1193 name following a GNAT-specific format).
1195 * GDB will now load and process commands from ~/.config/gdb/gdbearlyinit
1196 or ~/.gdbearlyinit if these files are present. These files are
1197 processed earlier than any of the other initialization files and
1198 can affect parts of GDB's startup that previously had already been
1199 completed before the initialization files were read, for example
1200 styling of the initial GDB greeting.
1202 * GDB now has two new options "--early-init-command" and
1203 "--early-init-eval-command" with corresponding short options "-eix"
1204 and "-eiex" that allow options (that would normally appear in a
1205 gdbearlyinit file) to be passed on the command line.
1207 * For RISC-V targets, the target feature "org.gnu.gdb.riscv.vector" is
1208 now understood by GDB, and can be used to describe the vector
1209 registers of a target. The precise requirements of this register
1210 feature are documented in the GDB manual.
1212 * For ARM targets, the "org.gnu.gdb.arm.m-profile-mve" feature is now
1213 supported by GDB and describes a new VPR register from the ARM MVE
1214 (Helium) extension. See the GDB manual for more information.
1218 ** TUI windows now support mouse actions. The mouse wheel scrolls
1219 the appropriate window.
1221 ** Key combinations that do not have a specific action on the
1222 focused window are passed to GDB. For example, you now can use
1223 Ctrl-Left/Ctrl-Right to move between words in the command window
1224 regardless of which window is in focus. Previously you would
1225 need to focus on the command window for such key combinations to
1230 set debug event-loop
1231 show debug event-loop
1232 Control the display of debug output about GDB's event loop.
1234 set print memory-tag-violations
1235 show print memory-tag-violations
1236 Control whether to display additional information about memory tag violations
1237 when printing pointers and addresses. Architecture support for memory
1238 tagging is required for this option to have an effect.
1240 maintenance flush symbol-cache
1241 maintenance flush register-cache
1242 These new commands are equivalent to the already existing commands
1243 'maintenance flush-symbol-cache' and 'flushregs' respectively.
1245 maintenance flush dcache
1246 A new command to flush the dcache.
1248 maintenance info target-sections
1249 Print GDB's internal target sections table.
1251 maintenance info jit
1252 Print the JIT code objects in the inferior known to GDB.
1254 memory-tag show-logical-tag POINTER
1255 Print the logical tag for POINTER.
1256 memory-tag with-logical-tag POINTER TAG
1257 Print POINTER with logical tag TAG.
1258 memory-tag show-allocation-tag ADDRESS
1259 Print the allocation tag for ADDRESS.
1260 memory-tag set-allocation-tag ADDRESS LENGTH TAGS
1261 Set the allocation tag for [ADDRESS, ADDRESS + LENGTH) to TAGS.
1262 memory-tag check POINTER
1263 Validate that POINTER's logical tag matches the allocation tag.
1265 set startup-quietly on|off
1266 show startup-quietly
1267 When 'on', this causes GDB to act as if "-silent" were passed on the
1268 command line. This command needs to be added to an early
1269 initialization file (e.g. ~/.config/gdb/gdbearlyinit) in order to
1272 set print type hex on|off
1274 When 'on', the 'ptype' command uses hexadecimal notation to print sizes
1275 and offsets of struct members. When 'off', decimal notation is used.
1277 set python ignore-environment on|off
1278 show python ignore-environment
1279 When 'on', this causes GDB's builtin Python to ignore any
1280 environment variables that would otherwise affect how Python
1281 behaves. This command needs to be added to an early initialization
1282 file (e.g. ~/.config/gdb/gdbearlyinit) in order to affect GDB.
1284 set python dont-write-bytecode auto|on|off
1285 show python dont-write-bytecode
1286 When 'on', this causes GDB's builtin Python to not write any
1287 byte-code (.pyc files) to disk. This command needs to be added to
1288 an early initialization file (e.g. ~/.config/gdb/gdbearlyinit) in
1289 order to affect GDB. When 'off' byte-code will always be written.
1290 When set to 'auto' (the default) Python will check the
1291 PYTHONDONTWRITEBYTECODE environment variable.
1295 break [PROBE_MODIFIER] [LOCATION] [thread THREADNUM]
1296 [-force-condition] [if CONDITION]
1297 This command would previously refuse setting a breakpoint if the
1298 CONDITION expression is invalid at a location. It now accepts and
1299 defines the breakpoint if there is at least one location at which
1300 the CONDITION is valid. The locations for which the CONDITION is
1301 invalid, are automatically disabled. If CONDITION is invalid at all
1302 of the locations, setting the breakpoint is still rejected. However,
1303 the '-force-condition' flag can be used in this case for forcing GDB to
1304 define the breakpoint, making all the current locations automatically
1305 disabled. This may be useful if the user knows the condition will
1306 become meaningful at a future location, e.g. due to a shared library
1309 condition [-force] N COND
1310 The behavior of this command is changed the same way for the 'break'
1311 command as explained above. The '-force' flag can be used to force
1312 GDB into defining the condition even when COND is invalid for all the
1313 current locations of breakpoint N.
1316 maintenance flush-symbol-cache
1317 These commands are deprecated in favor of the new commands
1318 'maintenance flush register-cache' and 'maintenance flush
1319 symbol-cache' respectively.
1321 set style version foreground COLOR
1322 set style version background COLOR
1323 set style version intensity VALUE
1324 Control the styling of GDB's version number text.
1327 When the ID parameter is omitted, then this command prints information
1328 about the current inferior. When the ID parameter is present, the
1329 behavior of the command is unchanged and have the inferior ID become
1330 the current inferior.
1332 maintenance info sections
1333 The ALLOBJ keyword has been replaced with an -all-objects command
1334 line flag. It is now possible to filter which sections are printed
1335 even when -all-objects is passed.
1337 ptype[/FLAGS] TYPE | EXPRESSION
1338 The 'ptype' command has two new flags. When '/x' is set, hexadecimal
1339 notation is used when printing sizes and offsets of struct members.
1340 When '/d' is set, decimal notation is used when printing sizes and
1341 offsets of struct members. Default behavior is given by 'show print
1345 The info sources command output has been restructured. The results
1346 are now based around a list of objfiles (executable and libraries),
1347 and for each objfile the source files that are part of that objfile
1350 * Removed targets and native configurations
1352 ARM Symbian arm*-*-symbianelf*
1354 * New remote packets
1357 Request the remote to send allocation tags for a particular memory range.
1359 Request the remote to store the specified allocation tags to the requested
1364 ** Improved support for rvalue reference values:
1365 TYPE_CODE_RVALUE_REF is now exported as part of the API and the
1366 value-referenced-value procedure now handles rvalue reference
1369 ** New procedures for obtaining value variants:
1370 value-reference-value, value-rvalue-reference-value and
1373 ** Temporary breakpoints can now be created with make-breakpoint and
1374 tested for using breakpoint-temporary?.
1378 ** Inferior objects now contain a read-only 'connection_num' attribute that
1379 gives the connection number as seen in 'info connections' and
1382 ** New method gdb.Frame.level() which returns the stack level of the
1385 ** New method gdb.PendingFrame.level() which returns the stack level
1386 of the frame object.
1388 ** When hitting a catchpoint, the Python API will now emit a
1389 gdb.BreakpointEvent rather than a gdb.StopEvent. The
1390 gdb.Breakpoint attached to the event will have type BP_CATCHPOINT.
1392 ** Python TUI windows can now receive mouse click events. If the
1393 Window object implements the click method, it is called for each
1394 mouse click event in this window.
1396 *** Changes in GDB 10
1398 * There are new feature names for ARC targets: "org.gnu.gdb.arc.core"
1399 and "org.gnu.gdb.arc.aux". The old names are still supported but
1400 must be considered obsolete. They will be deprecated after some
1403 * Help and apropos commands will now show the documentation of a
1404 command only once, even if that command has one or more aliases.
1405 These commands now show the command name, then all of its aliases,
1406 and finally the description of the command.
1408 * 'help aliases' now shows only the user defined aliases. GDB predefined
1409 aliases are shown together with their aliased command.
1411 * GDB now supports debuginfod, an HTTP server for distributing ELF/DWARF
1412 debugging information as well as source code.
1414 When built with debuginfod, GDB can automatically query debuginfod
1415 servers for the separate debug files and source code of the executable
1418 To build GDB with debuginfod, pass --with-debuginfod to configure (this
1419 requires libdebuginfod, the debuginfod client library).
1421 debuginfod is distributed with elfutils, starting with version 0.178.
1423 You can get the latest version from https://sourceware.org/elfutils.
1425 * Multi-target debugging support
1427 GDB now supports debugging multiple target connections
1428 simultaneously. For example, you can now have each inferior
1429 connected to different remote servers running in different machines,
1430 or have one inferior debugging a local native process, an inferior
1431 debugging a core dump, etc.
1433 This support is experimental and comes with some limitations -- you
1434 can only resume multiple targets simultaneously if all targets
1435 support non-stop mode, and all remote stubs or servers must support
1436 the same set of remote protocol features exactly. See also "info
1437 connections" and "add-inferior -no-connection" below, and "maint set
1438 target-non-stop" in the user manual.
1440 * New features in the GDB remote stub, GDBserver
1442 ** GDBserver is now supported on ARC GNU/Linux.
1444 ** GDBserver is now supported on RISC-V GNU/Linux.
1446 ** GDBserver no longer supports these host triplets:
1448 i[34567]86-*-lynxos*
1457 i[34567]86-*-mingw32ce*
1459 * Debugging MS-Windows processes now sets $_exitsignal when the
1460 inferior is terminated by a signal, instead of setting $_exitcode.
1462 * Multithreaded symbol loading has now been enabled by default on systems
1463 that support it (see entry for GDB 9, below), providing faster
1464 performance for programs with many symbols.
1466 * The $_siginfo convenience variable now also works on Windows targets,
1467 and will display the EXCEPTION_RECORD of the last handled exception.
1469 * TUI windows can now be arranged horizontally.
1471 * The command history filename can now be set to the empty string
1472 either using 'set history filename' or by setting 'GDBHISTFILE=' in
1473 the environment. The effect of setting this filename to the empty
1474 string is that GDB will not try to load any previous command
1477 * On Windows targets, it is now possible to debug 32-bit programs with a
1482 set exec-file-mismatch -- Set exec-file-mismatch handling (ask|warn|off).
1483 show exec-file-mismatch -- Show exec-file-mismatch handling (ask|warn|off).
1484 Set or show the option 'exec-file-mismatch'. When GDB attaches to a
1485 running process, this new option indicates whether to detect
1486 a mismatch between the current executable file loaded by GDB and the
1487 executable file used to start the process. If 'ask', the default,
1488 display a warning and ask the user whether to load the process
1489 executable file; if 'warn', just display a warning; if 'off', don't
1490 attempt to detect a mismatch.
1492 tui new-layout NAME WINDOW WEIGHT [WINDOW WEIGHT]...
1493 Define a new TUI layout, specifying its name and the windows that
1496 maintenance print xml-tdesc [FILE]
1497 Prints the current target description as an XML document. If the
1498 optional FILE is provided (which is an XML target description) then
1499 the target description is read from FILE into GDB, and then
1502 maintenance print core-file-backed-mappings
1503 Prints file-backed mappings loaded from a core file's note section.
1504 Output is expected to be similar to that of "info proc mappings".
1506 set debug fortran-array-slicing on|off
1507 show debug fortran-array-slicing
1508 Print debugging when taking slices of Fortran arrays.
1510 set fortran repack-array-slices on|off
1511 show fortran repack-array-slices
1512 When taking slices from Fortran arrays and strings, if the slice is
1513 non-contiguous within the original value then, when this option is
1514 on, the new value will be repacked into a single contiguous value.
1515 When this option is off, then the value returned will consist of a
1516 descriptor that describes the slice within the memory of the
1517 original parent value.
1521 alias [-a] [--] ALIAS = COMMAND [DEFAULT-ARGS...]
1522 The alias command can now specify default args for an alias.
1523 GDB automatically prepends the alias default args to the argument list
1524 provided explicitly by the user.
1525 For example, to have a backtrace with full details, you can define
1526 an alias 'bt_ALL' as
1527 'alias bt_ALL = backtrace -entry-values both -frame-arg all
1528 -past-main -past-entry -full'.
1529 Alias default arguments can also use a set of nested 'with' commands,
1530 e.g. 'alias pp10 = with print pretty -- with print elem 10 -- print'
1531 defines the alias pp10 that will pretty print a maximum of 10 elements
1532 of the given expression (if the expression is an array).
1536 GNU/Linux/RISC-V (gdbserver) riscv*-*-linux*
1537 BPF bpf-unknown-none
1542 ** gdb.register_window_type can be used to implement new TUI windows
1545 ** Dynamic types can now be queried. gdb.Type has a new attribute,
1546 "dynamic", and gdb.Type.sizeof can be None for a dynamic type. A
1547 field of a dynamic type may have None for its "bitpos" attribute
1550 ** Commands written in Python can be in the "TUI" help class by
1551 registering with the new constant gdb.COMMAND_TUI.
1553 ** New method gdb.PendingFrame.architecture () to retrieve the
1554 architecture of the pending frame.
1556 ** New gdb.Architecture.registers method that returns a
1557 gdb.RegisterDescriptorIterator object, an iterator that returns
1558 gdb.RegisterDescriptor objects. The new RegisterDescriptor is a
1559 way to query the registers available for an architecture.
1561 ** New gdb.Architecture.register_groups method that returns a
1562 gdb.RegisterGroupIterator object, an iterator that returns
1563 gdb.RegisterGroup objects. The new RegisterGroup is a way to
1564 discover the available register groups.
1568 ** GDB can now be built with GNU Guile 3.0 and 2.2 in addition to 2.0.
1570 ** Procedures 'memory-port-read-buffer-size',
1571 'set-memory-port-read-buffer-size!', 'memory-port-write-buffer-size',
1572 and 'set-memory-port-write-buffer-size!' are deprecated. When
1573 using Guile 2.2 and later, users who need to control the size of
1574 a memory port's internal buffer can use the 'setvbuf' procedure.
1576 *** Changes in GDB 9
1578 * 'thread-exited' event is now available in the annotations interface.
1580 * New built-in convenience variables $_gdb_major and $_gdb_minor
1581 provide the GDB version. They are handy for conditionally using
1582 features available only in or since specific GDB versions, in
1583 scripts that should work error-free with many different versions,
1584 such as in system-wide init files.
1586 * New built-in convenience functions $_gdb_setting, $_gdb_setting_str,
1587 $_gdb_maint_setting and $_gdb_maint_setting_str provide access to values
1588 of the GDB settings and the GDB maintenance settings. They are handy
1589 for changing the logic of user defined commands depending on the
1590 current GDB settings.
1592 * GDB now supports Thread Local Storage (TLS) variables on several
1593 FreeBSD architectures (amd64, i386, powerpc, riscv). Other
1594 architectures require kernel changes. TLS is not yet supported for
1595 amd64 and i386 process core dumps.
1597 * Support for Pointer Authentication (PAC) on AArch64 Linux. Return
1598 addresses that required unmasking are shown in the backtrace with the
1601 * Two new convenience functions $_cimag and $_creal that extract the
1602 imaginary and real parts respectively from complex numbers.
1604 * New built-in convenience variables $_shell_exitcode and $_shell_exitsignal
1605 provide the exitcode or exit status of the shell commands launched by
1606 GDB commands such as "shell", "pipe" and "make".
1608 * The command define-prefix can now define user defined prefix commands.
1609 User defined commands can now be defined using these user defined prefix
1612 * Command names can now use the . character.
1614 * The RX port now supports XML target descriptions.
1616 * GDB now shows the Ada task names at more places, e.g. in task switching
1619 * GDB can now be compiled with Python 3 on Windows.
1621 * New convenience variable $_ada_exception holds the address of the
1622 Ada exception being thrown. This is set by Ada-related catchpoints.
1624 * GDB can now place breakpoints on nested functions and subroutines in
1625 Fortran code. The '::' operator can be used between parent and
1626 child scopes when placing breakpoints, for example:
1628 (gdb) break outer_function::inner_function
1630 The 'outer_function::' prefix is only needed if 'inner_function' is
1631 not visible in the current scope.
1633 * In addition to the system-wide gdbinit file, if configured with
1634 --with-system-gdbinit-dir, GDB will now also load files in that directory
1635 as system gdbinit files, unless the -nx or -n flag is provided. Files
1636 with extensions .gdb, .py and .scm are supported as long as GDB was
1637 compiled with support for that language.
1639 * GDB now supports multithreaded symbol loading for higher performance.
1640 This feature is still in testing, so it is disabled by default. You
1641 can turn it on using 'maint set worker-threads unlimited'.
1645 ** The gdb.Value type has a new method 'format_string' which returns a
1646 string representing the value. The formatting is controlled by the
1647 optional keyword arguments: 'raw', 'pretty_arrays', 'pretty_structs',
1648 'array_indexes', 'symbols', 'unions', 'deref_refs', 'actual_objects',
1649 'static_members', 'max_elements', 'repeat_threshold', and 'format'.
1651 ** gdb.Type has a new property 'objfile' which returns the objfile the
1652 type was defined in.
1654 ** The frame information printed by the python frame filtering code
1655 is now consistent with what the 'backtrace' command prints when
1656 there are no filters, or when the 'backtrace' '-no-filters' option
1659 ** The new function gdb.lookup_static_symbol can be used to look up
1660 symbols with static linkage.
1662 ** The new function gdb.lookup_static_symbols can be used to look up
1663 all static symbols with static linkage.
1665 ** gdb.Objfile has new methods 'lookup_global_symbol' and
1666 'lookup_static_symbol' to lookup a symbol from this objfile only.
1668 ** gdb.Block now supports the dictionary syntax for accessing symbols in
1669 this block (e.g. block['local_variable']).
1673 | [COMMAND] | SHELL_COMMAND
1674 | -d DELIM COMMAND DELIM SHELL_COMMAND
1675 pipe [COMMAND] | SHELL_COMMAND
1676 pipe -d DELIM COMMAND DELIM SHELL_COMMAND
1677 Executes COMMAND and sends its output to SHELL_COMMAND.
1678 With no COMMAND, repeat the last executed command
1679 and send its output to SHELL_COMMAND.
1681 define-prefix COMMAND
1682 Define or mark a command as a user-defined prefix command.
1684 with SETTING [VALUE] [-- COMMAND]
1685 w SETTING [VALUE] [-- COMMAND]
1686 Temporarily set SETTING, run COMMAND, and restore SETTING.
1687 Usage: with SETTING -- COMMAND
1688 With no COMMAND, repeats the last executed command.
1689 SETTING is any GDB setting you can change with the "set"
1690 subcommands. For example, 'with language c -- print someobj'
1691 temporarily switches to the C language in order to print someobj.
1692 Settings can be combined: 'w lang c -- w print elements unlimited --
1693 usercmd' switches to the C language and runs usercmd with no limit
1694 of array elements to print.
1696 maint with SETTING [VALUE] [-- COMMAND]
1697 Like "with", but works with "maintenance set" settings.
1699 set may-call-functions [on|off]
1700 show may-call-functions
1701 This controls whether GDB will attempt to call functions in
1702 the program, such as with expressions in the print command. It
1703 defaults to on. Calling functions in the program being debugged
1704 can have undesired side effects. It is now possible to forbid
1705 such function calls. If function calls are forbidden, GDB will throw
1706 an error when a command (such as print expression) calls a function
1709 set print finish [on|off]
1711 This controls whether the `finish' command will display the value
1712 that is returned by the current function. When `off', the value is
1713 still entered into the value history, but it is not printed. The
1717 show print max-depth
1718 Allows deeply nested structures to be simplified when printing by
1719 replacing deeply nested parts (beyond the max-depth) with ellipses.
1720 The default max-depth is 20, but this can be set to unlimited to get
1721 the old behavior back.
1723 set print raw-values [on|off]
1724 show print raw-values
1725 By default, GDB applies the enabled pretty printers when printing a
1726 value. This allows to ignore the enabled pretty printers for a series
1727 of commands. The default is 'off'.
1729 set logging debugredirect [on|off]
1730 By default, GDB debug output will go to both the terminal and the logfile.
1731 Set if you want debug output to go only to the log file.
1733 set style title foreground COLOR
1734 set style title background COLOR
1735 set style title intensity VALUE
1736 Control the styling of titles.
1738 set style highlight foreground COLOR
1739 set style highlight background COLOR
1740 set style highlight intensity VALUE
1741 Control the styling of highlightings.
1743 maint set worker-threads
1744 maint show worker-threads
1745 Control the number of worker threads that can be used by GDB. The
1746 default is 0. "unlimited" lets GDB choose a number that is
1747 reasonable. Currently worker threads are only used when demangling
1748 the names of linker symbols.
1750 set style tui-border foreground COLOR
1751 set style tui-border background COLOR
1752 Control the styling of TUI borders.
1754 set style tui-active-border foreground COLOR
1755 set style tui-active-border background COLOR
1756 Control the styling of the active TUI border.
1758 maint set test-settings KIND
1759 maint show test-settings KIND
1760 A set of commands used by the testsuite for exercising the settings
1763 maint set tui-resize-message [on|off]
1764 maint show tui-resize-message
1765 Control whether GDB prints a message each time the terminal is
1766 resized when in TUI mode. This is primarily useful for testing the
1769 set print frame-info [short-location|location|location-and-address
1770 |source-and-location|source-line|auto]
1771 show print frame-info
1772 This controls what frame information is printed by the commands printing
1773 a frame. This setting will e.g. influence the behaviour of 'backtrace',
1774 'frame', 'stepi'. The python frame filtering also respect this setting.
1775 The 'backtrace' '-frame-info' option can override this global setting.
1777 set tui compact-source
1778 show tui compact-source
1780 Enable the "compact" display mode for the TUI source window. The
1781 compact display uses only as much space as is needed for the line
1782 numbers in the current file, and only a single space to separate the
1783 line numbers from the source.
1785 info modules [-q] [REGEXP]
1786 Return a list of Fortran modules matching REGEXP, or all modules if
1789 info module functions [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP]
1790 Return a list of functions within all modules, grouped by module.
1791 The list of functions can be restricted with the optional regular
1792 expressions. MODULE_REGEXP matches against the module name,
1793 TYPE_REGEXP matches against the function type signature, and REGEXP
1794 matches against the function name.
1796 info module variables [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP]
1797 Return a list of variables within all modules, grouped by module.
1798 The list of variables can be restricted with the optional regular
1799 expressions. MODULE_REGEXP matches against the module name,
1800 TYPE_REGEXP matches against the variable type, and REGEXP matches
1801 against the variable name.
1803 set debug remote-packet-max-chars
1804 show debug remote-packet-max-chars
1805 Controls the number of characters to output in a remote packet when using
1807 The default is 512 bytes.
1810 Lists the target connections currently in use.
1815 The "help" command uses the title style to enhance the
1816 readibility of its output by styling the classes and
1820 Similarly to "help", the "apropos" command also uses the
1821 title style for the command names. "apropos" accepts now
1822 a flag "-v" (verbose) to show the full documentation
1823 of matching commands and to use the highlight style to mark
1824 the documentation parts matching REGEXP.
1828 The GDB printf and eval commands can now print C-style and Ada-style
1829 string convenience variables without calling functions in the program.
1830 This allows to do formatted printing of strings without having
1831 a running inferior, or when debugging a core dump.
1833 info sources [-dirname | -basename] [--] [REGEXP]
1834 This command has now optional arguments to only print the files
1835 whose names match REGEXP. The arguments -dirname and -basename
1836 allow to restrict matching respectively to the dirname and basename
1840 The "show style" and its subcommands are now styling
1841 a style name in their output using its own style, to help
1842 the user visualize the different styles.
1844 set print frame-arguments
1845 The new value 'presence' indicates to only indicate the presence of
1846 arguments using ..., instead of printing argument names and values.
1848 set print raw-frame-arguments
1849 show print raw-frame-arguments
1851 These commands replace the similarly-named "set/show print raw
1852 frame-arguments" commands (now with a dash instead of a space). The
1853 old commands are now deprecated and may be removed in a future
1856 add-inferior [-no-connection]
1857 The add-inferior command now supports a "-no-connection" flag that
1858 makes the new inferior start with no target connection associated.
1859 By default, the new inferior inherits the target connection of the
1860 current inferior. See also "info connections".
1863 This command's output now includes a new "Connection" column
1864 indicating which target connection an inferior is bound to. See
1865 "info connections" above.
1867 maint test-options require-delimiter
1868 maint test-options unknown-is-error
1869 maint test-options unknown-is-operand
1870 maint show test-options-completion-result
1871 Commands used by the testsuite to validate the command options
1874 focus, winheight, +, -, >, <
1875 These commands are now case-sensitive.
1877 * New command options, command completion
1879 GDB now has a standard infrastructure to support dash-style command
1880 options ('-OPT'). One benefit is that commands that use it can
1881 easily support completion of command line arguments. Try "CMD
1882 -[TAB]" or "help CMD" to find options supported by a command. Over
1883 time, we intend to migrate most commands to this infrastructure. A
1884 number of commands got support for new command options in this
1887 ** The "print" and "compile print" commands now support a number of
1888 options that allow overriding relevant global print settings as
1889 set by "set print" subcommands:
1893 -array-indexes [on|off]
1894 -elements NUMBER|unlimited
1898 -raw-values [on|off]
1899 -repeats NUMBER|unlimited
1900 -static-members [on|off]
1905 Note that because the "print"/"compile print" commands accept
1906 arbitrary expressions which may look like options (including
1907 abbreviations), if you specify any command option, then you must
1908 use a double dash ("--") to mark the end of argument processing.
1910 ** The "backtrace" command now supports a number of options that
1911 allow overriding relevant global print settings as set by "set
1912 backtrace" and "set print" subcommands:
1914 -entry-values no|only|preferred|if-needed|both|compact|default
1915 -frame-arguments all|scalars|none
1916 -raw-frame-arguments [on|off]
1917 -frame-info auto|source-line|location|source-and-location
1918 |location-and-address|short-location
1920 -past-entry [on|off]
1922 In addition, the full/no-filters/hide qualifiers are now also
1923 exposed as command options too:
1929 ** The "frame apply", "tfaas" and "faas" commands similarly now
1930 support the following options:
1933 -past-entry [on|off]
1935 ** The new "info sources" options -dirname and -basename options
1936 are using the standard '-OPT' infrastructure.
1938 All options above can also be abbreviated. The argument of boolean
1939 (on/off) options can be 0/1 too, and also the argument is assumed
1940 "on" if omitted. This allows writing compact command invocations,
1943 (gdb) p -ra -p -o 0 -- *myptr
1945 The above is equivalent to:
1947 (gdb) print -raw-values -pretty -object off -- *myptr
1949 ** The "info types" command now supports the '-q' flag to disable
1950 printing of some header information in a similar fashion to "info
1951 variables" and "info functions".
1953 ** The "info variables", "info functions", and "whereis" commands
1954 now take a '-n' flag that excludes non-debug symbols (symbols
1955 from the symbol table, not from the debug info such as DWARF)
1958 * Completion improvements
1960 ** GDB can now complete the options of the "thread apply all" and
1961 "taas" commands, and their "-ascending" option can now be
1964 ** GDB can now complete the options of the "info threads", "info
1965 functions", "info variables", "info locals", and "info args"
1968 ** GDB can now complete the options of the "compile file" and
1969 "compile code" commands. The "compile file" command now
1970 completes on filenames.
1972 ** GDB can now complete the backtrace command's
1973 "full/no-filters/hide" qualifiers.
1975 * In settings, you can now abbreviate "unlimited".
1977 E.g., "set print elements u" is now equivalent to "set print
1978 elements unlimited".
1983 This lists all the possible completions for the rest of the line, if it
1984 were to be given as a command itself. This is intended for use by MI
1985 frontends in cases when separate CLI and MI channels cannot be used.
1987 -catch-throw, -catch-rethrow, and -catch-catch
1988 These can be used to catch C++ exceptions in a similar fashion to
1989 the CLI commands 'catch throw', 'catch rethrow', and 'catch catch'.
1991 -symbol-info-functions, -symbol-info-types, and -symbol-info-variables
1992 These commands are the MI equivalent of the CLI commands 'info
1993 functions', 'info types', and 'info variables' respectively.
1995 -symbol-info-modules, this is the MI equivalent of the CLI 'info
1998 -symbol-info-module-functions and -symbol-info-module-variables.
1999 These commands are the MI equivalent of the CLI commands 'info
2000 module functions' and 'info module variables'.
2004 ** The default version of the MI interpreter is now 3 (-i=mi3).
2006 ** The output of information about multi-location breakpoints (which is
2007 syntactically incorrect in MI 2) has changed in MI 3. This affects
2008 the following commands and events:
2012 - =breakpoint-created
2013 - =breakpoint-modified
2015 The -fix-multi-location-breakpoint-output command can be used to enable
2016 this behavior with previous MI versions.
2018 ** Backtraces and frames include a new optional field addr_flags which is
2019 given after the addr field. On AArch64 this contains PAC if the address
2020 has been masked in the frame. On all other targets the field is not
2025 The testsuite now creates the files gdb.cmd (containing the arguments
2026 used to launch GDB) and gdb.in (containing all the commands sent to
2027 GDB) in the output directory for each test script. Multiple invocations
2028 are appended with .1, .2, .3 etc.
2030 * Building GDB and GDBserver now requires GNU make >= 3.82.
2032 Using another implementation of the make program or an earlier version of
2033 GNU make to build GDB or GDBserver is not supported.
2035 * Building GDB now requires GNU readline >= 7.0.
2037 GDB now bundles GNU readline 8.0, but if you choose to use
2038 --with-system-readline, only readline >= 7.0 can be used.
2040 * The TUI SingleKey keymap is now named "SingleKey". This can be used
2041 from .inputrc to bind keys in this keymap. This feature is only
2042 available when gdb is built against GNU readline 8.0 or later.
2044 * Removed targets and native configurations
2046 GDB no longer supports debugging the Cell Broadband Engine. This includes
2047 both debugging standalone Cell/B.E. SPU applications and integrated debugging
2048 of Cell/B.E. applications that use both the PPU and SPU architectures.
2054 * Removed targets and native configurations
2056 Solaris 10 i?86-*-solaris2.10, x86_64-*-solaris2.10,
2057 sparc*-*-solaris2.10
2059 *** Changes in GDB 8.3
2061 * GDB and GDBserver now support access to additional registers on
2062 PowerPC GNU/Linux targets: PPR, DSCR, TAR, EBB/PMU registers, and
2065 * GDB now has experimental support for the compilation and injection of
2066 C++ source code into the inferior. This beta release does not include
2067 support for several language features, such as templates, constructors,
2070 This feature requires GCC 7.1 or higher built with libcp1.so
2073 * GDB and GDBserver now support IPv6 connections. IPv6 addresses
2074 can be passed using the '[ADDRESS]:PORT' notation, or the regular
2075 'ADDRESS:PORT' method.
2077 * DWARF index cache: GDB can now automatically save indices of DWARF
2078 symbols on disk to speed up further loading of the same binaries.
2080 * Ada task switching is now supported on aarch64-elf targets when
2081 debugging a program using the Ravenscar Profile. For more information,
2082 see the "Tasking Support when using the Ravenscar Profile" section
2083 in the GDB user manual.
2085 * GDB in batch mode now exits with status 1 if the last command to be
2088 * The RISC-V target now supports target descriptions.
2090 * System call catchpoints now support system call aliases on FreeBSD.
2091 When the ABI of a system call changes in FreeBSD, this is
2092 implemented by leaving a compatibility system call using the old ABI
2093 at the existing number and allocating a new system call number for
2094 the new ABI. For example, FreeBSD 12 altered the layout of 'struct
2095 kevent' used by the 'kevent' system call. As a result, FreeBSD 12
2096 kernels ship with both 'kevent' and 'freebsd11_kevent' system calls.
2097 The 'freebsd11_kevent' system call is assigned an alias of 'kevent'
2098 so that a system call catchpoint for the 'kevent' system call will
2099 catch invocations of both the 'kevent' and 'freebsd11_kevent'
2100 binaries. This ensures that 'kevent' system calls are caught for
2101 binaries using either the old or new ABIs.
2103 * Terminal styling is now available for the CLI and the TUI. GNU
2104 Source Highlight can additionally be used to provide styling of
2105 source code snippets. See the "set style" commands, below, for more
2108 * Removed support for old demangling styles arm, edg, gnu, hp and
2113 set debug compile-cplus-types
2114 show debug compile-cplus-types
2115 Control the display of debug output about type conversion in the
2116 C++ compile feature. Commands have no effect while compiling
2117 for other languages.
2121 Control whether debug output about files/functions skipping is
2124 frame apply [all | COUNT | -COUNT | level LEVEL...] [FLAG]... COMMAND
2125 Apply a command to some frames.
2126 FLAG arguments allow to control what output to produce and how to handle
2127 errors raised when applying COMMAND to a frame.
2130 Apply a command to all threads (ignoring errors and empty output).
2131 Shortcut for 'thread apply all -s COMMAND'.
2134 Apply a command to all frames (ignoring errors and empty output).
2135 Shortcut for 'frame apply all -s COMMAND'.
2138 Apply a command to all frames of all threads (ignoring errors and empty
2140 Shortcut for 'thread apply all -s frame apply all -s COMMAND'.
2142 maint set dwarf unwinders (on|off)
2143 maint show dwarf unwinders
2144 Control whether DWARF unwinders can be used.
2147 Display a list of open files for a process.
2151 Changes to the "frame", "select-frame", and "info frame" CLI commands.
2152 These commands all now take a frame specification which
2153 is either a frame level, or one of the keywords 'level', 'address',
2154 'function', or 'view' followed by a parameter. Selecting a frame by
2155 address, or viewing a frame outside the current backtrace now
2156 requires the use of a keyword. Selecting a frame by level is
2157 unchanged. The MI comment "-stack-select-frame" is unchanged.
2159 target remote FILENAME
2160 target extended-remote FILENAME
2161 If FILENAME is a Unix domain socket, GDB will attempt to connect
2162 to this socket instead of opening FILENAME as a character device.
2164 info args [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2165 info functions [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2166 info locals [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2167 info variables [-q] [-t TYPEREGEXP] [NAMEREGEXP]
2168 These commands can now print only the searched entities
2169 matching the provided regexp(s), giving a condition
2170 on the entity names or entity types. The flag -q disables
2171 printing headers or informations messages.
2177 These commands now determine the syntax for the shown entities
2178 according to the language chosen by `set language'. In particular,
2179 `set language auto' means to automatically choose the language of
2182 thread apply [all | COUNT | -COUNT] [FLAG]... COMMAND
2183 The 'thread apply' command accepts new FLAG arguments.
2184 FLAG arguments allow to control what output to produce and how to handle
2185 errors raised when applying COMMAND to a thread.
2187 set tui tab-width NCHARS
2188 show tui tab-width NCHARS
2189 "set tui tab-width" replaces the "tabset" command, which has been deprecated.
2191 set style enabled [on|off]
2193 Enable or disable terminal styling. Styling is enabled by default
2194 on most hosts, but disabled by default when in batch mode.
2196 set style sources [on|off]
2198 Enable or disable source code styling. Source code styling is
2199 enabled by default, but only takes effect if styling in general is
2200 enabled, and if GDB was linked with GNU Source Highlight.
2202 set style filename foreground COLOR
2203 set style filename background COLOR
2204 set style filename intensity VALUE
2205 Control the styling of file names.
2207 set style function foreground COLOR
2208 set style function background COLOR
2209 set style function intensity VALUE
2210 Control the styling of function names.
2212 set style variable foreground COLOR
2213 set style variable background COLOR
2214 set style variable intensity VALUE
2215 Control the styling of variable names.
2217 set style address foreground COLOR
2218 set style address background COLOR
2219 set style address intensity VALUE
2220 Control the styling of addresses.
2224 ** The '-data-disassemble' MI command now accepts an '-a' option to
2225 disassemble the whole function surrounding the given program
2226 counter value or function name. Support for this feature can be
2227 verified by using the "-list-features" command, which should
2228 contain "data-disassemble-a-option".
2230 ** Command responses and notifications that include a frame now include
2231 the frame's architecture in a new "arch" attribute.
2233 * New native configurations
2235 GNU/Linux/RISC-V riscv*-*-linux*
2236 FreeBSD/riscv riscv*-*-freebsd*
2240 GNU/Linux/RISC-V riscv*-*-linux*
2241 CSKY ELF csky*-*-elf
2242 CSKY GNU/LINUX csky*-*-linux
2243 FreeBSD/riscv riscv*-*-freebsd*
2245 GNU/Linux/OpenRISC or1k*-*-linux*
2249 GDB no longer supports native debugging on versions of MS-Windows
2254 ** GDB no longer supports Python versions less than 2.6.
2256 ** The gdb.Inferior type has a new 'progspace' property, which is the program
2257 space associated to that inferior.
2259 ** The gdb.Progspace type has a new 'objfiles' method, which returns the list
2260 of objfiles associated to that program space.
2262 ** gdb.SYMBOL_LOC_COMMON_BLOCK, gdb.SYMBOL_MODULE_DOMAIN, and
2263 gdb.SYMBOL_COMMON_BLOCK_DOMAIN were added to reflect changes to
2266 ** gdb.SYMBOL_VARIABLES_DOMAIN, gdb.SYMBOL_FUNCTIONS_DOMAIN, and
2267 gdb.SYMBOL_TYPES_DOMAIN are now deprecated. These were never
2268 correct and did not work properly.
2270 ** The gdb.Value type has a new constructor, which is used to construct a
2271 gdb.Value from a Python buffer object and a gdb.Type.
2277 Enable or disable the undefined behavior sanitizer. This is
2278 disabled by default, but passing --enable-ubsan=yes or
2279 --enable-ubsan=auto to configure will enable it. Enabling this can
2280 cause a performance penalty. The undefined behavior sanitizer was
2281 first introduced in GCC 4.9.
2283 *** Changes in GDB 8.2
2285 * The 'set disassembler-options' command now supports specifying options
2286 for the MIPS target.
2288 * The 'symbol-file' command now accepts an '-o' option to add a relative
2289 offset to all sections.
2291 * Similarly, the 'add-symbol-file' command also accepts an '-o' option to add
2292 a relative offset to all sections, but it allows to override the load
2293 address of individual sections using '-s'.
2295 * The 'add-symbol-file' command no longer requires the second argument
2296 (address of the text section).
2298 * The endianness used with the 'set endian auto' mode in the absence of
2299 an executable selected for debugging is now the last endianness chosen
2300 either by one of the 'set endian big' and 'set endian little' commands
2301 or by inferring from the last executable used, rather than the startup
2304 * The pager now allows a "c" response, meaning to disable the pager
2305 for the rest of the current command.
2307 * The commands 'info variables/functions/types' now show the source line
2308 numbers of symbol definitions when available.
2310 * 'info proc' now works on running processes on FreeBSD systems and core
2311 files created on FreeBSD systems.
2313 * C expressions can now use _Alignof, and C++ expressions can now use
2316 * Support for SVE on AArch64 Linux. Note that GDB does not detect changes to
2317 the vector length while the process is running.
2323 Control display of debugging info regarding the FreeBSD native target.
2325 set|show varsize-limit
2326 This new setting allows the user to control the maximum size of Ada
2327 objects being printed when those objects have a variable type,
2328 instead of that maximum size being hardcoded to 65536 bytes.
2330 set|show record btrace cpu
2331 Controls the processor to be used for enabling errata workarounds for
2332 branch trace decode.
2334 maint check libthread-db
2335 Run integrity checks on the current inferior's thread debugging
2338 maint set check-libthread-db (on|off)
2339 maint show check-libthread-db
2340 Control whether to run integrity checks on inferior specific thread
2341 debugging libraries as they are loaded. The default is not to
2342 perform such checks.
2346 ** Type alignment is now exposed via the "align" attribute of a gdb.Type.
2348 ** The commands attached to a breakpoint can be set by assigning to
2349 the breakpoint's "commands" field.
2351 ** gdb.execute can now execute multi-line gdb commands.
2353 ** The new functions gdb.convenience_variable and
2354 gdb.set_convenience_variable can be used to get and set the value
2355 of convenience variables.
2357 ** A gdb.Parameter will no longer print the "set" help text on an
2358 ordinary "set"; instead by default a "set" will be silent unless
2359 the get_set_string method returns a non-empty string.
2363 RiscV ELF riscv*-*-elf
2365 * Removed targets and native configurations
2367 m88k running OpenBSD m88*-*-openbsd*
2368 SH-5/SH64 ELF sh64-*-elf*, SH-5/SH64 support in sh*
2369 SH-5/SH64 running GNU/Linux SH-5/SH64 support in sh*-*-linux*
2370 SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd*
2372 * Aarch64/Linux hardware watchpoints improvements
2374 Hardware watchpoints on unaligned addresses are now properly
2375 supported when running Linux kernel 4.10 or higher: read and access
2376 watchpoints are no longer spuriously missed, and all watchpoints
2377 lengths between 1 and 8 bytes are supported. On older kernels,
2378 watchpoints set on unaligned addresses are no longer missed, with
2379 the tradeoff that there is a possibility of false hits being
2384 --enable-codesign=CERT
2385 This can be used to invoke "codesign -s CERT" after building gdb.
2386 This option is useful on macOS, where code signing is required for
2387 gdb to work properly.
2389 --disable-gdbcli has been removed
2390 This is now silently accepted, but does nothing.
2392 *** Changes in GDB 8.1
2394 * GDB now supports dynamically creating arbitrary register groups specified
2395 in XML target descriptions. This allows for finer grain grouping of
2396 registers on systems with a large amount of registers.
2398 * The 'ptype' command now accepts a '/o' flag, which prints the
2399 offsets and sizes of fields in a struct, like the pahole(1) tool.
2401 * New "--readnever" command line option instructs GDB to not read each
2402 symbol file's symbolic debug information. This makes startup faster
2403 but at the expense of not being able to perform symbolic debugging.
2404 This option is intended for use cases where symbolic debugging will
2405 not be used, e.g., when you only need to dump the debuggee's core.
2407 * GDB now uses the GNU MPFR library, if available, to emulate target
2408 floating-point arithmetic during expression evaluation when the target
2409 uses different floating-point formats than the host. At least version
2410 3.1 of GNU MPFR is required.
2412 * GDB now supports access to the guarded-storage-control registers and the
2413 software-based guarded-storage broadcast control registers on IBM z14.
2415 * On Unix systems, GDB now supports transmitting environment variables
2416 that are to be set or unset to GDBserver. These variables will
2417 affect the environment to be passed to the remote inferior.
2419 To inform GDB of environment variables that are to be transmitted to
2420 GDBserver, use the "set environment" command. Only user set
2421 environment variables are sent to GDBserver.
2423 To inform GDB of environment variables that are to be unset before
2424 the remote inferior is started by the GDBserver, use the "unset
2425 environment" command.
2427 * Completion improvements
2429 ** GDB can now complete function parameters in linespecs and
2430 explicit locations without quoting. When setting breakpoints,
2431 quoting around functions names to help with TAB-completion is
2432 generally no longer necessary. For example, this now completes
2435 (gdb) b function(in[TAB]
2436 (gdb) b function(int)
2438 Related, GDB is no longer confused with completing functions in
2439 C++ anonymous namespaces:
2442 (gdb) b (anonymous namespace)::[TAB][TAB]
2443 (anonymous namespace)::a_function()
2444 (anonymous namespace)::b_function()
2446 ** GDB now has much improved linespec and explicit locations TAB
2447 completion support, that better understands what you're
2448 completing and offers better suggestions. For example, GDB no
2449 longer offers data symbols as possible completions when you're
2450 setting a breakpoint.
2452 ** GDB now TAB-completes label symbol names.
2454 ** The "complete" command now mimics TAB completion accurately.
2456 * New command line options (gcore)
2459 Dump all memory mappings.
2461 * Breakpoints on C++ functions are now set on all scopes by default
2463 By default, breakpoints on functions/methods are now interpreted as
2464 specifying all functions with the given name ignoring missing
2465 leading scopes (namespaces and classes).
2467 For example, assuming a C++ program with symbols named:
2472 both commands "break func()" and "break B::func()" set a breakpoint
2475 You can use the new flag "-qualified" to override this. This makes
2476 GDB interpret the specified function name as a complete
2477 fully-qualified name instead. For example, using the same C++
2478 program, the "break -q B::func" command sets a breakpoint on
2479 "B::func", only. A parameter has been added to the Python
2480 gdb.Breakpoint constructor to achieve the same result when creating
2481 a breakpoint from Python.
2483 * Breakpoints on functions marked with C++ ABI tags
2485 GDB can now set breakpoints on functions marked with C++ ABI tags
2486 (e.g., [abi:cxx11]). See here for a description of ABI tags:
2487 https://developers.redhat.com/blog/2015/02/05/gcc5-and-the-c11-abi/
2489 Functions with a C++11 abi tag are demangled/displayed like this:
2491 function[abi:cxx11](int)
2494 You can now set a breakpoint on such functions simply as if they had
2497 (gdb) b function(int)
2499 Or if you need to disambiguate between tags, like:
2501 (gdb) b function[abi:other_tag](int)
2503 Tab completion was adjusted accordingly as well.
2507 ** New events gdb.new_inferior, gdb.inferior_deleted, and
2508 gdb.new_thread are emitted. See the manual for further
2509 description of these.
2511 ** A new function, "gdb.rbreak" has been added to the Python API.
2512 This function allows the setting of a large number of breakpoints
2513 via a regex pattern in Python. See the manual for further details.
2515 ** Python breakpoints can now accept explicit locations. See the
2516 manual for a further description of this feature.
2519 * New features in the GDB remote stub, GDBserver
2521 ** GDBserver is now able to start inferior processes with a
2522 specified initial working directory.
2524 The user can set the desired working directory to be used from
2525 GDB using the new "set cwd" command.
2527 ** New "--selftest" command line option runs some GDBserver self
2528 tests. These self tests are disabled in releases.
2530 ** On Unix systems, GDBserver now does globbing expansion and variable
2531 substitution in inferior command line arguments.
2533 This is done by starting inferiors using a shell, like GDB does.
2534 See "set startup-with-shell" in the user manual for how to disable
2535 this from GDB when using "target extended-remote". When using
2536 "target remote", you can disable the startup with shell by using the
2537 new "--no-startup-with-shell" GDBserver command line option.
2539 ** On Unix systems, GDBserver now supports receiving environment
2540 variables that are to be set or unset from GDB. These variables
2541 will affect the environment to be passed to the inferior.
2543 * When catching an Ada exception raised with a message, GDB now prints
2544 the message in the catchpoint hit notification. In GDB/MI mode, that
2545 information is provided as an extra field named "exception-message"
2546 in the *stopped notification.
2548 * Trait objects can now be inspected When debugging Rust code. This
2549 requires compiler support which will appear in Rust 1.24.
2551 * New remote packets
2553 QEnvironmentHexEncoded
2554 Inform GDBserver of an environment variable that is to be passed to
2555 the inferior when starting it.
2558 Inform GDBserver of an environment variable that is to be unset
2559 before starting the remote inferior.
2562 Inform GDBserver that the environment should be reset (i.e.,
2563 user-set environment variables should be unset).
2566 Indicates whether the inferior must be started with a shell or not.
2569 Tell GDBserver that the inferior to be started should use a specific
2572 * The "maintenance print c-tdesc" command now takes an optional
2573 argument which is the file name of XML target description.
2575 * The "maintenance selftest" command now takes an optional argument to
2576 filter the tests to be run.
2578 * The "enable", and "disable" commands now accept a range of
2579 breakpoint locations, e.g. "enable 1.3-5".
2584 Set and show the current working directory for the inferior.
2586 set|show compile-gcc
2587 Set and show compilation command used for compiling and injecting code
2588 with the 'compile' commands.
2590 set debug separate-debug-file
2591 show debug separate-debug-file
2592 Control the display of debug output about separate debug file search.
2594 set dump-excluded-mappings
2595 show dump-excluded-mappings
2596 Control whether mappings marked with the VM_DONTDUMP flag should be
2597 dumped when generating a core file.
2599 maint info selftests
2600 List the registered selftests.
2603 Start the debugged program stopping at the first instruction.
2606 Control display of debugging messages related to OpenRISC targets.
2608 set|show print type nested-type-limit
2609 Set and show the limit of nesting level for nested types that the
2610 type printer will show.
2612 * TUI Single-Key mode now supports two new shortcut keys: `i' for stepi and
2615 * Safer/improved support for debugging with no debug info
2617 GDB no longer assumes functions with no debug information return
2620 This means that GDB now refuses to call such functions unless you
2621 tell it the function's type, by either casting the call to the
2622 declared return type, or by casting the function to a function
2623 pointer of the right type, and calling that:
2625 (gdb) p getenv ("PATH")
2626 'getenv' has unknown return type; cast the call to its declared return type
2627 (gdb) p (char *) getenv ("PATH")
2628 $1 = 0x7fffffffe "/usr/local/bin:/"...
2629 (gdb) p ((char * (*) (const char *)) getenv) ("PATH")
2630 $2 = 0x7fffffffe "/usr/local/bin:/"...
2632 Similarly, GDB no longer assumes that global variables with no debug
2633 info have type 'int', and refuses to print the variable's value
2634 unless you tell it the variable's type:
2637 'var' has unknown type; cast it to its declared type
2641 * New native configurations
2643 FreeBSD/aarch64 aarch64*-*-freebsd*
2644 FreeBSD/arm arm*-*-freebsd*
2648 FreeBSD/aarch64 aarch64*-*-freebsd*
2649 FreeBSD/arm arm*-*-freebsd*
2650 OpenRISC ELF or1k*-*-elf
2652 * Removed targets and native configurations
2654 Solaris 2.0-9 i?86-*-solaris2.[0-9], sparc*-*-solaris2.[0-9]
2656 *** Changes in GDB 8.0
2658 * GDB now supports access to the PKU register on GNU/Linux. The register is
2659 added by the Memory Protection Keys for Userspace feature which will be
2660 available in future Intel CPUs.
2662 * GDB now supports C++11 rvalue references.
2666 ** New functions to start, stop and access a running btrace recording.
2667 ** Rvalue references are now supported in gdb.Type.
2669 * GDB now supports recording and replaying rdrand and rdseed Intel 64
2672 * Building GDB and GDBserver now requires a C++11 compiler.
2674 For example, GCC 4.8 or later.
2676 It is no longer possible to build GDB or GDBserver with a C
2677 compiler. The --disable-build-with-cxx configure option has been
2680 * Building GDB and GDBserver now requires GNU make >= 3.81.
2682 It is no longer supported to build GDB or GDBserver with another
2683 implementation of the make program or an earlier version of GNU make.
2685 * Native debugging on MS-Windows supports command-line redirection
2687 Command-line arguments used for starting programs on MS-Windows can
2688 now include redirection symbols supported by native Windows shells,
2689 such as '<', '>', '>>', '2>&1', etc. This affects GDB commands such
2690 as "run", "start", and "set args", as well as the corresponding MI
2693 * Support for thread names on MS-Windows.
2695 GDB now catches and handles the special exception that programs
2696 running on MS-Windows use to assign names to threads in the
2699 * Support for Java programs compiled with gcj has been removed.
2701 * User commands now accept an unlimited number of arguments.
2702 Previously, only up to 10 was accepted.
2704 * The "eval" command now expands user-defined command arguments.
2706 This makes it easier to process a variable number of arguments:
2711 eval "print $arg%d", $i
2716 * Target descriptions can now describe registers for sparc32 and sparc64.
2718 * GDB now supports DWARF version 5 (debug information format).
2719 Its .debug_names index is not yet supported.
2721 * New native configurations
2723 FreeBSD/mips mips*-*-freebsd
2727 Synopsys ARC arc*-*-elf32
2728 FreeBSD/mips mips*-*-freebsd
2730 * Removed targets and native configurations
2732 Alpha running FreeBSD alpha*-*-freebsd*
2733 Alpha running GNU/kFreeBSD alpha*-*-kfreebsd*-gnu
2738 Erases all the flash memory regions reported by the target.
2740 maint print arc arc-instruction address
2741 Print internal disassembler information about instruction at a given address.
2745 set disassembler-options
2746 show disassembler-options
2747 Controls the passing of target specific information to the disassembler.
2748 If it is necessary to specify more than one disassembler option then
2749 multiple options can be placed together into a comma separated list.
2750 The default value is the empty string. Currently, the only supported
2751 targets are ARM, PowerPC and S/390.
2756 Erases all the flash memory regions reported by the target. This is
2757 equivalent to the CLI command flash-erase.
2759 -file-list-shared-libraries
2760 List the shared libraries in the program. This is
2761 equivalent to the CLI command "info shared".
2764 Catchpoints stopping the program when Ada exceptions are
2765 handled. This is equivalent to the CLI command "catch handlers".
2767 *** Changes in GDB 7.12
2769 * GDB and GDBserver now build with a C++ compiler by default.
2771 The --enable-build-with-cxx configure option is now enabled by
2772 default. One must now explicitly configure with
2773 --disable-build-with-cxx in order to build with a C compiler. This
2774 option will be removed in a future release.
2776 * GDBserver now supports recording btrace without maintaining an active
2779 * GDB now supports a negative repeat count in the 'x' command to examine
2780 memory backward from the given address. For example:
2783 #0 Func1 (n=42, p=0x40061c "hogehoge") at main.cpp:4
2784 #1 0x400580 in main (argc=1, argv=0x7fffffffe5c8) at main.cpp:8
2785 (gdb) x/-5i 0x0000000000400580
2786 0x40056a <main(int, char**)+8>: mov %edi,-0x4(%rbp)
2787 0x40056d <main(int, char**)+11>: mov %rsi,-0x10(%rbp)
2788 0x400571 <main(int, char**)+15>: mov $0x40061c,%esi
2789 0x400576 <main(int, char**)+20>: mov $0x2a,%edi
2790 0x40057b <main(int, char**)+25>:
2791 callq 0x400536 <Func1(int, char const*)>
2793 * Fortran: Support structures with fields of dynamic types and
2794 arrays of dynamic types.
2796 * The symbol dumping maintenance commands have new syntax.
2797 maint print symbols [-pc address] [--] [filename]
2798 maint print symbols [-objfile objfile] [-source source] [--] [filename]
2799 maint print psymbols [-objfile objfile] [-pc address] [--] [filename]
2800 maint print psymbols [-objfile objfile] [-source source] [--] [filename]
2801 maint print msymbols [-objfile objfile] [--] [filename]
2803 * GDB now supports multibit bitfields and enums in target register
2806 * New Python-based convenience function $_as_string(val), which returns
2807 the textual representation of a value. This function is especially
2808 useful to obtain the text label of an enum value.
2810 * Intel MPX bound violation handling.
2812 Segmentation faults caused by a Intel MPX boundary violation
2813 now display the kind of violation (upper or lower), the memory
2814 address accessed and the memory bounds, along with the usual
2815 signal received and code location.
2819 Program received signal SIGSEGV, Segmentation fault
2820 Upper bound violation while accessing address 0x7fffffffc3b3
2821 Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
2822 0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
2824 * Rust language support.
2825 GDB now supports debugging programs written in the Rust programming
2826 language. See https://www.rust-lang.org/ for more information about
2829 * Support for running interpreters on specified input/output devices
2831 GDB now supports a new mechanism that allows frontends to provide
2832 fully featured GDB console views, as a better alternative to
2833 building such views on top of the "-interpreter-exec console"
2834 command. See the new "new-ui" command below. With that command,
2835 frontends can now start GDB in the traditional command-line mode
2836 running in an embedded terminal emulator widget, and create a
2837 separate MI interpreter running on a specified i/o device. In this
2838 way, GDB handles line editing, history, tab completion, etc. in the
2839 console all by itself, and the GUI uses the separate MI interpreter
2840 for its own control and synchronization, invisible to the command
2843 * The "catch syscall" command catches groups of related syscalls.
2845 The "catch syscall" command now supports catching a group of related
2846 syscalls using the 'group:' or 'g:' prefix.
2851 skip -gfile file-glob-pattern
2852 skip -function function
2853 skip -rfunction regular-expression
2854 A generalized form of the skip command, with new support for
2855 glob-style file names and regular expressions for function names.
2856 Additionally, a file spec and a function spec may now be combined.
2858 maint info line-table REGEXP
2859 Display the contents of GDB's internal line table data structure.
2862 Run any GDB unit tests that were compiled in.
2865 Start a new user interface instance running INTERP as interpreter,
2866 using the TTY file for input/output.
2870 ** gdb.Breakpoint objects have a new attribute "pending", which
2871 indicates whether the breakpoint is pending.
2872 ** Three new breakpoint-related events have been added:
2873 gdb.breakpoint_created, gdb.breakpoint_modified, and
2874 gdb.breakpoint_deleted.
2876 signal-event EVENTID
2877 Signal ("set") the given MS-Windows event object. This is used in
2878 conjunction with the Windows JIT debugging (AeDebug) support, where
2879 the OS suspends a crashing process until a debugger can attach to
2880 it. Resuming the crashing process, in order to debug it, is done by
2881 signalling an event.
2883 * Support for tracepoints and fast tracepoints on s390-linux and s390x-linux
2884 was added in GDBserver, including JIT compiling fast tracepoint's
2885 conditional expression bytecode into native code.
2887 * Support for various remote target protocols and ROM monitors has
2890 target m32rsdi Remote M32R debugging over SDI
2891 target mips MIPS remote debugging protocol
2892 target pmon PMON ROM monitor
2893 target ddb NEC's DDB variant of PMON for Vr4300
2894 target rockhopper NEC RockHopper variant of PMON
2895 target lsi LSI variant of PMO
2897 * Support for tracepoints and fast tracepoints on powerpc-linux,
2898 powerpc64-linux, and powerpc64le-linux was added in GDBserver,
2899 including JIT compiling fast tracepoint's conditional expression
2900 bytecode into native code.
2902 * MI async record =record-started now includes the method and format used for
2903 recording. For example:
2905 =record-started,thread-group="i1",method="btrace",format="bts"
2907 * MI async record =thread-selected now includes the frame field. For example:
2909 =thread-selected,id="3",frame={level="0",addr="0x00000000004007c0"}
2913 Andes NDS32 nds32*-*-elf
2915 *** Changes in GDB 7.11
2917 * GDB now supports debugging kernel-based threads on FreeBSD.
2919 * Per-inferior thread numbers
2921 Thread numbers are now per inferior instead of global. If you're
2922 debugging multiple inferiors, GDB displays thread IDs using a
2923 qualified INF_NUM.THR_NUM form. For example:
2927 1.1 Thread 0x7ffff7fc2740 (LWP 8155) (running)
2928 1.2 Thread 0x7ffff7fc1700 (LWP 8168) (running)
2929 * 2.1 Thread 0x7ffff7fc2740 (LWP 8157) (running)
2930 2.2 Thread 0x7ffff7fc1700 (LWP 8190) (running)
2932 As consequence, thread numbers as visible in the $_thread
2933 convenience variable and in Python's InferiorThread.num attribute
2934 are no longer unique between inferiors.
2936 GDB now maintains a second thread ID per thread, referred to as the
2937 global thread ID, which is the new equivalent of thread numbers in
2938 previous releases. See also $_gthread below.
2940 For backwards compatibility, MI's thread IDs always refer to global
2943 * Commands that accept thread IDs now accept the qualified
2944 INF_NUM.THR_NUM form as well. For example:
2947 [Switching to thread 2.1 (Thread 0x7ffff7fc2740 (LWP 8157))] (running)
2950 * In commands that accept a list of thread IDs, you can now refer to
2951 all threads of an inferior using a star wildcard. GDB accepts
2952 "INF_NUM.*", to refer to all threads of inferior INF_NUM, and "*" to
2953 refer to all threads of the current inferior. For example, "info
2956 * You can use "info threads -gid" to display the global thread ID of
2959 * The new convenience variable $_gthread holds the global number of
2962 * The new convenience variable $_inferior holds the number of the
2965 * GDB now displays the ID and name of the thread that hit a breakpoint
2966 or received a signal, if your program is multi-threaded. For
2969 Thread 3 "bar" hit Breakpoint 1 at 0x40087a: file program.c, line 20.
2970 Thread 1 "main" received signal SIGINT, Interrupt.
2972 * Record btrace now supports non-stop mode.
2974 * Support for tracepoints on aarch64-linux was added in GDBserver.
2976 * The 'record instruction-history' command now indicates speculative execution
2977 when using the Intel Processor Trace recording format.
2979 * GDB now allows users to specify explicit locations, bypassing
2980 the linespec parser. This feature is also available to GDB/MI
2983 * Multi-architecture debugging is supported on AArch64 GNU/Linux.
2984 GDB now is able to debug both AArch64 applications and ARM applications
2987 * Support for fast tracepoints on aarch64-linux was added in GDBserver,
2988 including JIT compiling fast tracepoint's conditional expression bytecode
2991 * GDB now supports displaced stepping on AArch64 GNU/Linux.
2993 * "info threads", "info inferiors", "info display", "info checkpoints"
2994 and "maint info program-spaces" now list the corresponding items in
2995 ascending ID order, for consistency with all other "info" commands.
2997 * In Ada, the overloads selection menu has been enhanced to display the
2998 parameter types and the return types for the matching overloaded subprograms.
3002 maint set target-non-stop (on|off|auto)
3003 maint show target-non-stop
3004 Control whether GDB targets always operate in non-stop mode even if
3005 "set non-stop" is "off". The default is "auto", meaning non-stop
3006 mode is enabled if supported by the target.
3008 maint set bfd-sharing
3009 maint show bfd-sharing
3010 Control the reuse of bfd objects.
3013 show debug bfd-cache
3014 Control display of debugging info regarding bfd caching.
3018 Control display of debugging info regarding FreeBSD threads.
3020 set remote multiprocess-extensions-packet
3021 show remote multiprocess-extensions-packet
3022 Set/show the use of the remote protocol multiprocess extensions.
3024 set remote thread-events
3025 show remote thread-events
3026 Set/show the use of thread create/exit events.
3028 set ada print-signatures on|off
3029 show ada print-signatures"
3030 Control whether parameter types and return types are displayed in overloads
3031 selection menus. It is activated (@code{on}) by default.
3035 Controls the maximum size of memory, in bytes, that GDB will
3036 allocate for value contents. Prevents incorrect programs from
3037 causing GDB to allocate overly large buffers. Default is 64k.
3039 * The "disassemble" command accepts a new modifier: /s.
3040 It prints mixed source+disassembly like /m with two differences:
3041 - disassembled instructions are now printed in program order, and
3042 - and source for all relevant files is now printed.
3043 The "/m" option is now considered deprecated: its "source-centric"
3044 output hasn't proved useful in practice.
3046 * The "record instruction-history" command accepts a new modifier: /s.
3047 It behaves exactly like /m and prints mixed source+disassembly.
3049 * The "set scheduler-locking" command supports a new mode "replay".
3050 It behaves like "off" in record mode and like "on" in replay mode.
3052 * Support for various ROM monitors has been removed:
3054 target dbug dBUG ROM monitor for Motorola ColdFire
3055 target picobug Motorola picobug monitor
3056 target dink32 DINK32 ROM monitor for PowerPC
3057 target m32r Renesas M32R/D ROM monitor
3058 target mon2000 mon2000 ROM monitor
3059 target ppcbug PPCBUG ROM monitor for PowerPC
3061 * Support for reading/writing memory and extracting values on architectures
3062 whose memory is addressable in units of any integral multiple of 8 bits.
3065 Allows to break when an Ada exception is handled.
3067 * New remote packets
3070 Indicates that an exec system call was executed.
3072 exec-events feature in qSupported
3073 The qSupported packet allows GDB to request support for exec
3074 events using the new 'gdbfeature' exec-event, and the qSupported
3075 response can contain the corresponding 'stubfeature'. Set and
3076 show commands can be used to display whether these features are enabled.
3079 Equivalent to interrupting with the ^C character, but works in
3082 thread created stop reason (T05 create:...)
3083 Indicates that the thread was just created and is stopped at entry.
3085 thread exit stop reply (w exitcode;tid)
3086 Indicates that the thread has terminated.
3089 Enables/disables thread create and exit event reporting. For
3090 example, this is used in non-stop mode when GDB stops a set of
3091 threads and synchronously waits for the their corresponding stop
3092 replies. Without exit events, if one of the threads exits, GDB
3093 would hang forever not knowing that it should no longer expect a
3094 stop for that same thread.
3097 Indicates that there are no resumed threads left in the target (all
3098 threads are stopped). The remote stub reports support for this stop
3099 reply to GDB's qSupported query.
3102 Enables/disables catching syscalls from the inferior process.
3103 The remote stub reports support for this packet to GDB's qSupported query.
3105 syscall_entry stop reason
3106 Indicates that a syscall was just called.
3108 syscall_return stop reason
3109 Indicates that a syscall just returned.
3111 * Extended-remote exec events
3113 ** GDB now has support for exec events on extended-remote Linux targets.
3114 For such targets with Linux kernels 2.5.46 and later, this enables
3115 follow-exec-mode and exec catchpoints.
3117 set remote exec-event-feature-packet
3118 show remote exec-event-feature-packet
3119 Set/show the use of the remote exec event feature.
3121 * Thread names in remote protocol
3123 The reply to qXfer:threads:read may now include a name attribute for each
3126 * Target remote mode fork and exec events
3128 ** GDB now has support for fork and exec events on target remote mode
3129 Linux targets. For such targets with Linux kernels 2.5.46 and later,
3130 this enables follow-fork-mode, detach-on-fork, follow-exec-mode, and
3131 fork and exec catchpoints.
3133 * Remote syscall events
3135 ** GDB now has support for catch syscall on remote Linux targets,
3136 currently enabled on x86/x86_64 architectures.
3138 set remote catch-syscall-packet
3139 show remote catch-syscall-packet
3140 Set/show the use of the remote catch syscall feature.
3144 ** The -var-set-format command now accepts the zero-hexadecimal
3145 format. It outputs data in hexadecimal format with zero-padding on the
3150 ** gdb.InferiorThread objects have a new attribute "global_num",
3151 which refers to the thread's global thread ID. The existing
3152 "num" attribute now refers to the thread's per-inferior number.
3153 See "Per-inferior thread numbers" above.
3154 ** gdb.InferiorThread objects have a new attribute "inferior", which
3155 is the Inferior object the thread belongs to.
3157 *** Changes in GDB 7.10
3159 * Support for process record-replay and reverse debugging on aarch64*-linux*
3160 targets has been added. GDB now supports recording of A64 instruction set
3161 including advance SIMD instructions.
3163 * Support for Sun's version of the "stabs" debug file format has been removed.
3165 * GDB now honors the content of the file /proc/PID/coredump_filter
3166 (PID is the process ID) on GNU/Linux systems. This file can be used
3167 to specify the types of memory mappings that will be included in a
3168 corefile. For more information, please refer to the manual page of
3169 "core(5)". GDB also has a new command: "set use-coredump-filter
3170 on|off". It allows to set whether GDB will read the content of the
3171 /proc/PID/coredump_filter file when generating a corefile.
3173 * The "info os" command on GNU/Linux can now display information on
3175 "info os cpus" Listing of all cpus/cores on the system
3177 * GDB has two new commands: "set serial parity odd|even|none" and
3178 "show serial parity". These allows to set or show parity for the
3181 * The "info source" command now displays the producer string if it was
3182 present in the debug info. This typically includes the compiler version
3183 and may include things like its command line arguments.
3185 * The "info dll", an alias of the "info sharedlibrary" command,
3186 is now available on all platforms.
3188 * Directory names supplied to the "set sysroot" commands may be
3189 prefixed with "target:" to tell GDB to access shared libraries from
3190 the target system, be it local or remote. This replaces the prefix
3191 "remote:". The default sysroot has been changed from "" to
3192 "target:". "remote:" is automatically converted to "target:" for
3193 backward compatibility.
3195 * The system root specified by "set sysroot" will be prepended to the
3196 filename of the main executable (if reported to GDB as absolute by
3197 the operating system) when starting processes remotely, and when
3198 attaching to already-running local or remote processes.
3200 * GDB now supports automatic location and retrieval of executable
3201 files from remote targets. Remote debugging can now be initiated
3202 using only a "target remote" or "target extended-remote" command
3203 (no "set sysroot" or "file" commands are required). See "New remote
3206 * The "dump" command now supports verilog hex format.
3208 * GDB now supports the vector ABI on S/390 GNU/Linux targets.
3210 * On GNU/Linux, GDB and gdbserver are now able to access executable
3211 and shared library files without a "set sysroot" command when
3212 attaching to processes running in different mount namespaces from
3213 the debugger. This makes it possible to attach to processes in
3214 containers as simply as "gdb -p PID" or "gdbserver --attach PID".
3215 See "New remote packets" below.
3217 * The "tui reg" command now provides completion for all of the
3218 available register groups, including target specific groups.
3220 * The HISTSIZE environment variable is no longer read when determining
3221 the size of GDB's command history. GDB now instead reads the dedicated
3222 GDBHISTSIZE environment variable. Setting GDBHISTSIZE to "-1" or to "" now
3223 disables truncation of command history. Non-numeric values of GDBHISTSIZE
3228 ** Memory ports can now be unbuffered.
3232 ** gdb.Objfile objects have a new attribute "username",
3233 which is the name of the objfile as specified by the user,
3234 without, for example, resolving symlinks.
3235 ** You can now write frame unwinders in Python.
3236 ** gdb.Type objects have a new method "optimized_out",
3237 returning optimized out gdb.Value instance of this type.
3238 ** gdb.Value objects have new methods "reference_value" and
3239 "const_value" which return a reference to the value and a
3240 "const" version of the value respectively.
3244 maint print symbol-cache
3245 Print the contents of the symbol cache.
3247 maint print symbol-cache-statistics
3248 Print statistics of symbol cache usage.
3250 maint flush-symbol-cache
3251 Flush the contents of the symbol cache.
3255 Start branch trace recording using Branch Trace Store (BTS) format.
3258 Evaluate expression by using the compiler and print result.
3262 Explicit commands for enabling and disabling tui mode.
3265 set mpx bound on i386 and amd64
3266 Support for bound table investigation on Intel MPX enabled applications.
3270 Start branch trace recording using Intel Processor Trace format.
3273 Print information about branch tracing internals.
3275 maint btrace packet-history
3276 Print the raw branch tracing data.
3278 maint btrace clear-packet-history
3279 Discard the stored raw branch tracing data.
3282 Discard all branch tracing data. It will be fetched and processed
3283 anew by the next "record" command.
3288 Renamed from "set debug dwarf2-die".
3289 show debug dwarf-die
3290 Renamed from "show debug dwarf2-die".
3292 set debug dwarf-read
3293 Renamed from "set debug dwarf2-read".
3294 show debug dwarf-read
3295 Renamed from "show debug dwarf2-read".
3297 maint set dwarf always-disassemble
3298 Renamed from "maint set dwarf2 always-disassemble".
3299 maint show dwarf always-disassemble
3300 Renamed from "maint show dwarf2 always-disassemble".
3302 maint set dwarf max-cache-age
3303 Renamed from "maint set dwarf2 max-cache-age".
3304 maint show dwarf max-cache-age
3305 Renamed from "maint show dwarf2 max-cache-age".
3307 set debug dwarf-line
3308 show debug dwarf-line
3309 Control display of debugging info regarding DWARF line processing.
3312 show max-completions
3313 Set the maximum number of candidates to be considered during
3314 completion. The default value is 200. This limit allows GDB
3315 to avoid generating large completion lists, the computation of
3316 which can cause the debugger to become temporarily unresponsive.
3318 set history remove-duplicates
3319 show history remove-duplicates
3320 Control the removal of duplicate history entries.
3322 maint set symbol-cache-size
3323 maint show symbol-cache-size
3324 Control the size of the symbol cache.
3326 set|show record btrace bts buffer-size
3327 Set and show the size of the ring buffer used for branch tracing in
3329 The obtained size may differ from the requested size. Use "info
3330 record" to see the obtained buffer size.
3332 set debug linux-namespaces
3333 show debug linux-namespaces
3334 Control display of debugging info regarding Linux namespaces.
3336 set|show record btrace pt buffer-size
3337 Set and show the size of the ring buffer used for branch tracing in
3338 Intel Processor Trace format.
3339 The obtained size may differ from the requested size. Use "info
3340 record" to see the obtained buffer size.
3342 maint set|show btrace pt skip-pad
3343 Set and show whether PAD packets are skipped when computing the
3346 * The command 'thread apply all' can now support new option '-ascending'
3347 to call its specified command for all threads in ascending order.
3349 * Python/Guile scripting
3351 ** GDB now supports auto-loading of Python/Guile scripts contained in the
3352 special section named `.debug_gdb_scripts'.
3354 * New remote packets
3356 qXfer:btrace-conf:read
3357 Return the branch trace configuration for the current thread.
3359 Qbtrace-conf:bts:size
3360 Set the requested ring buffer size for branch tracing in BTS format.
3363 Enable Intel Processor Trace-based branch tracing for the current
3364 process. The remote stub reports support for this packet to GDB's
3367 Qbtrace-conf:pt:size
3368 Set the requested ring buffer size for branch tracing in Intel Processor
3372 Indicates a memory breakpoint instruction was executed, irrespective
3373 of whether it was GDB that planted the breakpoint or the breakpoint
3374 is hardcoded in the program. This is required for correct non-stop
3378 Indicates the target stopped for a hardware breakpoint. This is
3379 required for correct non-stop mode operation.
3382 Return information about files on the remote system.
3384 qXfer:exec-file:read
3385 Return the full absolute name of the file that was executed to
3386 create a process running on the remote system.
3389 Select the filesystem on which vFile: operations with filename
3390 arguments will operate. This is required for GDB to be able to
3391 access files on remote targets where the remote stub does not
3392 share a common filesystem with the inferior(s).
3395 Indicates that a fork system call was executed.
3398 Indicates that a vfork system call was executed.
3400 vforkdone stop reason
3401 Indicates that a vfork child of the specified process has executed
3402 an exec or exit, allowing the vfork parent to resume execution.
3404 fork-events and vfork-events features in qSupported
3405 The qSupported packet allows GDB to request support for fork and
3406 vfork events using new 'gdbfeatures' fork-events and vfork-events,
3407 and the qSupported response can contain the corresponding
3408 'stubfeatures'. Set and show commands can be used to display
3409 whether these features are enabled.
3411 * Extended-remote fork events
3413 ** GDB now has support for fork events on extended-remote Linux
3414 targets. For targets with Linux kernels 2.5.60 and later, this
3415 enables follow-fork-mode and detach-on-fork for both fork and
3416 vfork, as well as fork and vfork catchpoints.
3418 * The info record command now shows the recording format and the
3419 branch tracing configuration for the current thread when using
3420 the btrace record target.
3421 For the BTS format, it shows the ring buffer size.
3423 * GDB now has support for DTrace USDT (Userland Static Defined
3424 Tracing) probes. The supported targets are x86_64-*-linux-gnu.
3426 * GDB now supports access to vector registers on S/390 GNU/Linux
3429 * Removed command line options
3431 -xdb HP-UX XDB compatibility mode.
3433 * Removed targets and native configurations
3435 HP/PA running HP-UX hppa*-*-hpux*
3436 Itanium running HP-UX ia64-*-hpux*
3438 * New configure options
3441 This configure option allows the user to build GDB with support for
3442 Intel Processor Trace (default: auto). This requires libipt.
3444 --with-libipt-prefix=PATH
3445 Specify the path to the version of libipt that GDB should use.
3446 $PATH/include should contain the intel-pt.h header and
3447 $PATH/lib should contain the libipt.so library.
3449 *** Changes in GDB 7.9.1
3453 ** Xmethods can now specify a result type.
3455 *** Changes in GDB 7.9
3457 * GDB now supports hardware watchpoints on x86 GNU Hurd.
3461 ** You can now access frame registers from Python scripts.
3462 ** New attribute 'producer' for gdb.Symtab objects.
3463 ** gdb.Objfile objects have a new attribute "progspace",
3464 which is the gdb.Progspace object of the containing program space.
3465 ** gdb.Objfile objects have a new attribute "owner".
3466 ** gdb.Objfile objects have a new attribute "build_id",
3467 which is the build ID generated when the file was built.
3468 ** gdb.Objfile objects have a new method "add_separate_debug_file".
3469 ** A new event "gdb.clear_objfiles" has been added, triggered when
3470 selecting a new file to debug.
3471 ** You can now add attributes to gdb.Objfile and gdb.Progspace objects.
3472 ** New function gdb.lookup_objfile.
3474 New events which are triggered when GDB modifies the state of the
3477 ** gdb.events.inferior_call_pre: Function call is about to be made.
3478 ** gdb.events.inferior_call_post: Function call has just been made.
3479 ** gdb.events.memory_changed: A memory location has been altered.
3480 ** gdb.events.register_changed: A register has been altered.
3482 * New Python-based convenience functions:
3484 ** $_caller_is(name [, number_of_frames])
3485 ** $_caller_matches(regexp [, number_of_frames])
3486 ** $_any_caller_is(name [, number_of_frames])
3487 ** $_any_caller_matches(regexp [, number_of_frames])
3489 * GDB now supports the compilation and injection of source code into
3490 the inferior. GDB will use GCC 5.0 or higher built with libcc1.so
3491 to compile the source code to object code, and if successful, inject
3492 and execute that code within the current context of the inferior.
3493 Currently the C language is supported. The commands used to
3494 interface with this new feature are:
3496 compile code [-raw|-r] [--] [source code]
3497 compile file [-raw|-r] filename
3501 demangle [-l language] [--] name
3502 Demangle "name" in the specified language, or the current language
3503 if elided. This command is renamed from the "maint demangle" command.
3504 The latter is kept as a no-op to avoid "maint demangle" being interpreted
3505 as "maint demangler-warning".
3507 queue-signal signal-name-or-number
3508 Queue a signal to be delivered to the thread when it is resumed.
3510 add-auto-load-scripts-directory directory
3511 Add entries to the list of directories from which to load auto-loaded
3514 maint print user-registers
3515 List all currently available "user" registers.
3517 compile code [-r|-raw] [--] [source code]
3518 Compile, inject, and execute in the inferior the executable object
3519 code produced by compiling the provided source code.
3521 compile file [-r|-raw] filename
3522 Compile and inject into the inferior the executable object code
3523 produced by compiling the source code stored in the filename
3526 * On resume, GDB now always passes the signal the program had stopped
3527 for to the thread the signal was sent to, even if the user changed
3528 threads before resuming. Previously GDB would often (but not
3529 always) deliver the signal to the thread that happens to be current
3532 * Conversely, the "signal" command now consistently delivers the
3533 requested signal to the current thread. GDB now asks for
3534 confirmation if the program had stopped for a signal and the user
3535 switched threads meanwhile.
3537 * "breakpoint always-inserted" modes "off" and "auto" merged.
3539 Now, when 'breakpoint always-inserted mode' is set to "off", GDB
3540 won't remove breakpoints from the target until all threads stop,
3541 even in non-stop mode. The "auto" mode has been removed, and "off"
3542 is now the default mode.
3546 set debug symbol-lookup
3547 show debug symbol-lookup
3548 Control display of debugging info regarding symbol lookup.
3552 ** The -list-thread-groups command outputs an exit-code field for
3553 inferiors that have exited.
3557 MIPS SDE mips*-sde*-elf*
3561 Support for these obsolete configurations has been removed.
3563 Alpha running OSF/1 (or Tru64) alpha*-*-osf*
3564 SGI Irix-5.x mips-*-irix5*
3565 SGI Irix-6.x mips-*-irix6*
3566 VAX running (4.2 - 4.3 Reno) BSD vax-*-bsd*
3567 VAX running Ultrix vax-*-ultrix*
3569 * The "dll-symbols" command, and its two aliases ("add-shared-symbol-files"
3570 and "assf"), have been removed. Use the "sharedlibrary" command, or
3571 its alias "share", instead.
3573 *** Changes in GDB 7.8
3575 * New command line options
3578 This is an alias for the --data-directory option.
3580 * GDB supports printing and modifying of variable length automatic arrays
3581 as specified in ISO C99.
3583 * The ARM simulator now supports instruction level tracing
3584 with or without disassembly.
3588 GDB now has support for scripting using Guile. Whether this is
3589 available is determined at configure time.
3590 Guile version 2.0 or greater is required.
3591 Guile version 2.0.9 is well tested, earlier 2.0 versions are not.
3593 * New commands (for set/show, see "New options" below)
3597 Invoke CODE by passing it to the Guile interpreter.
3601 Start a Guile interactive prompt (or "repl" for "read-eval-print loop").
3603 info auto-load guile-scripts [regexp]
3604 Print the list of automatically loaded Guile scripts.
3606 * The source command is now capable of sourcing Guile scripts.
3607 This feature is dependent on the debugger being built with Guile support.
3611 set print symbol-loading (off|brief|full)
3612 show print symbol-loading
3613 Control whether to print informational messages when loading symbol
3614 information for a file. The default is "full", but when debugging
3615 programs with large numbers of shared libraries the amount of output
3616 becomes less useful.
3618 set guile print-stack (none|message|full)
3619 show guile print-stack
3620 Show a stack trace when an error is encountered in a Guile script.
3622 set auto-load guile-scripts (on|off)
3623 show auto-load guile-scripts
3624 Control auto-loading of Guile script files.
3626 maint ada set ignore-descriptive-types (on|off)
3627 maint ada show ignore-descriptive-types
3628 Control whether the debugger should ignore descriptive types in Ada
3629 programs. The default is not to ignore the descriptive types. See
3630 the user manual for more details on descriptive types and the intended
3631 usage of this option.
3633 set auto-connect-native-target
3635 Control whether GDB is allowed to automatically connect to the
3636 native target for the run, attach, etc. commands when not connected
3637 to any target yet. See also "target native" below.
3639 set record btrace replay-memory-access (read-only|read-write)
3640 show record btrace replay-memory-access
3641 Control what memory accesses are allowed during replay.
3643 maint set target-async (on|off)
3644 maint show target-async
3645 This controls whether GDB targets operate in synchronous or
3646 asynchronous mode. Normally the default is asynchronous, if it is
3647 available; but this can be changed to more easily debug problems
3648 occurring only in synchronous mode.
3650 set mi-async (on|off)
3652 Control whether MI asynchronous mode is preferred. This supersedes
3653 "set target-async" of previous GDB versions.
3655 * "set target-async" is deprecated as a CLI option and is now an alias
3656 for "set mi-async" (only puts MI into async mode).
3658 * Background execution commands (e.g., "c&", "s&", etc.) are now
3659 possible ``out of the box'' if the target supports them. Previously
3660 the user would need to explicitly enable the possibility with the
3661 "set target-async on" command.
3663 * New features in the GDB remote stub, GDBserver
3665 ** New option --debug-format=option1[,option2,...] allows one to add
3666 additional text to each output. At present only timestamps
3667 are supported: --debug-format=timestamps.
3668 Timestamps can also be turned on with the
3669 "monitor set debug-format timestamps" command from GDB.
3671 * The 'record instruction-history' command now starts counting instructions
3672 at one. This also affects the instruction ranges reported by the
3673 'record function-call-history' command when given the /i modifier.
3675 * The command 'record function-call-history' supports a new modifier '/c' to
3676 indent the function names based on their call stack depth.
3677 The fields for the '/i' and '/l' modifier have been reordered.
3678 The source line range is now prefixed with 'at'.
3679 The instruction range is now prefixed with 'inst'.
3680 Both ranges are now printed as '<from>, <to>' to allow copy&paste to the
3681 "record instruction-history" and "list" commands.
3683 * The ranges given as arguments to the 'record function-call-history' and
3684 'record instruction-history' commands are now inclusive.
3686 * The btrace record target now supports the 'record goto' command.
3687 For locations inside the execution trace, the back trace is computed
3688 based on the information stored in the execution trace.
3690 * The btrace record target supports limited reverse execution and replay.
3691 The target does not record data and therefore does not allow reading
3692 memory or registers.
3694 * The "catch syscall" command now works on s390*-linux* targets.
3696 * The "compare-sections" command is no longer specific to target
3697 remote. It now works with all targets.
3699 * All native targets are now consistently called "native".
3700 Consequently, the "target child", "target GNU", "target djgpp",
3701 "target procfs" (Solaris/Irix/OSF/AIX) and "target darwin-child"
3702 commands have been replaced with "target native". The QNX/NTO port
3703 leaves the "procfs" target in place and adds a "native" target for
3704 consistency with other ports. The impact on users should be minimal
3705 as these commands previously either throwed an error, or were
3706 no-ops. The target's name is visible in the output of the following
3707 commands: "help target", "info target", "info files", "maint print
3710 * The "target native" command now connects to the native target. This
3711 can be used to launch native programs even when "set
3712 auto-connect-native-target" is set to off.
3714 * GDB now supports access to Intel MPX registers on GNU/Linux.
3716 * Support for Intel AVX-512 registers on GNU/Linux.
3717 Support displaying and modifying Intel AVX-512 registers
3718 $zmm0 - $zmm31 and $k0 - $k7 on GNU/Linux.
3720 * New remote packets
3722 qXfer:btrace:read's annex
3723 The qXfer:btrace:read packet supports a new annex 'delta' to read
3724 branch trace incrementally.
3728 ** Valid Python operations on gdb.Value objects representing
3729 structs/classes invoke the corresponding overloaded operators if
3731 ** New `Xmethods' feature in the Python API. Xmethods are
3732 additional methods or replacements for existing methods of a C++
3733 class. This feature is useful for those cases where a method
3734 defined in C++ source code could be inlined or optimized out by
3735 the compiler, making it unavailable to GDB.
3738 PowerPC64 GNU/Linux little-endian powerpc64le-*-linux*
3740 * The "dll-symbols" command, and its two aliases ("add-shared-symbol-files"
3741 and "assf"), have been deprecated. Use the "sharedlibrary" command, or
3742 its alias "share", instead.
3744 * The commands "set remotebaud" and "show remotebaud" are no longer
3745 supported. Use "set serial baud" and "show serial baud" (respectively)
3750 ** A new option "-gdb-set mi-async" replaces "-gdb-set
3751 target-async". The latter is left as a deprecated alias of the
3752 former for backward compatibility. If the target supports it,
3753 CLI background execution commands are now always possible by
3754 default, independently of whether the frontend stated a
3755 preference for asynchronous execution with "-gdb-set mi-async".
3756 Previously "-gdb-set target-async off" affected both MI execution
3757 commands and CLI execution commands.
3759 *** Changes in GDB 7.7
3761 * Improved support for process record-replay and reverse debugging on
3762 arm*-linux* targets. Support for thumb32 and syscall instruction
3763 recording has been added.
3765 * GDB now supports SystemTap SDT probes on AArch64 GNU/Linux.
3767 * GDB now supports Fission DWP file format version 2.
3768 http://gcc.gnu.org/wiki/DebugFission
3770 * New convenience function "$_isvoid", to check whether an expression
3771 is void. A void expression is an expression where the type of the
3772 result is "void". For example, some convenience variables may be
3773 "void" when evaluated (e.g., "$_exitcode" before the execution of
3774 the program being debugged; or an undefined convenience variable).
3775 Another example, when calling a function whose return type is
3778 * The "maintenance print objfiles" command now takes an optional regexp.
3780 * The "catch syscall" command now works on arm*-linux* targets.
3782 * GDB now consistently shows "<not saved>" when printing values of
3783 registers the debug info indicates have not been saved in the frame
3784 and there's nowhere to retrieve them from
3785 (callee-saved/call-clobbered registers):
3790 (gdb) info registers rax
3793 Before, the former would print "<optimized out>", and the latter
3794 "*value not available*".
3796 * New script contrib/gdb-add-index.sh for adding .gdb_index sections
3801 ** Frame filters and frame decorators have been added.
3802 ** Temporary breakpoints are now supported.
3803 ** Line tables representation has been added.
3804 ** New attribute 'parent_type' for gdb.Field objects.
3805 ** gdb.Field objects can be used as subscripts on gdb.Value objects.
3806 ** New attribute 'name' for gdb.Type objects.
3810 Nios II ELF nios2*-*-elf
3811 Nios II GNU/Linux nios2*-*-linux
3812 Texas Instruments MSP430 msp430*-*-elf
3814 * Removed native configurations
3816 Support for these a.out NetBSD and OpenBSD obsolete configurations has
3817 been removed. ELF variants of these configurations are kept supported.
3819 arm*-*-netbsd* but arm*-*-netbsdelf* is kept supported.
3820 i[34567]86-*-netbsd* but i[34567]86-*-netbsdelf* is kept supported.
3821 i[34567]86-*-openbsd[0-2].* but i[34567]86-*-openbsd* is kept supported.
3822 i[34567]86-*-openbsd3.[0-3]
3823 m68*-*-netbsd* but m68*-*-netbsdelf* is kept supported.
3824 sparc-*-netbsd* but sparc-*-netbsdelf* is kept supported.
3825 vax-*-netbsd* but vax-*-netbsdelf* is kept supported.
3829 Like "catch throw", but catches a re-thrown exception.
3830 maint check-psymtabs
3831 Renamed from old "maint check-symtabs".
3833 Perform consistency checks on symtabs.
3834 maint expand-symtabs
3835 Expand symtabs matching an optional regexp.
3838 Display the details of GDB configure-time options.
3840 maint set|show per-command
3841 maint set|show per-command space
3842 maint set|show per-command time
3843 maint set|show per-command symtab
3844 Enable display of per-command gdb resource usage.
3846 remove-symbol-file FILENAME
3847 remove-symbol-file -a ADDRESS
3848 Remove a symbol file added via add-symbol-file. The file to remove
3849 can be identified by its filename or by an address that lies within
3850 the boundaries of this symbol file in memory.
3853 info exceptions REGEXP
3854 Display the list of Ada exceptions defined in the program being
3855 debugged. If provided, only the exceptions whose names match REGEXP
3860 set debug symfile off|on
3862 Control display of debugging info regarding reading symbol files and
3863 symbol tables within those files
3865 set print raw frame-arguments
3866 show print raw frame-arguments
3867 Set/show whether to print frame arguments in raw mode,
3868 disregarding any defined pretty-printers.
3870 set remote trace-status-packet
3871 show remote trace-status-packet
3872 Set/show the use of remote protocol qTStatus packet.
3876 Control display of debugging messages related to Nios II targets.
3880 Control whether target-assisted range stepping is enabled.
3882 set startup-with-shell
3883 show startup-with-shell
3884 Specifies whether Unix child processes are started via a shell or
3889 Use the target memory cache for accesses to the code segment. This
3890 improves performance of remote debugging (particularly disassembly).
3892 * You can now use a literal value 'unlimited' for options that
3893 interpret 0 or -1 as meaning "unlimited". E.g., "set
3894 trace-buffer-size unlimited" is now an alias for "set
3895 trace-buffer-size -1" and "set height unlimited" is now an alias for
3898 * The "set debug symtab-create" debugging option of GDB has been changed to
3899 accept a verbosity level. 0 means "off", 1 provides basic debugging
3900 output, and values of 2 or greater provides more verbose output.
3902 * New command-line options
3904 Display the details of GDB configure-time options.
3906 * The command 'tsave' can now support new option '-ctf' to save trace
3907 buffer in Common Trace Format.
3909 * Newly installed $prefix/bin/gcore acts as a shell interface for the
3912 * GDB now implements the C++ 'typeid' operator.
3914 * The new convenience variable $_exception holds the exception being
3915 thrown or caught at an exception-related catchpoint.
3917 * The exception-related catchpoints, like "catch throw", now accept a
3918 regular expression which can be used to filter exceptions by type.
3920 * The new convenience variable $_exitsignal is automatically set to
3921 the terminating signal number when the program being debugged dies
3922 due to an uncaught signal.
3926 ** All MI commands now accept an optional "--language" option.
3927 Support for this feature can be verified by using the "-list-features"
3928 command, which should contain "language-option".
3930 ** The new command -info-gdb-mi-command allows the user to determine
3931 whether a GDB/MI command is supported or not.
3933 ** The "^error" result record returned when trying to execute an undefined
3934 GDB/MI command now provides a variable named "code" whose content is the
3935 "undefined-command" error code. Support for this feature can be verified
3936 by using the "-list-features" command, which should contain
3937 "undefined-command-error-code".
3939 ** The -trace-save MI command can optionally save trace buffer in Common
3942 ** The new command -dprintf-insert sets a dynamic printf breakpoint.
3944 ** The command -data-list-register-values now accepts an optional
3945 "--skip-unavailable" option. When used, only the available registers
3948 ** The new command -trace-frame-collected dumps collected variables,
3949 computed expressions, tvars, memory and registers in a traceframe.
3951 ** The commands -stack-list-locals, -stack-list-arguments and
3952 -stack-list-variables now accept an option "--skip-unavailable".
3953 When used, only the available locals or arguments are displayed.
3955 ** The -exec-run command now accepts an optional "--start" option.
3956 When used, the command follows the same semantics as the "start"
3957 command, stopping the program's execution at the start of its
3958 main subprogram. Support for this feature can be verified using
3959 the "-list-features" command, which should contain
3960 "exec-run-start-option".
3962 ** The new commands -catch-assert and -catch-exceptions insert
3963 catchpoints stopping the program when Ada exceptions are raised.
3965 ** The new command -info-ada-exceptions provides the equivalent of
3966 the new "info exceptions" command.
3968 * New system-wide configuration scripts
3969 A GDB installation now provides scripts suitable for use as system-wide
3970 configuration scripts for the following systems:
3974 * GDB now supports target-assigned range stepping with remote targets.
3975 This improves the performance of stepping source lines by reducing
3976 the number of control packets from/to GDB. See "New remote packets"
3979 * GDB now understands the element 'tvar' in the XML traceframe info.
3980 It has the id of the collected trace state variables.
3982 * On S/390 targets that provide the transactional-execution feature,
3983 the program interruption transaction diagnostic block (TDB) is now
3984 represented as a number of additional "registers" in GDB.
3986 * New remote packets
3990 The vCont packet supports a new 'r' action, that tells the remote
3991 stub to step through an address range itself, without GDB
3992 involvemement at each single-step.
3994 qXfer:libraries-svr4:read's annex
3995 The previously unused annex of the qXfer:libraries-svr4:read packet
3996 is now used to support passing an argument list. The remote stub
3997 reports support for this argument list to GDB's qSupported query.
3998 The defined arguments are "start" and "prev", used to reduce work
3999 necessary for library list updating, resulting in significant
4002 * New features in the GDB remote stub, GDBserver
4004 ** GDBserver now supports target-assisted range stepping. Currently
4005 enabled on x86/x86_64 GNU/Linux targets.
4007 ** GDBserver now adds element 'tvar' in the XML in the reply to
4008 'qXfer:traceframe-info:read'. It has the id of the collected
4009 trace state variables.
4011 ** GDBserver now supports hardware watchpoints on the MIPS GNU/Linux
4014 * New 'z' formatter for printing and examining memory, this displays the
4015 value as hexadecimal zero padded on the left to the size of the type.
4017 * GDB can now use Windows x64 unwinding data.
4019 * The "set remotebaud" command has been replaced by "set serial baud".
4020 Similarly, "show remotebaud" has been replaced by "show serial baud".
4021 The "set remotebaud" and "show remotebaud" commands are still available
4022 to provide backward compatibility with older versions of GDB.
4024 *** Changes in GDB 7.6
4026 * Target record has been renamed to record-full.
4027 Record/replay is now enabled with the "record full" command.
4028 This also affects settings that are associated with full record/replay
4029 that have been moved from "set/show record" to "set/show record full":
4031 set|show record full insn-number-max
4032 set|show record full stop-at-limit
4033 set|show record full memory-query
4035 * A new record target "record-btrace" has been added. The new target
4036 uses hardware support to record the control-flow of a process. It
4037 does not support replaying the execution, but it implements the
4038 below new commands for investigating the recorded execution log.
4039 This new recording method can be enabled using:
4043 The "record-btrace" target is only available on Intel Atom processors
4044 and requires a Linux kernel 2.6.32 or later.
4046 * Two new commands have been added for record/replay to give information
4047 about the recorded execution without having to replay the execution.
4048 The commands are only supported by "record btrace".
4050 record instruction-history prints the execution history at
4051 instruction granularity
4053 record function-call-history prints the execution history at
4054 function granularity
4056 * New native configurations
4058 ARM AArch64 GNU/Linux aarch64*-*-linux-gnu
4059 FreeBSD/powerpc powerpc*-*-freebsd
4060 x86_64/Cygwin x86_64-*-cygwin*
4061 Tilera TILE-Gx GNU/Linux tilegx*-*-linux-gnu
4065 ARM AArch64 aarch64*-*-elf
4066 ARM AArch64 GNU/Linux aarch64*-*-linux
4067 Lynx 178 PowerPC powerpc-*-lynx*178
4068 x86_64/Cygwin x86_64-*-cygwin*
4069 Tilera TILE-Gx GNU/Linux tilegx*-*-linux
4071 * If the configured location of system.gdbinit file (as given by the
4072 --with-system-gdbinit option at configure time) is in the
4073 data-directory (as specified by --with-gdb-datadir at configure
4074 time) or in one of its subdirectories, then GDB will look for the
4075 system-wide init file in the directory specified by the
4076 --data-directory command-line option.
4078 * New command line options:
4080 -nh Disables auto-loading of ~/.gdbinit, but still executes all the
4081 other initialization files, unlike -nx which disables all of them.
4083 * Removed command line options
4085 -epoch This was used by the gdb mode in Epoch, an ancient fork of
4088 * The 'ptype' and 'whatis' commands now accept an argument to control
4091 * 'info proc' now works on some core files.
4095 ** Vectors can be created with gdb.Type.vector.
4097 ** Python's atexit.register now works in GDB.
4099 ** Types can be pretty-printed via a Python API.
4101 ** Python 3 is now supported (in addition to Python 2.4 or later)
4103 ** New class gdb.Architecture exposes GDB's internal representation
4104 of architecture in the Python API.
4106 ** New method Frame.architecture returns the gdb.Architecture object
4107 corresponding to the frame's architecture.
4109 * New Python-based convenience functions:
4111 ** $_memeq(buf1, buf2, length)
4112 ** $_streq(str1, str2)
4114 ** $_regex(str, regex)
4116 * The 'cd' command now defaults to using '~' (the home directory) if not
4119 * The C++ ABI now defaults to the GNU v3 ABI. This has been the
4120 default for GCC since November 2000.
4122 * The command 'forward-search' can now be abbreviated as 'fo'.
4124 * The command 'info tracepoints' can now display 'installed on target'
4125 or 'not installed on target' for each non-pending location of tracepoint.
4127 * New configure options
4129 --enable-libmcheck/--disable-libmcheck
4130 By default, development versions are built with -lmcheck on hosts
4131 that support it, in order to help track memory corruption issues.
4132 Release versions, on the other hand, are built without -lmcheck
4133 by default. The --enable-libmcheck/--disable-libmcheck configure
4134 options allow the user to override that default.
4135 --with-babeltrace/--with-babeltrace-include/--with-babeltrace-lib
4136 This configure option allows the user to build GDB with
4137 libbabeltrace using which GDB can read Common Trace Format data.
4139 * New commands (for set/show, see "New options" below)
4142 Catch signals. This is similar to "handle", but allows commands and
4143 conditions to be attached.
4146 List the BFDs known to GDB.
4148 python-interactive [command]
4150 Start a Python interactive prompt, or evaluate the optional command
4151 and print the result of expressions.
4154 "py" is a new alias for "python".
4156 enable type-printer [name]...
4157 disable type-printer [name]...
4158 Enable or disable type printers.
4162 ** For the Renesas Super-H architecture, the "regs" command has been removed
4163 (has been deprecated in GDB 7.5), and "info all-registers" should be used
4168 set print type methods (on|off)
4169 show print type methods
4170 Control whether method declarations are displayed by "ptype".
4171 The default is to show them.
4173 set print type typedefs (on|off)
4174 show print type typedefs
4175 Control whether typedef definitions are displayed by "ptype".
4176 The default is to show them.
4178 set filename-display basename|relative|absolute
4179 show filename-display
4180 Control the way in which filenames is displayed.
4181 The default is "relative", which preserves previous behavior.
4183 set trace-buffer-size
4184 show trace-buffer-size
4185 Request target to change the size of trace buffer.
4187 set remote trace-buffer-size-packet auto|on|off
4188 show remote trace-buffer-size-packet
4189 Control the use of the remote protocol `QTBuffer:size' packet.
4193 Control display of debugging messages related to ARM AArch64.
4196 set debug coff-pe-read
4197 show debug coff-pe-read
4198 Control display of debugging messages related to reading of COFF/PE
4203 Control display of debugging messages related to Mach-O symbols
4206 set debug notification
4207 show debug notification
4208 Control display of debugging info for async remote notification.
4212 ** Command parameter changes are now notified using new async record
4213 "=cmd-param-changed".
4214 ** Trace frame changes caused by command "tfind" are now notified using
4215 new async record "=traceframe-changed".
4216 ** The creation, deletion and modification of trace state variables
4217 are now notified using new async records "=tsv-created",
4218 "=tsv-deleted" and "=tsv-modified".
4219 ** The start and stop of process record are now notified using new
4220 async record "=record-started" and "=record-stopped".
4221 ** Memory changes are now notified using new async record
4223 ** The data-disassemble command response will include a "fullname" field
4224 containing the absolute file name when source has been requested.
4225 ** New optional parameter COUNT added to the "-data-write-memory-bytes"
4226 command, to allow pattern filling of memory areas.
4227 ** New commands "-catch-load"/"-catch-unload" added for intercepting
4228 library load/unload events.
4229 ** The response to breakpoint commands and breakpoint async records
4230 includes an "installed" field containing a boolean state about each
4231 non-pending tracepoint location is whether installed on target or not.
4232 ** Output of the "-trace-status" command includes a "trace-file" field
4233 containing the name of the trace file being examined. This field is
4234 optional, and only present when examining a trace file.
4235 ** The "fullname" field is now always present along with the "file" field,
4236 even if the file cannot be found by GDB.
4238 * GDB now supports the "mini debuginfo" section, .gnu_debugdata.
4239 You must have the LZMA library available when configuring GDB for this
4240 feature to be enabled. For more information, see:
4241 http://fedoraproject.org/wiki/Features/MiniDebugInfo
4243 * New remote packets
4246 Set the size of trace buffer. The remote stub reports support for this
4247 packet to gdb's qSupported query.
4250 Enable Branch Trace Store (BTS)-based branch tracing for the current
4251 thread. The remote stub reports support for this packet to gdb's
4255 Disable branch tracing for the current thread. The remote stub reports
4256 support for this packet to gdb's qSupported query.
4259 Read the traced branches for the current thread. The remote stub
4260 reports support for this packet to gdb's qSupported query.
4262 *** Changes in GDB 7.5
4264 * GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/>
4265 for more x32 ABI info.
4267 * GDB now supports access to MIPS DSP registers on Linux targets.
4269 * GDB now supports debugging microMIPS binaries.
4271 * The "info os" command on GNU/Linux can now display information on
4272 several new classes of objects managed by the operating system:
4273 "info os procgroups" lists process groups
4274 "info os files" lists file descriptors
4275 "info os sockets" lists internet-domain sockets
4276 "info os shm" lists shared-memory regions
4277 "info os semaphores" lists semaphores
4278 "info os msg" lists message queues
4279 "info os modules" lists loaded kernel modules
4281 * GDB now has support for SDT (Static Defined Tracing) probes. Currently,
4282 the only implemented backend is for SystemTap probes (<sys/sdt.h>). You
4283 can set a breakpoint using the new "-probe, "-pstap" or "-probe-stap"
4284 options and inspect the probe arguments using the new $_probe_arg family
4285 of convenience variables. You can obtain more information about SystemTap
4286 in <http://sourceware.org/systemtap/>.
4288 * GDB now supports reversible debugging on ARM, it allows you to
4289 debug basic ARM and THUMB instructions, and provides
4290 record/replay support.
4292 * The option "symbol-reloading" has been deleted as it is no longer used.
4296 ** GDB commands implemented in Python can now be put in command class
4299 ** The "maint set python print-stack on|off" is now deleted.
4301 ** A new class, gdb.printing.FlagEnumerationPrinter, can be used to
4302 apply "flag enum"-style pretty-printing to any enum.
4304 ** gdb.lookup_symbol can now work when there is no current frame.
4306 ** gdb.Symbol now has a 'line' attribute, holding the line number in
4307 the source at which the symbol was defined.
4309 ** gdb.Symbol now has the new attribute 'needs_frame' and the new
4310 method 'value'. The former indicates whether the symbol needs a
4311 frame in order to compute its value, and the latter computes the
4314 ** A new method 'referenced_value' on gdb.Value objects which can
4315 dereference pointer as well as C++ reference values.
4317 ** New methods 'global_block' and 'static_block' on gdb.Symtab objects
4318 which return the global and static blocks (as gdb.Block objects),
4319 of the underlying symbol table, respectively.
4321 ** New function gdb.find_pc_line which returns the gdb.Symtab_and_line
4322 object associated with a PC value.
4324 ** gdb.Symtab_and_line has new attribute 'last' which holds the end
4325 of the address range occupied by code for the current source line.
4327 * Go language support.
4328 GDB now supports debugging programs written in the Go programming
4331 * GDBserver now supports stdio connections.
4332 E.g. (gdb) target remote | ssh myhost gdbserver - hello
4334 * The binary "gdbtui" can no longer be built or installed.
4335 Use "gdb -tui" instead.
4337 * GDB will now print "flag" enums specially. A flag enum is one where
4338 all the enumerator values have no bits in common when pairwise
4339 "and"ed. When printing a value whose type is a flag enum, GDB will
4340 show all the constants, e.g., for enum E { ONE = 1, TWO = 2}:
4341 (gdb) print (enum E) 3
4344 * The filename part of a linespec will now match trailing components
4345 of a source file name. For example, "break gcc/expr.c:1000" will
4346 now set a breakpoint in build/gcc/expr.c, but not
4347 build/libcpp/expr.c.
4349 * The "info proc" and "generate-core-file" commands will now also
4350 work on remote targets connected to GDBserver on Linux.
4352 * The command "info catch" has been removed. It has been disabled
4353 since December 2007.
4355 * The "catch exception" and "catch assert" commands now accept
4356 a condition at the end of the command, much like the "break"
4357 command does. For instance:
4359 (gdb) catch exception Constraint_Error if Barrier = True
4361 Previously, it was possible to add a condition to such catchpoints,
4362 but it had to be done as a second step, after the catchpoint had been
4363 created, using the "condition" command.
4365 * The "info static-tracepoint-marker" command will now also work on
4366 native Linux targets with in-process agent.
4368 * GDB can now set breakpoints on inlined functions.
4370 * The .gdb_index section has been updated to include symbols for
4371 inlined functions. GDB will ignore older .gdb_index sections by
4372 default, which could cause symbol files to be loaded more slowly
4373 until their .gdb_index sections can be recreated. The new command
4374 "set use-deprecated-index-sections on" will cause GDB to use any older
4375 .gdb_index sections it finds. This will restore performance, but the
4376 ability to set breakpoints on inlined functions will be lost in symbol
4377 files with older .gdb_index sections.
4379 The .gdb_index section has also been updated to record more information
4380 about each symbol. This speeds up the "info variables", "info functions"
4381 and "info types" commands when used with programs having the .gdb_index
4382 section, as well as speeding up debugging with shared libraries using
4383 the .gdb_index section.
4385 * Ada support for GDB/MI Variable Objects has been added.
4387 * GDB can now support 'breakpoint always-inserted mode' in 'record'
4392 ** New command -info-os is the MI equivalent of "info os".
4394 ** Output logs ("set logging" and related) now include MI output.
4398 ** "set use-deprecated-index-sections on|off"
4399 "show use-deprecated-index-sections on|off"
4400 Controls the use of deprecated .gdb_index sections.
4402 ** "catch load" and "catch unload" can be used to stop when a shared
4403 library is loaded or unloaded, respectively.
4405 ** "enable count" can be used to auto-disable a breakpoint after
4408 ** "info vtbl" can be used to show the virtual method tables for
4409 C++ and Java objects.
4411 ** "explore" and its sub commands "explore value" and "explore type"
4412 can be used to recursively explore values and types of
4413 expressions. These commands are available only if GDB is
4414 configured with '--with-python'.
4416 ** "info auto-load" shows status of all kinds of auto-loaded files,
4417 "info auto-load gdb-scripts" shows status of auto-loading GDB canned
4418 sequences of commands files, "info auto-load python-scripts"
4419 shows status of auto-loading Python script files,
4420 "info auto-load local-gdbinit" shows status of loading init file
4421 (.gdbinit) from current directory and "info auto-load libthread-db" shows
4422 status of inferior specific thread debugging shared library loading.
4424 ** "info auto-load-scripts", "set auto-load-scripts on|off"
4425 and "show auto-load-scripts" commands have been deprecated, use their
4426 "info auto-load python-scripts", "set auto-load python-scripts on|off"
4427 and "show auto-load python-scripts" counterparts instead.
4429 ** "dprintf location,format,args..." creates a dynamic printf, which
4430 is basically a breakpoint that does a printf and immediately
4431 resumes your program's execution, so it is like a printf that you
4432 can insert dynamically at runtime instead of at compiletime.
4434 ** "set print symbol"
4436 Controls whether GDB attempts to display the symbol, if any,
4437 corresponding to addresses it prints. This defaults to "on", but
4438 you can set it to "off" to restore GDB's previous behavior.
4440 * Deprecated commands
4442 ** For the Renesas Super-H architecture, the "regs" command has been
4443 deprecated, and "info all-registers" should be used instead.
4447 Renesas RL78 rl78-*-elf
4448 HP OpenVMS ia64 ia64-hp-openvms*
4450 * GDBserver supports evaluation of breakpoint conditions. When
4451 support is advertised by GDBserver, GDB may be told to send the
4452 breakpoint conditions in bytecode form to GDBserver. GDBserver
4453 will only report the breakpoint trigger to GDB when its condition
4458 set mips compression
4459 show mips compression
4460 Select the compressed ISA encoding used in functions that have no symbol
4461 information available. The encoding can be set to either of:
4464 and is updated automatically from ELF file flags if available.
4466 set breakpoint condition-evaluation
4467 show breakpoint condition-evaluation
4468 Control whether breakpoint conditions are evaluated by GDB ("host") or by
4469 GDBserver ("target"). Default option "auto" chooses the most efficient
4471 This option can improve debugger efficiency depending on the speed of the
4475 Disable auto-loading globally.
4478 Show auto-loading setting of all kinds of auto-loaded files.
4480 set auto-load gdb-scripts on|off
4481 show auto-load gdb-scripts
4482 Control auto-loading of GDB canned sequences of commands files.
4484 set auto-load python-scripts on|off
4485 show auto-load python-scripts
4486 Control auto-loading of Python script files.
4488 set auto-load local-gdbinit on|off
4489 show auto-load local-gdbinit
4490 Control loading of init file (.gdbinit) from current directory.
4492 set auto-load libthread-db on|off
4493 show auto-load libthread-db
4494 Control auto-loading of inferior specific thread debugging shared library.
4496 set auto-load scripts-directory <dir1>[:<dir2>...]
4497 show auto-load scripts-directory
4498 Set a list of directories from which to load auto-loaded scripts.
4499 Automatically loaded Python scripts and GDB scripts are located in one
4500 of the directories listed by this option.
4501 The delimiter (':' above) may differ according to the host platform.
4503 set auto-load safe-path <dir1>[:<dir2>...]
4504 show auto-load safe-path
4505 Set a list of directories from which it is safe to auto-load files.
4506 The delimiter (':' above) may differ according to the host platform.
4508 set debug auto-load on|off
4509 show debug auto-load
4510 Control display of debugging info for auto-loading the files above.
4512 set dprintf-style gdb|call|agent
4514 Control the way in which a dynamic printf is performed; "gdb"
4515 requests a GDB printf command, while "call" causes dprintf to call a
4516 function in the inferior. "agent" requests that the target agent
4517 (such as GDBserver) do the printing.
4519 set dprintf-function <expr>
4520 show dprintf-function
4521 set dprintf-channel <expr>
4522 show dprintf-channel
4523 Set the function and optional first argument to the call when using
4524 the "call" style of dynamic printf.
4526 set disconnected-dprintf on|off
4527 show disconnected-dprintf
4528 Control whether agent-style dynamic printfs continue to be in effect
4529 after GDB disconnects.
4531 * New configure options
4533 --with-auto-load-dir
4534 Configure default value for the 'set auto-load scripts-directory'
4535 setting above. It defaults to '$debugdir:$datadir/auto-load',
4536 $debugdir representing global debugging info directories (available
4537 via 'show debug-file-directory') and $datadir representing GDB's data
4538 directory (available via 'show data-directory').
4540 --with-auto-load-safe-path
4541 Configure default value for the 'set auto-load safe-path' setting
4542 above. It defaults to the --with-auto-load-dir setting.
4544 --without-auto-load-safe-path
4545 Set 'set auto-load safe-path' to '/', effectively disabling this
4548 * New remote packets
4550 z0/z1 conditional breakpoints extension
4552 The z0/z1 breakpoint insertion packets have been extended to carry
4553 a list of conditional expressions over to the remote stub depending on the
4554 condition evaluation mode. The use of this extension can be controlled
4555 via the "set remote conditional-breakpoints-packet" command.
4559 Specify the signals which the remote stub may pass to the debugged
4560 program without GDB involvement.
4562 * New command line options
4564 --init-command=FILE, -ix Like --command, -x but execute it
4565 before loading inferior.
4566 --init-eval-command=COMMAND, -iex Like --eval-command=COMMAND, -ex but
4567 execute it before loading inferior.
4569 *** Changes in GDB 7.4
4571 * GDB now handles ambiguous linespecs more consistently; the existing
4572 FILE:LINE support has been expanded to other types of linespecs. A
4573 breakpoint will now be set on all matching locations in all
4574 inferiors, and locations will be added or removed according to
4577 * GDB now allows you to skip uninteresting functions and files when
4578 stepping with the "skip function" and "skip file" commands.
4580 * GDB has two new commands: "set remote hardware-watchpoint-length-limit"
4581 and "show remote hardware-watchpoint-length-limit". These allows to
4582 set or show the maximum length limit (in bytes) of a remote
4583 target hardware watchpoint.
4585 This allows e.g. to use "unlimited" hardware watchpoints with the
4586 gdbserver integrated in Valgrind version >= 3.7.0. Such Valgrind
4587 watchpoints are slower than real hardware watchpoints but are
4588 significantly faster than gdb software watchpoints.
4592 ** The register_pretty_printer function in module gdb.printing now takes
4593 an optional `replace' argument. If True, the new printer replaces any
4596 ** The "maint set python print-stack on|off" command has been
4597 deprecated and will be deleted in GDB 7.5.
4598 A new command: "set python print-stack none|full|message" has
4599 replaced it. Additionally, the default for "print-stack" is
4600 now "message", which just prints the error message without
4603 ** A prompt substitution hook (prompt_hook) is now available to the
4606 ** A new Python module, gdb.prompt has been added to the GDB Python
4607 modules library. This module provides functionality for
4608 escape sequences in prompts (used by set/show
4609 extended-prompt). These escape sequences are replaced by their
4610 corresponding value.
4612 ** Python commands and convenience-functions located in
4613 'data-directory'/python/gdb/command and
4614 'data-directory'/python/gdb/function are now automatically loaded
4617 ** Blocks now provide four new attributes. global_block and
4618 static_block will return the global and static blocks
4619 respectively. is_static and is_global are boolean attributes
4620 that indicate if the block is one of those two types.
4622 ** Symbols now provide the "type" attribute, the type of the symbol.
4624 ** The "gdb.breakpoint" function has been deprecated in favor of
4627 ** A new class "gdb.FinishBreakpoint" is provided to catch the return
4628 of a function. This class is based on the "finish" command
4629 available in the CLI.
4631 ** Type objects for struct and union types now allow access to
4632 the fields using standard Python dictionary (mapping) methods.
4633 For example, "some_type['myfield']" now works, as does
4634 "some_type.items()".
4636 ** A new event "gdb.new_objfile" has been added, triggered by loading a
4639 ** A new function, "deep_items" has been added to the gdb.types
4640 module in the GDB Python modules library. This function returns
4641 an iterator over the fields of a struct or union type. Unlike
4642 the standard Python "iteritems" method, it will recursively traverse
4643 any anonymous fields.
4647 ** "*stopped" events can report several new "reason"s, such as
4650 ** Breakpoint changes are now notified using new async records, like
4651 "=breakpoint-modified".
4653 ** New command -ada-task-info.
4655 * libthread-db-search-path now supports two special values: $sdir and $pdir.
4656 $sdir specifies the default system locations of shared libraries.
4657 $pdir specifies the directory where the libpthread used by the application
4660 GDB no longer looks in $sdir and $pdir after it has searched the directories
4661 mentioned in libthread-db-search-path. If you want to search those
4662 directories, they must be specified in libthread-db-search-path.
4663 The default value of libthread-db-search-path on GNU/Linux and Solaris
4664 systems is now "$sdir:$pdir".
4666 $pdir is not supported by gdbserver, it is currently ignored.
4667 $sdir is supported by gdbserver.
4669 * New configure option --with-iconv-bin.
4670 When using the internationalization support like the one in the GNU C
4671 library, GDB will invoke the "iconv" program to get a list of supported
4672 character sets. If this program lives in a non-standard location, one can
4673 use this option to specify where to find it.
4675 * When natively debugging programs on PowerPC BookE processors running
4676 a Linux kernel version 2.6.34 or later, GDB supports masked hardware
4677 watchpoints, which specify a mask in addition to an address to watch.
4678 The mask specifies that some bits of an address (the bits which are
4679 reset in the mask) should be ignored when matching the address accessed
4680 by the inferior against the watchpoint address. See the "PowerPC Embedded"
4681 section in the user manual for more details.
4683 * The new option --once causes GDBserver to stop listening for connections once
4684 the first connection is made. The listening port used by GDBserver will
4685 become available after that.
4687 * New commands "info macros" and "alias" have been added.
4689 * New function parameters suffix @entry specifies value of function parameter
4690 at the time the function got called. Entry values are available only since
4696 "!" is now an alias of the "shell" command.
4697 Note that no space is needed between "!" and SHELL COMMAND.
4701 watch EXPRESSION mask MASK_VALUE
4702 The watch command now supports the mask argument which allows creation
4703 of masked watchpoints, if the current architecture supports this feature.
4705 info auto-load-scripts [REGEXP]
4706 This command was formerly named "maintenance print section-scripts".
4707 It is now generally useful and is no longer a maintenance-only command.
4709 info macro [-all] [--] MACRO
4710 The info macro command has new options `-all' and `--'. The first for
4711 printing all definitions of a macro. The second for explicitly specifying
4712 the end of arguments and the beginning of the macro name in case the macro
4713 name starts with a hyphen.
4715 collect[/s] EXPRESSIONS
4716 The tracepoint collect command now takes an optional modifier "/s"
4717 that directs it to dereference pointer-to-character types and
4718 collect the bytes of memory up to a zero byte. The behavior is
4719 similar to what you see when you use the regular print command on a
4720 string. An optional integer following the "/s" sets a bound on the
4721 number of bytes that will be collected.
4724 The trace start command now interprets any supplied arguments as a
4725 note to be recorded with the trace run, with an effect similar to
4726 setting the variable trace-notes.
4729 The trace stop command now interprets any arguments as a note to be
4730 mentioned along with the tstatus report that the trace was stopped
4731 with a command. The effect is similar to setting the variable
4734 * Tracepoints can now be enabled and disabled at any time after a trace
4735 experiment has been started using the standard "enable" and "disable"
4736 commands. It is now possible to start a trace experiment with no enabled
4737 tracepoints; GDB will display a warning, but will allow the experiment to
4738 begin, assuming that tracepoints will be enabled as needed while the trace
4741 * Fast tracepoints on 32-bit x86-architectures can now be placed at
4742 locations with 4-byte instructions, when they were previously
4743 limited to locations with instructions of 5 bytes or longer.
4747 set debug dwarf2-read
4748 show debug dwarf2-read
4749 Turns on or off display of debugging messages related to reading
4750 DWARF debug info. The default is off.
4752 set debug symtab-create
4753 show debug symtab-create
4754 Turns on or off display of debugging messages related to symbol table
4755 creation. The default is off.
4758 show extended-prompt
4759 Set the GDB prompt, and allow escape sequences to be inserted to
4760 display miscellaneous information (see 'help set extended-prompt'
4761 for the list of sequences). This prompt (and any information
4762 accessed through the escape sequences) is updated every time the
4763 prompt is displayed.
4765 set print entry-values (both|compact|default|if-needed|no|only|preferred)
4766 show print entry-values
4767 Set printing of frame argument values at function entry. In some cases
4768 GDB can determine the value of function argument which was passed by the
4769 function caller, even if the value was modified inside the called function.
4771 set debug entry-values
4772 show debug entry-values
4773 Control display of debugging info for determining frame argument values at
4774 function entry and virtual tail call frames.
4776 set basenames-may-differ
4777 show basenames-may-differ
4778 Set whether a source file may have multiple base names.
4779 (A "base name" is the name of a file with the directory part removed.
4780 Example: The base name of "/home/user/hello.c" is "hello.c".)
4781 If set, GDB will canonicalize file names (e.g., expand symlinks)
4782 before comparing them. Canonicalization is an expensive operation,
4783 but it allows the same file be known by more than one base name.
4784 If not set (the default), all source files are assumed to have just
4785 one base name, and gdb will do file name comparisons more efficiently.
4791 Set a user name and notes for the current and any future trace runs.
4792 This is useful for long-running and/or disconnected traces, to
4793 inform others (or yourself) as to who is running the trace, supply
4794 contact information, or otherwise explain what is going on.
4796 set trace-stop-notes
4797 show trace-stop-notes
4798 Set a note attached to the trace run, that is displayed when the
4799 trace has been stopped by a tstop command. This is useful for
4800 instance as an explanation, if you are stopping a trace run that was
4801 started by someone else.
4803 * New remote packets
4807 Dynamically enable a tracepoint in a started trace experiment.
4811 Dynamically disable a tracepoint in a started trace experiment.
4815 Set the user and notes of the trace run.
4819 Query the current status of a tracepoint.
4823 Query the minimum length of instruction at which a fast tracepoint may
4826 * Dcache size (number of lines) and line-size are now runtime-configurable
4827 via "set dcache line" and "set dcache line-size" commands.
4831 Texas Instruments TMS320C6x tic6x-*-*
4835 Renesas RL78 rl78-*-elf
4837 *** Changes in GDB 7.3.1
4839 * The build failure for NetBSD and OpenBSD targets have now been fixed.
4841 *** Changes in GDB 7.3
4843 * GDB has a new command: "thread find [REGEXP]".
4844 It finds the thread id whose name, target id, or thread extra info
4845 matches the given regular expression.
4847 * The "catch syscall" command now works on mips*-linux* targets.
4849 * The -data-disassemble MI command now supports modes 2 and 3 for
4850 dumping the instruction opcodes.
4852 * New command line options
4854 -data-directory DIR Specify DIR as the "data-directory".
4855 This is mostly for testing purposes.
4857 * The "maint set python auto-load on|off" command has been renamed to
4858 "set auto-load-scripts on|off".
4860 * GDB has a new command: "set directories".
4861 It is like the "dir" command except that it replaces the
4862 source path list instead of augmenting it.
4864 * GDB now understands thread names.
4866 On GNU/Linux, "info threads" will display the thread name as set by
4867 prctl or pthread_setname_np.
4869 There is also a new command, "thread name", which can be used to
4870 assign a name internally for GDB to display.
4873 Initial support for the OpenCL C language (http://www.khronos.org/opencl)
4874 has been integrated into GDB.
4878 ** The function gdb.Write now accepts an optional keyword 'stream'.
4879 This keyword, when provided, will direct the output to either
4880 stdout, stderr, or GDB's logging output.
4882 ** Parameters can now be be sub-classed in Python, and in particular
4883 you may implement the get_set_doc and get_show_doc functions.
4884 This improves how Parameter set/show documentation is processed
4885 and allows for more dynamic content.
4887 ** Symbols, Symbol Table, Symbol Table and Line, Object Files,
4888 Inferior, Inferior Thread, Blocks, and Block Iterator APIs now
4889 have an is_valid method.
4891 ** Breakpoints can now be sub-classed in Python, and in particular
4892 you may implement a 'stop' function that is executed each time
4893 the inferior reaches that breakpoint.
4895 ** New function gdb.lookup_global_symbol looks up a global symbol.
4897 ** GDB values in Python are now callable if the value represents a
4898 function. For example, if 'some_value' represents a function that
4899 takes two integer parameters and returns a value, you can call
4900 that function like so:
4902 result = some_value (10,20)
4904 ** Module gdb.types has been added.
4905 It contains a collection of utilities for working with gdb.Types objects:
4906 get_basic_type, has_field, make_enum_dict.
4908 ** Module gdb.printing has been added.
4909 It contains utilities for writing and registering pretty-printers.
4910 New classes: PrettyPrinter, SubPrettyPrinter,
4911 RegexpCollectionPrettyPrinter.
4912 New function: register_pretty_printer.
4914 ** New commands "info pretty-printers", "enable pretty-printer" and
4915 "disable pretty-printer" have been added.
4917 ** gdb.parameter("directories") is now available.
4919 ** New function gdb.newest_frame returns the newest frame in the
4922 ** The gdb.InferiorThread class has a new "name" attribute. This
4923 holds the thread's name.
4925 ** Python Support for Inferior events.
4926 Python scripts can add observers to be notified of events
4927 occurring in the process being debugged.
4928 The following events are currently supported:
4929 - gdb.events.cont Continue event.
4930 - gdb.events.exited Inferior exited event.
4931 - gdb.events.stop Signal received, and Breakpoint hit events.
4935 ** GDB now puts template parameters in scope when debugging in an
4936 instantiation. For example, if you have:
4938 template<int X> int func (void) { return X; }
4940 then if you step into func<5>, "print X" will show "5". This
4941 feature requires proper debuginfo support from the compiler; it
4942 was added to GCC 4.5.
4944 ** The motion commands "next", "finish", "until", and "advance" now
4945 work better when exceptions are thrown. In particular, GDB will
4946 no longer lose control of the inferior; instead, the GDB will
4947 stop the inferior at the point at which the exception is caught.
4948 This functionality requires a change in the exception handling
4949 code that was introduced in GCC 4.5.
4951 * GDB now follows GCC's rules on accessing volatile objects when
4952 reading or writing target state during expression evaluation.
4953 One notable difference to prior behavior is that "print x = 0"
4954 no longer generates a read of x; the value of the assignment is
4955 now always taken directly from the value being assigned.
4957 * GDB now has some support for using labels in the program's source in
4958 linespecs. For instance, you can use "advance label" to continue
4959 execution to a label.
4961 * GDB now has support for reading and writing a new .gdb_index
4962 section. This section holds a fast index of DWARF debugging
4963 information and can be used to greatly speed up GDB startup and
4964 operation. See the documentation for `save gdb-index' for details.
4966 * The "watch" command now accepts an optional "-location" argument.
4967 When used, this causes GDB to watch the memory referred to by the
4968 expression. Such a watchpoint is never deleted due to it going out
4971 * GDB now supports thread debugging of core dumps on GNU/Linux.
4973 GDB now activates thread debugging using the libthread_db library
4974 when debugging GNU/Linux core dumps, similarly to when debugging
4975 live processes. As a result, when debugging a core dump file, GDB
4976 is now able to display pthread_t ids of threads. For example, "info
4977 threads" shows the same output as when debugging the process when it
4978 was live. In earlier releases, you'd see something like this:
4981 * 1 LWP 6780 main () at main.c:10
4983 While now you see this:
4986 * 1 Thread 0x7f0f5712a700 (LWP 6780) main () at main.c:10
4988 It is also now possible to inspect TLS variables when debugging core
4991 When debugging a core dump generated on a machine other than the one
4992 used to run GDB, you may need to point GDB at the correct
4993 libthread_db library with the "set libthread-db-search-path"
4994 command. See the user manual for more details on this command.
4996 * When natively debugging programs on PowerPC BookE processors running
4997 a Linux kernel version 2.6.34 or later, GDB supports ranged breakpoints,
4998 which stop execution of the inferior whenever it executes an instruction
4999 at any address within the specified range. See the "PowerPC Embedded"
5000 section in the user manual for more details.
5002 * New features in the GDB remote stub, GDBserver
5004 ** GDBserver is now supported on PowerPC LynxOS (versions 4.x and 5.x),
5005 and i686 LynxOS (version 5.x).
5007 ** GDBserver is now supported on Blackfin Linux.
5009 * New native configurations
5011 ia64 HP-UX ia64-*-hpux*
5015 Analog Devices, Inc. Blackfin Processor bfin-*
5017 * Ada task switching is now supported on sparc-elf targets when
5018 debugging a program using the Ravenscar Profile. For more information,
5019 see the "Tasking Support when using the Ravenscar Profile" section
5020 in the GDB user manual.
5022 * Guile support was removed.
5024 * New features in the GNU simulator
5026 ** The --map-info flag lists all known core mappings.
5028 ** CFI flashes may be simulated via the "cfi" device.
5030 *** Changes in GDB 7.2
5032 * Shared library support for remote targets by default
5034 When GDB is configured for a generic, non-OS specific target, like
5035 for example, --target=arm-eabi or one of the many *-*-elf targets,
5036 GDB now queries remote stubs for loaded shared libraries using the
5037 `qXfer:libraries:read' packet. Previously, shared library support
5038 was always disabled for such configurations.
5042 ** Argument Dependent Lookup (ADL)
5044 In C++ ADL lookup directs function search to the namespaces of its
5045 arguments even if the namespace has not been imported.
5055 Here the compiler will search for `foo' in the namespace of 'b'
5056 and find A::foo. GDB now supports this. This construct is commonly
5057 used in the Standard Template Library for operators.
5059 ** Improved User Defined Operator Support
5061 In addition to member operators, GDB now supports lookup of operators
5062 defined in a namespace and imported with a `using' directive, operators
5063 defined in the global scope, operators imported implicitly from an
5064 anonymous namespace, and the ADL operators mentioned in the previous
5066 GDB now also supports proper overload resolution for all the previously
5067 mentioned flavors of operators.
5069 ** static const class members
5071 Printing of static const class members that are initialized in the
5072 class definition has been fixed.
5074 * Windows Thread Information Block access.
5076 On Windows targets, GDB now supports displaying the Windows Thread
5077 Information Block (TIB) structure. This structure is visible either
5078 by using the new command `info w32 thread-information-block' or, by
5079 dereferencing the new convenience variable named `$_tlb', a
5080 thread-specific pointer to the TIB. This feature is also supported
5081 when remote debugging using GDBserver.
5083 * Static tracepoints
5085 Static tracepoints are calls in the user program into a tracing
5086 library. One such library is a port of the LTTng kernel tracer to
5087 userspace --- UST (LTTng Userspace Tracer, http://lttng.org/ust).
5088 When debugging with GDBserver, GDB now supports combining the GDB
5089 tracepoint machinery with such libraries. For example: the user can
5090 use GDB to probe a static tracepoint marker (a call from the user
5091 program into the tracing library) with the new "strace" command (see
5092 "New commands" below). This creates a "static tracepoint" in the
5093 breakpoint list, that can be manipulated with the same feature set
5094 as fast and regular tracepoints. E.g., collect registers, local and
5095 global variables, collect trace state variables, and define
5096 tracepoint conditions. In addition, the user can collect extra
5097 static tracepoint marker specific data, by collecting the new
5098 $_sdata internal variable. When analyzing the trace buffer, you can
5099 inspect $_sdata like any other variable available to GDB. For more
5100 information, see the "Tracepoints" chapter in GDB user manual. New
5101 remote packets have been defined to support static tracepoints, see
5102 the "New remote packets" section below.
5104 * Better reconstruction of tracepoints after disconnected tracing
5106 GDB will attempt to download the original source form of tracepoint
5107 definitions when starting a trace run, and then will upload these
5108 upon reconnection to the target, resulting in a more accurate
5109 reconstruction of the tracepoints that are in use on the target.
5113 You can now exercise direct control over the ways that GDB can
5114 affect your program. For instance, you can disallow the setting of
5115 breakpoints, so that the program can run continuously (assuming
5116 non-stop mode). In addition, the "observer" variable is available
5117 to switch all of the different controls; in observer mode, GDB
5118 cannot affect the target's behavior at all, which is useful for
5119 tasks like diagnosing live systems in the field.
5121 * The new convenience variable $_thread holds the number of the
5124 * New remote packets
5128 Return the address of the Windows Thread Information Block of a given thread.
5132 In response to several of the tracepoint packets, the target may now
5133 also respond with a number of intermediate `qRelocInsn' request
5134 packets before the final result packet, to have GDB handle
5135 relocating an instruction to execute at a different address. This
5136 is particularly useful for stubs that support fast tracepoints. GDB
5137 reports support for this feature in the qSupported packet.
5141 List static tracepoint markers in the target program.
5145 List static tracepoint markers at a given address in the target
5148 qXfer:statictrace:read
5150 Read the static trace data collected (by a `collect $_sdata'
5151 tracepoint action). The remote stub reports support for this packet
5152 to gdb's qSupported query.
5156 Send the current settings of GDB's permission flags.
5160 Send part of the source (textual) form of a tracepoint definition,
5161 which includes location, conditional, and action list.
5163 * The source command now accepts a -s option to force searching for the
5164 script in the source search path even if the script name specifies
5167 * New features in the GDB remote stub, GDBserver
5169 - GDBserver now support tracepoints (including fast tracepoints, and
5170 static tracepoints). The feature is currently supported by the
5171 i386-linux and amd64-linux builds. See the "Tracepoints support
5172 in gdbserver" section in the manual for more information.
5174 GDBserver JIT compiles the tracepoint's conditional agent
5175 expression bytecode into native code whenever possible for low
5176 overhead dynamic tracepoints conditionals. For such tracepoints,
5177 an expression that examines program state is evaluated when the
5178 tracepoint is reached, in order to determine whether to capture
5179 trace data. If the condition is simple and false, processing the
5180 tracepoint finishes very quickly and no data is gathered.
5182 GDBserver interfaces with the UST (LTTng Userspace Tracer) library
5183 for static tracepoints support.
5185 - GDBserver now supports x86_64 Windows 64-bit debugging.
5187 * GDB now sends xmlRegisters= in qSupported packet to indicate that
5188 it understands register description.
5190 * The --batch flag now disables pagination and queries.
5192 * X86 general purpose registers
5194 GDB now supports reading/writing byte, word and double-word x86
5195 general purpose registers directly. This means you can use, say,
5196 $ah or $ax to refer, respectively, to the byte register AH and
5197 16-bit word register AX that are actually portions of the 32-bit
5198 register EAX or 64-bit register RAX.
5200 * The `commands' command now accepts a range of breakpoints to modify.
5201 A plain `commands' following a command that creates multiple
5202 breakpoints affects all the breakpoints set by that command. This
5203 applies to breakpoints set by `rbreak', and also applies when a
5204 single `break' command creates multiple breakpoints (e.g.,
5205 breakpoints on overloaded c++ functions).
5207 * The `rbreak' command now accepts a filename specification as part of
5208 its argument, limiting the functions selected by the regex to those
5209 in the specified file.
5211 * Support for remote debugging Windows and SymbianOS shared libraries
5212 from Unix hosts has been improved. Non Windows GDB builds now can
5213 understand target reported file names that follow MS-DOS based file
5214 system semantics, such as file names that include drive letters and
5215 use the backslash character as directory separator. This makes it
5216 possible to transparently use the "set sysroot" and "set
5217 solib-search-path" on Unix hosts to point as host copies of the
5218 target's shared libraries. See the new command "set
5219 target-file-system-kind" described below, and the "Commands to
5220 specify files" section in the user manual for more information.
5224 eval template, expressions...
5225 Convert the values of one or more expressions under the control
5226 of the string template to a command line, and call it.
5228 set target-file-system-kind unix|dos-based|auto
5229 show target-file-system-kind
5230 Set or show the assumed file system kind for target reported file
5233 save breakpoints <filename>
5234 Save all current breakpoint definitions to a file suitable for use
5235 in a later debugging session. To read the saved breakpoint
5236 definitions, use the `source' command.
5238 `save tracepoints' is a new alias for `save-tracepoints'. The latter
5241 info static-tracepoint-markers
5242 Display information about static tracepoint markers in the target.
5244 strace FN | FILE:LINE | *ADDR | -m MARKER_ID
5245 Define a static tracepoint by probing a marker at the given
5246 function, line, address, or marker ID.
5250 Enable and disable observer mode.
5252 set may-write-registers on|off
5253 set may-write-memory on|off
5254 set may-insert-breakpoints on|off
5255 set may-insert-tracepoints on|off
5256 set may-insert-fast-tracepoints on|off
5257 set may-interrupt on|off
5258 Set individual permissions for GDB effects on the target. Note that
5259 some of these settings can have undesirable or surprising
5260 consequences, particularly when changed in the middle of a session.
5261 For instance, disabling the writing of memory can prevent
5262 breakpoints from being inserted, cause single-stepping to fail, or
5263 even crash your program, if you disable after breakpoints have been
5264 inserted. However, GDB should not crash.
5266 set record memory-query on|off
5267 show record memory-query
5268 Control whether to stop the inferior if memory changes caused
5269 by an instruction cannot be recorded.
5274 The disassemble command now supports "start,+length" form of two arguments.
5278 ** GDB now provides a new directory location, called the python directory,
5279 where Python scripts written for GDB can be installed. The location
5280 of that directory is <data-directory>/python, where <data-directory>
5281 is the GDB data directory. For more details, see section `Scripting
5282 GDB using Python' in the manual.
5284 ** The GDB Python API now has access to breakpoints, symbols, symbol
5285 tables, program spaces, inferiors, threads and frame's code blocks.
5286 Additionally, GDB Parameters can now be created from the API, and
5287 manipulated via set/show in the CLI.
5289 ** New functions gdb.target_charset, gdb.target_wide_charset,
5290 gdb.progspaces, gdb.current_progspace, and gdb.string_to_argv.
5292 ** New exception gdb.GdbError.
5294 ** Pretty-printers are now also looked up in the current program space.
5296 ** Pretty-printers can now be individually enabled and disabled.
5298 ** GDB now looks for names of Python scripts to auto-load in a
5299 special section named `.debug_gdb_scripts', in addition to looking
5300 for a OBJFILE-gdb.py script when OBJFILE is read by the debugger.
5302 * Tracepoint actions were unified with breakpoint commands. In particular,
5303 there are no longer differences in "info break" output for breakpoints and
5304 tracepoints and the "commands" command can be used for both tracepoints and
5305 regular breakpoints.
5309 ARM Symbian arm*-*-symbianelf*
5311 * D language support.
5312 GDB now supports debugging programs written in the D programming
5315 * GDB now supports the extended ptrace interface for PowerPC which is
5316 available since Linux kernel version 2.6.34. This automatically enables
5317 any hardware breakpoints and additional hardware watchpoints available in
5318 the processor. The old ptrace interface exposes just one hardware
5319 watchpoint and no hardware breakpoints.
5321 * GDB is now able to use the Data Value Compare (DVC) register available on
5322 embedded PowerPC processors to implement in hardware simple watchpoint
5323 conditions of the form:
5325 watch ADDRESS|VARIABLE if ADDRESS|VARIABLE == CONSTANT EXPRESSION
5327 This works in native GDB running on Linux kernels with the extended ptrace
5328 interface mentioned above.
5330 *** Changes in GDB 7.1
5334 ** Namespace Support
5336 GDB now supports importing of namespaces in C++. This enables the
5337 user to inspect variables from imported namespaces. Support for
5338 namepace aliasing has also been added. So, if a namespace is
5339 aliased in the current scope (e.g. namepace C=A; ) the user can
5340 print variables using the alias (e.g. (gdb) print C::x).
5344 All known bugs relating to the printing of virtual base class were
5345 fixed. It is now possible to call overloaded static methods using a
5350 The C++ cast operators static_cast<>, dynamic_cast<>, const_cast<>,
5351 and reinterpret_cast<> are now handled by the C++ expression parser.
5355 Xilinx MicroBlaze microblaze-*-*
5360 Xilinx MicroBlaze microblaze
5363 * Multi-program debugging.
5365 GDB now has support for multi-program (a.k.a. multi-executable or
5366 multi-exec) debugging. This allows for debugging multiple inferiors
5367 simultaneously each running a different program under the same GDB
5368 session. See "Debugging Multiple Inferiors and Programs" in the
5369 manual for more information. This implied some user visible changes
5370 in the multi-inferior support. For example, "info inferiors" now
5371 lists inferiors that are not running yet or that have exited
5372 already. See also "New commands" and "New options" below.
5374 * New tracing features
5376 GDB's tracepoint facility now includes several new features:
5378 ** Trace state variables
5380 GDB tracepoints now include support for trace state variables, which
5381 are variables managed by the target agent during a tracing
5382 experiment. They are useful for tracepoints that trigger each
5383 other, so for instance one tracepoint can count hits in a variable,
5384 and then a second tracepoint has a condition that is true when the
5385 count reaches a particular value. Trace state variables share the
5386 $-syntax of GDB convenience variables, and can appear in both
5387 tracepoint actions and condition expressions. Use the "tvariable"
5388 command to create, and "info tvariables" to view; see "Trace State
5389 Variables" in the manual for more detail.
5393 GDB now includes an option for defining fast tracepoints, which
5394 targets may implement more efficiently, such as by installing a jump
5395 into the target agent rather than a trap instruction. The resulting
5396 speedup can be by two orders of magnitude or more, although the
5397 tradeoff is that some program locations on some target architectures
5398 might not allow fast tracepoint installation, for instance if the
5399 instruction to be replaced is shorter than the jump. To request a
5400 fast tracepoint, use the "ftrace" command, with syntax identical to
5401 the regular trace command.
5403 ** Disconnected tracing
5405 It is now possible to detach GDB from the target while it is running
5406 a trace experiment, then reconnect later to see how the experiment
5407 is going. In addition, a new variable disconnected-tracing lets you
5408 tell the target agent whether to continue running a trace if the
5409 connection is lost unexpectedly.
5413 GDB now has the ability to save the trace buffer into a file, and
5414 then use that file as a target, similarly to you can do with
5415 corefiles. You can select trace frames, print data that was
5416 collected in them, and use tstatus to display the state of the
5417 tracing run at the moment that it was saved. To create a trace
5418 file, use "tsave <filename>", and to use it, do "target tfile
5421 ** Circular trace buffer
5423 You can ask the target agent to handle the trace buffer as a
5424 circular buffer, discarding the oldest trace frames to make room for
5425 newer ones, by setting circular-trace-buffer to on. This feature may
5426 not be available for all target agents.
5431 The disassemble command, when invoked with two arguments, now requires
5432 the arguments to be comma-separated.
5435 The info variables command now displays variable definitions. Files
5436 which only declare a variable are not shown.
5439 The source command is now capable of sourcing Python scripts.
5440 This feature is dependent on the debugger being build with Python
5443 Related to this enhancement is also the introduction of a new command
5444 "set script-extension" (see below).
5446 * New commands (for set/show, see "New options" below)
5448 record save [<FILENAME>]
5449 Save a file (in core file format) containing the process record
5450 execution log for replay debugging at a later time.
5452 record restore <FILENAME>
5453 Restore the process record execution log that was saved at an
5454 earlier time, for replay debugging.
5456 add-inferior [-copies <N>] [-exec <FILENAME>]
5459 clone-inferior [-copies <N>] [ID]
5460 Make a new inferior ready to execute the same program another
5461 inferior has loaded.
5466 maint info program-spaces
5467 List the program spaces loaded into GDB.
5469 set remote interrupt-sequence [Ctrl-C | BREAK | BREAK-g]
5470 show remote interrupt-sequence
5471 Allow the user to select one of ^C, a BREAK signal or BREAK-g
5472 as the sequence to the remote target in order to interrupt the execution.
5473 Ctrl-C is a default. Some system prefers BREAK which is high level of
5474 serial line for some certain time. Linux kernel prefers BREAK-g, a.k.a
5475 Magic SysRq g. It is BREAK signal and character 'g'.
5477 set remote interrupt-on-connect [on | off]
5478 show remote interrupt-on-connect
5479 When interrupt-on-connect is ON, gdb sends interrupt-sequence to
5480 remote target when gdb connects to it. This is needed when you debug
5483 set remotebreak [on | off]
5485 Deprecated. Use "set/show remote interrupt-sequence" instead.
5487 tvariable $NAME [ = EXP ]
5488 Create or modify a trace state variable.
5491 List trace state variables and their values.
5493 delete tvariable $NAME ...
5494 Delete one or more trace state variables.
5497 Evaluate the given expressions without collecting anything into the
5498 trace buffer. (Valid in tracepoint actions only.)
5500 ftrace FN / FILE:LINE / *ADDR
5501 Define a fast tracepoint at the given function, line, or address.
5503 * New expression syntax
5505 GDB now parses the 0b prefix of binary numbers the same way as GCC does.
5506 GDB now parses 0b101010 identically with 42.
5510 set follow-exec-mode new|same
5511 show follow-exec-mode
5512 Control whether GDB reuses the same inferior across an exec call or
5513 creates a new one. This is useful to be able to restart the old
5514 executable after the inferior having done an exec call.
5516 set default-collect EXPR, ...
5517 show default-collect
5518 Define a list of expressions to be collected at each tracepoint.
5519 This is a useful way to ensure essential items are not overlooked,
5520 such as registers or a critical global variable.
5522 set disconnected-tracing
5523 show disconnected-tracing
5524 If set to 1, the target is instructed to continue tracing if it
5525 loses its connection to GDB. If 0, the target is to stop tracing
5528 set circular-trace-buffer
5529 show circular-trace-buffer
5530 If set to on, the target is instructed to use a circular trace buffer
5531 and discard the oldest trace frames instead of stopping the trace due
5532 to a full trace buffer. If set to off, the trace stops when the buffer
5533 fills up. Some targets may not support this.
5535 set script-extension off|soft|strict
5536 show script-extension
5537 If set to "off", the debugger does not perform any script language
5538 recognition, and all sourced files are assumed to be GDB scripts.
5539 If set to "soft" (the default), files are sourced according to
5540 filename extension, falling back to GDB scripts if the first
5542 If set to "strict", files are sourced according to filename extension.
5544 set ada trust-PAD-over-XVS on|off
5545 show ada trust-PAD-over-XVS
5546 If off, activate a workaround against a bug in the debugging information
5547 generated by the compiler for PAD types (see gcc/exp_dbug.ads in
5548 the GCC sources for more information about the GNAT encoding and
5549 PAD types in particular). It is always safe to set this option to
5550 off, but this introduces a slight performance penalty. The default
5553 * Python API Improvements
5555 ** GDB provides the new class gdb.LazyString. This is useful in
5556 some pretty-printing cases. The new method gdb.Value.lazy_string
5557 provides a simple way to create objects of this type.
5559 ** The fields returned by gdb.Type.fields now have an
5560 `is_base_class' attribute.
5562 ** The new method gdb.Type.range returns the range of an array type.
5564 ** The new method gdb.parse_and_eval can be used to parse and
5565 evaluate an expression.
5567 * New remote packets
5570 Define a trace state variable.
5573 Get the current value of a trace state variable.
5576 Set desired tracing behavior upon disconnection.
5579 Set the trace buffer to be linear or circular.
5582 Get data about the tracepoints currently in use.
5586 Process record now works correctly with hardware watchpoints.
5588 Multiple bug fixes have been made to the mips-irix port, making it
5589 much more reliable. In particular:
5590 - Debugging threaded applications is now possible again. Previously,
5591 GDB would hang while starting the program, or while waiting for
5592 the program to stop at a breakpoint.
5593 - Attaching to a running process no longer hangs.
5594 - An error occurring while loading a core file has been fixed.
5595 - Changing the value of the PC register now works again. This fixes
5596 problems observed when using the "jump" command, or when calling
5597 a function from GDB, or even when assigning a new value to $pc.
5598 - With the "finish" and "return" commands, the return value for functions
5599 returning a small array is now correctly printed.
5600 - It is now possible to break on shared library code which gets executed
5601 during a shared library init phase (code executed while executing
5602 their .init section). Previously, the breakpoint would have no effect.
5603 - GDB is now able to backtrace through the signal handler for
5604 non-threaded programs.
5606 PIE (Position Independent Executable) programs debugging is now supported.
5607 This includes debugging execution of PIC (Position Independent Code) shared
5608 libraries although for that, it should be possible to run such libraries as an
5611 *** Changes in GDB 7.0
5613 * GDB now has an interface for JIT compilation. Applications that
5614 dynamically generate code can create symbol files in memory and register
5615 them with GDB. For users, the feature should work transparently, and
5616 for JIT developers, the interface is documented in the GDB manual in the
5617 "JIT Compilation Interface" chapter.
5619 * Tracepoints may now be conditional. The syntax is as for
5620 breakpoints; either an "if" clause appended to the "trace" command,
5621 or the "condition" command is available. GDB sends the condition to
5622 the target for evaluation using the same bytecode format as is used
5623 for tracepoint actions.
5625 * The disassemble command now supports: an optional /r modifier, print the
5626 raw instructions in hex as well as in symbolic form, and an optional /m
5627 modifier to print mixed source+assembly.
5629 * Process record and replay
5631 In a architecture environment that supports ``process record and
5632 replay'', ``process record and replay'' target can record a log of
5633 the process execution, and replay it with both forward and reverse
5636 * Reverse debugging: GDB now has new commands reverse-continue, reverse-
5637 step, reverse-next, reverse-finish, reverse-stepi, reverse-nexti, and
5638 set execution-direction {forward|reverse}, for targets that support
5641 * GDB now supports hardware watchpoints on MIPS/Linux systems. This
5642 feature is available with a native GDB running on kernel version
5645 * GDB now has support for multi-byte and wide character sets on the
5646 target. Strings whose character type is wchar_t, char16_t, or
5647 char32_t are now correctly printed. GDB supports wide- and unicode-
5648 literals in C, that is, L'x', L"string", u'x', u"string", U'x', and
5649 U"string" syntax. And, GDB allows the "%ls" and "%lc" formats in
5650 `printf'. This feature requires iconv to work properly; if your
5651 system does not have a working iconv, GDB can use GNU libiconv. See
5652 the installation instructions for more information.
5654 * GDB now supports automatic retrieval of shared library files from
5655 remote targets. To use this feature, specify a system root that begins
5656 with the `remote:' prefix, either via the `set sysroot' command or via
5657 the `--with-sysroot' configure-time option.
5659 * "info sharedlibrary" now takes an optional regex of libraries to show,
5660 and it now reports if a shared library has no debugging information.
5662 * Commands `set debug-file-directory', `set solib-search-path' and `set args'
5663 now complete on file names.
5665 * When completing in expressions, gdb will attempt to limit
5666 completions to allowable structure or union fields, where appropriate.
5667 For instance, consider:
5669 # struct example { int f1; double f2; };
5670 # struct example variable;
5673 If the user types TAB at the end of this command line, the available
5674 completions will be "f1" and "f2".
5676 * Inlined functions are now supported. They show up in backtraces, and
5677 the "step", "next", and "finish" commands handle them automatically.
5679 * GDB now supports the token-splicing (##) and stringification (#)
5680 operators when expanding macros. It also supports variable-arity
5683 * GDB now supports inspecting extra signal information, exported by
5684 the new $_siginfo convenience variable. The feature is currently
5685 implemented on linux ARM, i386 and amd64.
5687 * GDB can now display the VFP floating point registers and NEON vector
5688 registers on ARM targets. Both ARM GNU/Linux native GDB and gdbserver
5689 can provide these registers (requires Linux 2.6.30 or later). Remote
5690 and simulator targets may also provide them.
5692 * New remote packets
5695 Search memory for a sequence of bytes.
5698 Turn off `+'/`-' protocol acknowledgments to permit more efficient
5699 operation over reliable transport links. Use of this packet is
5700 controlled by the `set remote noack-packet' command.
5703 Kill the process with the specified process ID. Use this in preference
5704 to `k' when multiprocess protocol extensions are supported.
5707 Obtains additional operating system information
5711 Read or write additional signal information.
5713 * Removed remote protocol undocumented extension
5715 An undocumented extension to the remote protocol's `S' stop reply
5716 packet that permitted the stub to pass a process id was removed.
5717 Remote servers should use the `T' stop reply packet instead.
5719 * GDB now supports multiple function calling conventions according to the
5720 DWARF-2 DW_AT_calling_convention function attribute.
5722 * The SH target utilizes the aforementioned change to distinguish between gcc
5723 and Renesas calling convention. It also adds the new CLI commands
5724 `set/show sh calling-convention'.
5726 * GDB can now read compressed debug sections, as produced by GNU gold
5727 with the --compress-debug-sections=zlib flag.
5729 * 64-bit core files are now supported on AIX.
5731 * Thread switching is now supported on Tru64.
5733 * Watchpoints can now be set on unreadable memory locations, e.g. addresses
5734 which will be allocated using malloc later in program execution.
5736 * The qXfer:libraries:read remote protocol packet now allows passing a
5737 list of section offsets.
5739 * On GNU/Linux, GDB can now attach to stopped processes. Several race
5740 conditions handling signals delivered during attach or thread creation
5741 have also been fixed.
5743 * GDB now supports the use of DWARF boolean types for Ada's type Boolean.
5744 From the user's standpoint, all unqualified instances of True and False
5745 are treated as the standard definitions, regardless of context.
5747 * GDB now parses C++ symbol and type names more flexibly. For
5750 template<typename T> class C { };
5753 GDB will now correctly handle all of:
5755 ptype C<char const *>
5756 ptype C<char const*>
5757 ptype C<const char *>
5758 ptype C<const char*>
5760 * New features in the GDB remote stub, gdbserver
5762 - The "--wrapper" command-line argument tells gdbserver to use a
5763 wrapper program to launch programs for debugging.
5765 - On PowerPC and S/390 targets, it is now possible to use a single
5766 gdbserver executable to debug both 32-bit and 64-bit programs.
5767 (This requires gdbserver itself to be built as a 64-bit executable.)
5769 - gdbserver uses the new noack protocol mode for TCP connections to
5770 reduce communications latency, if also supported and enabled in GDB.
5772 - Support for the sparc64-linux-gnu target is now included in
5775 - The amd64-linux build of gdbserver now supports debugging both
5776 32-bit and 64-bit programs.
5778 - The i386-linux, amd64-linux, and i386-win32 builds of gdbserver
5779 now support hardware watchpoints, and will use them automatically
5784 GDB now has support for scripting using Python. Whether this is
5785 available is determined at configure time.
5787 New GDB commands can now be written in Python.
5789 * Ada tasking support
5791 Ada tasks can now be inspected in GDB. The following commands have
5795 Print the list of Ada tasks.
5797 Print detailed information about task number N.
5799 Print the task number of the current task.
5801 Switch the context of debugging to task number N.
5803 * Support for user-defined prefixed commands. The "define" command can
5804 add new commands to existing prefixes, e.g. "target".
5806 * Multi-inferior, multi-process debugging.
5808 GDB now has generalized support for multi-inferior debugging. See
5809 "Debugging Multiple Inferiors" in the manual for more information.
5810 Although availability still depends on target support, the command
5811 set is more uniform now. The GNU/Linux specific multi-forks support
5812 has been migrated to this new framework. This implied some user
5813 visible changes; see "New commands" and also "Removed commands"
5816 * Target descriptions can now describe the target OS ABI. See the
5817 "Target Description Format" section in the user manual for more
5820 * Target descriptions can now describe "compatible" architectures
5821 to indicate that the target can execute applications for a different
5822 architecture in addition to those for the main target architecture.
5823 See the "Target Description Format" section in the user manual for
5826 * Multi-architecture debugging.
5828 GDB now includes general supports for debugging applications on
5829 hybrid systems that use more than one single processor architecture
5830 at the same time. Each such hybrid architecture still requires
5831 specific support to be added. The only hybrid architecture supported
5832 in this version of GDB is the Cell Broadband Engine.
5834 * GDB now supports integrated debugging of Cell/B.E. applications that
5835 use both the PPU and SPU architectures. To enable support for hybrid
5836 Cell/B.E. debugging, you need to configure GDB to support both the
5837 powerpc-linux or powerpc64-linux and the spu-elf targets, using the
5838 --enable-targets configure option.
5840 * Non-stop mode debugging.
5842 For some targets, GDB now supports an optional mode of operation in
5843 which you can examine stopped threads while other threads continue
5844 to execute freely. This is referred to as non-stop mode, with the
5845 old mode referred to as all-stop mode. See the "Non-Stop Mode"
5846 section in the user manual for more information.
5848 To be able to support remote non-stop debugging, a remote stub needs
5849 to implement the non-stop mode remote protocol extensions, as
5850 described in the "Remote Non-Stop" section of the user manual. The
5851 GDB remote stub, gdbserver, has been adjusted to support these
5852 extensions on linux targets.
5854 * New commands (for set/show, see "New options" below)
5856 catch syscall [NAME(S) | NUMBER(S)]
5857 Catch system calls. Arguments, which should be names of system
5858 calls or their numbers, mean catch only those syscalls. Without
5859 arguments, every syscall will be caught. When the inferior issues
5860 any of the specified syscalls, GDB will stop and announce the system
5861 call, both when it is called and when its call returns. This
5862 feature is currently available with a native GDB running on the
5863 Linux Kernel, under the following architectures: x86, x86_64,
5864 PowerPC and PowerPC64.
5866 find [/size-char] [/max-count] start-address, end-address|+search-space-size,
5868 Search memory for a sequence of bytes.
5870 maint set python print-stack
5871 maint show python print-stack
5872 Show a stack trace when an error is encountered in a Python script.
5875 Invoke CODE by passing it to the Python interpreter.
5880 These allow macros to be defined, undefined, and listed
5884 Show operating system information about processes.
5887 List the inferiors currently under GDB's control.
5890 Switch focus to inferior number NUM.
5893 Detach from inferior number NUM.
5896 Kill inferior number NUM.
5900 set spu stop-on-load
5901 show spu stop-on-load
5902 Control whether to stop for new SPE threads during Cell/B.E. debugging.
5904 set spu auto-flush-cache
5905 show spu auto-flush-cache
5906 Control whether to automatically flush the software-managed cache
5907 during Cell/B.E. debugging.
5909 set sh calling-convention
5910 show sh calling-convention
5911 Control the calling convention used when calling SH target functions.
5914 show debug timestamp
5915 Control display of timestamps with GDB debugging output.
5917 set disassemble-next-line
5918 show disassemble-next-line
5919 Control display of disassembled source lines or instructions when
5922 set remote noack-packet
5923 show remote noack-packet
5924 Set/show the use of remote protocol QStartNoAckMode packet. See above
5925 under "New remote packets."
5927 set remote query-attached-packet
5928 show remote query-attached-packet
5929 Control use of remote protocol `qAttached' (query-attached) packet.
5931 set remote read-siginfo-object
5932 show remote read-siginfo-object
5933 Control use of remote protocol `qXfer:siginfo:read' (read-siginfo-object)
5936 set remote write-siginfo-object
5937 show remote write-siginfo-object
5938 Control use of remote protocol `qXfer:siginfo:write' (write-siginfo-object)
5941 set remote reverse-continue
5942 show remote reverse-continue
5943 Control use of remote protocol 'bc' (reverse-continue) packet.
5945 set remote reverse-step
5946 show remote reverse-step
5947 Control use of remote protocol 'bs' (reverse-step) packet.
5949 set displaced-stepping
5950 show displaced-stepping
5951 Control displaced stepping mode. Displaced stepping is a way to
5952 single-step over breakpoints without removing them from the debuggee.
5953 Also known as "out-of-line single-stepping".
5956 show debug displaced
5957 Control display of debugging info for displaced stepping.
5959 maint set internal-error
5960 maint show internal-error
5961 Control what GDB does when an internal error is detected.
5963 maint set internal-warning
5964 maint show internal-warning
5965 Control what GDB does when an internal warning is detected.
5970 Use a wrapper program to launch programs for debugging.
5972 set multiple-symbols (all|ask|cancel)
5973 show multiple-symbols
5974 The value of this variable can be changed to adjust the debugger behavior
5975 when an expression or a breakpoint location contains an ambiguous symbol
5976 name (an overloaded function name, for instance).
5978 set breakpoint always-inserted
5979 show breakpoint always-inserted
5980 Keep breakpoints always inserted in the target, as opposed to inserting
5981 them when resuming the target, and removing them when the target stops.
5982 This option can improve debugger performance on slow remote targets.
5984 set arm fallback-mode (arm|thumb|auto)
5985 show arm fallback-mode
5986 set arm force-mode (arm|thumb|auto)
5988 These commands control how ARM GDB determines whether instructions
5989 are ARM or Thumb. The default for both settings is auto, which uses
5990 the current CPSR value for instructions without symbols; previous
5991 versions of GDB behaved as if "set arm fallback-mode arm".
5993 set arm unwind-secure-frames
5994 Enable unwinding from Non-secure to Secure mode on Cortex-M with
5996 This can trigger security exceptions when unwinding exception stacks.
5998 set disable-randomization
5999 show disable-randomization
6000 Standalone programs run with the virtual address space randomization enabled
6001 by default on some platforms. This option keeps the addresses stable across
6002 multiple debugging sessions.
6006 Control whether other threads are stopped or not when some thread hits
6011 Requests that asynchronous execution is enabled in the target, if available.
6012 In this case, it's possible to resume target in the background, and interact
6013 with GDB while the target is running. "show target-async" displays the
6014 current state of asynchronous execution of the target.
6016 set target-wide-charset
6017 show target-wide-charset
6018 The target-wide-charset is the name of the character set that GDB
6019 uses when printing characters whose type is wchar_t.
6021 set tcp auto-retry (on|off)
6023 set tcp connect-timeout
6024 show tcp connect-timeout
6025 These commands allow GDB to retry failed TCP connections to a remote stub
6026 with a specified timeout period; this is useful if the stub is launched
6027 in parallel with GDB but may not be ready to accept connections immediately.
6029 set libthread-db-search-path
6030 show libthread-db-search-path
6031 Control list of directories which GDB will search for appropriate
6034 set schedule-multiple (on|off)
6035 show schedule-multiple
6036 Allow GDB to resume all threads of all processes or only threads of
6037 the current process.
6041 Use more aggressive caching for accesses to the stack. This improves
6042 performance of remote debugging (particularly backtraces) without
6043 affecting correctness.
6045 set interactive-mode (on|off|auto)
6046 show interactive-mode
6047 Control whether GDB runs in interactive mode (on) or not (off).
6048 When in interactive mode, GDB waits for the user to answer all
6049 queries. Otherwise, GDB does not wait and assumes the default
6050 answer. When set to auto (the default), GDB determines which
6051 mode to use based on the stdin settings.
6056 For program forks, this is replaced by the new more generic `info
6057 inferiors' command. To list checkpoints, you can still use the
6058 `info checkpoints' command, which was an alias for the `info forks'
6062 Replaced by the new `inferior' command. To switch between
6063 checkpoints, you can still use the `restart' command, which was an
6064 alias for the `fork' command.
6067 This is removed, since some targets don't have a notion of
6068 processes. To switch between processes, you can still use the
6069 `inferior' command using GDB's own inferior number.
6072 For program forks, this is replaced by the new more generic `kill
6073 inferior' command. To delete a checkpoint, you can still use the
6074 `delete checkpoint' command, which was an alias for the `delete
6078 For program forks, this is replaced by the new more generic `detach
6079 inferior' command. To detach a checkpoint, you can still use the
6080 `detach checkpoint' command, which was an alias for the `detach
6083 * New native configurations
6085 x86/x86_64 Darwin i[34567]86-*-darwin*
6087 x86_64 MinGW x86_64-*-mingw*
6091 Lattice Mico32 lm32-*
6092 x86 DICOS i[34567]86-*-dicos*
6093 x86_64 DICOS x86_64-*-dicos*
6096 * The GDB remote stub, gdbserver, now supports x86 Windows CE
6097 (mingw32ce) debugging.
6103 These commands were actually not implemented on any target.
6105 *** Changes in GDB 6.8
6107 * New native configurations
6109 NetBSD/hppa hppa*-*netbsd*
6110 Xtensa GNU/Linux xtensa*-*-linux*
6114 NetBSD/hppa hppa*-*-netbsd*
6115 Xtensa GNU/Linux xtensa*-*-linux*
6117 * Change in command line behavior -- corefiles vs. process ids.
6119 When the '-p NUMBER' or '--pid NUMBER' options are used, and
6120 attaching to process NUMBER fails, GDB no longer attempts to open a
6121 core file named NUMBER. Attaching to a program using the -c option
6122 is no longer supported. Instead, use the '-p' or '--pid' options.
6124 * GDB can now be built as a native debugger for debugging Windows x86
6125 (mingw32) Portable Executable (PE) programs.
6127 * Pending breakpoints no longer change their number when their address
6130 * GDB now supports breakpoints with multiple locations,
6131 including breakpoints on C++ constructors, inside C++ templates,
6132 and in inlined functions.
6134 * GDB's ability to debug optimized code has been improved. GDB more
6135 accurately identifies function bodies and lexical blocks that occupy
6136 more than one contiguous range of addresses.
6138 * Target descriptions can now describe registers for PowerPC.
6140 * The GDB remote stub, gdbserver, now supports the AltiVec and SPE
6141 registers on PowerPC targets.
6143 * The GDB remote stub, gdbserver, now supports thread debugging on GNU/Linux
6144 targets even when the libthread_db library is not available.
6146 * The GDB remote stub, gdbserver, now supports the new file transfer
6147 commands (remote put, remote get, and remote delete).
6149 * The GDB remote stub, gdbserver, now supports run and attach in
6150 extended-remote mode.
6152 * hppa*64*-*-hpux11* target broken
6153 The debugger is unable to start a program and fails with the following
6154 error: "Error trying to get information about dynamic linker".
6155 The gdb-6.7 release is also affected.
6157 * GDB now supports the --enable-targets= configure option to allow
6158 building a single GDB executable that supports multiple remote
6159 target architectures.
6161 * GDB now supports debugging C and C++ programs which use the
6162 Decimal Floating Point extension. In addition, the PowerPC target
6163 now has a set of pseudo-registers to inspect decimal float values
6164 stored in two consecutive float registers.
6166 * The -break-insert MI command can optionally create pending
6169 * Improved support for debugging Ada
6170 Many improvements to the Ada language support have been made. These
6172 - Better support for Ada2005 interface types
6173 - Improved handling of arrays and slices in general
6174 - Better support for Taft-amendment types
6175 - The '{type} ADDRESS' expression is now allowed on the left hand-side
6177 - Improved command completion in Ada
6180 * GDB on GNU/Linux and HP/UX can now debug through "exec" of a new
6185 set print frame-arguments (all|scalars|none)
6186 show print frame-arguments
6187 The value of this variable can be changed to control which argument
6188 values should be printed by the debugger when displaying a frame.
6193 Transfer files to and from a remote target, and delete remote files.
6200 Transfer files to and from a remote target, and delete remote files.
6202 * New remote packets
6209 Open, close, read, write, and delete files on the remote system.
6212 Attach to an existing process on the remote system, in extended-remote
6216 Run a new process on the remote system, in extended-remote mode.
6218 *** Changes in GDB 6.7
6220 * Resolved 101 resource leaks, null pointer dereferences, etc. in gdb,
6221 bfd, libiberty and opcodes, as revealed by static analysis donated by
6222 Coverity, Inc. (http://scan.coverity.com).
6224 * When looking up multiply-defined global symbols, GDB will now prefer the
6225 symbol definition in the current shared library if it was built using the
6226 -Bsymbolic linker option.
6228 * When the Text User Interface (TUI) is not configured, GDB will now
6229 recognize the -tui command-line option and print a message that the TUI
6232 * The GDB remote stub, gdbserver, now has lower overhead for high
6233 frequency signals (e.g. SIGALRM) via the QPassSignals packet.
6235 * GDB for MIPS targets now autodetects whether a remote target provides
6236 32-bit or 64-bit register values.
6238 * Support for C++ member pointers has been improved.
6240 * GDB now understands XML target descriptions, which specify the
6241 target's overall architecture. GDB can read a description from
6242 a local file or over the remote serial protocol.
6244 * Vectors of single-byte data use a new integer type which is not
6245 automatically displayed as character or string data.
6247 * The /s format now works with the print command. It displays
6248 arrays of single-byte integers and pointers to single-byte integers
6251 * Target descriptions can now describe target-specific registers,
6252 for architectures which have implemented the support (currently
6253 only ARM, M68K, and MIPS).
6255 * GDB and the GDB remote stub, gdbserver, now support the XScale
6258 * The GDB remote stub, gdbserver, has been updated to support
6259 ARM Windows CE (mingw32ce) debugging, and GDB Windows CE support
6260 has been rewritten to use the standard GDB remote protocol.
6262 * GDB can now step into C++ functions which are called through thunks.
6264 * GDB for the Cell/B.E. SPU now supports overlay debugging.
6266 * The GDB remote protocol "qOffsets" packet can now honor ELF segment
6267 layout. It also supports a TextSeg= and DataSeg= response when only
6268 segment base addresses (rather than offsets) are available.
6270 * The /i format now outputs any trailing branch delay slot instructions
6271 immediately following the last instruction within the count specified.
6273 * The GDB remote protocol "T" stop reply packet now supports a
6274 "library" response. Combined with the new "qXfer:libraries:read"
6275 packet, this response allows GDB to debug shared libraries on targets
6276 where the operating system manages the list of loaded libraries (e.g.
6277 Windows and SymbianOS).
6279 * The GDB remote stub, gdbserver, now supports dynamic link libraries
6280 (DLLs) on Windows and Windows CE targets.
6282 * GDB now supports a faster verification that a .debug file matches its binary
6283 according to its build-id signature, if the signature is present.
6289 Enable or disable hardware flow control (RTS/CTS) on the serial port
6290 when debugging using remote targets.
6292 set mem inaccessible-by-default
6293 show mem inaccessible-by-default
6294 If the target supplies a memory map, for instance via the remote
6295 protocol's "qXfer:memory-map:read" packet, setting this variable
6296 prevents GDB from accessing memory outside the memory map. This
6297 is useful for targets with memory mapped registers or which react
6298 badly to accesses of unmapped address space.
6300 set breakpoint auto-hw
6301 show breakpoint auto-hw
6302 If the target supplies a memory map, for instance via the remote
6303 protocol's "qXfer:memory-map:read" packet, setting this variable
6304 lets GDB use hardware breakpoints automatically for memory regions
6305 where it can not use software breakpoints. This covers both the
6306 "break" command and internal breakpoints used for other commands
6307 including "next" and "finish".
6310 catch exception unhandled
6311 Stop the program execution when Ada exceptions are raised.
6314 Stop the program execution when an Ada assertion failed.
6318 Set an alternate system root for target files. This is a more
6319 general version of "set solib-absolute-prefix", which is now
6320 an alias to "set sysroot".
6323 Provide extended SPU facility status information. This set of
6324 commands is available only when debugging the Cell/B.E. SPU
6327 * New native configurations
6329 OpenBSD/sh sh*-*openbsd*
6332 unset tdesc filename
6334 Use the specified local file as an XML target description, and do
6335 not query the target for its built-in description.
6339 OpenBSD/sh sh*-*-openbsd*
6340 MIPS64 GNU/Linux (gdbserver) mips64-linux-gnu
6341 Toshiba Media Processor mep-elf
6343 * New remote packets
6346 Ignore the specified signals; pass them directly to the debugged program
6347 without stopping other threads or reporting them to GDB.
6349 qXfer:features:read:
6350 Read an XML target description from the target, which describes its
6355 Read or write contents of an spufs file on the target system. These
6356 packets are available only on the Cell/B.E. SPU architecture.
6358 qXfer:libraries:read:
6359 Report the loaded shared libraries. Combined with new "T" packet
6360 response, this packet allows GDB to debug shared libraries on
6361 targets where the operating system manages the list of loaded
6362 libraries (e.g. Windows and SymbianOS).
6366 Support for these obsolete configurations has been removed.
6374 i[34567]86-*-lynxos*
6375 i[34567]86-*-netware*
6376 i[34567]86-*-sco3.2v5*
6377 i[34567]86-*-sco3.2v4*
6379 i[34567]86-*-sysv4.2*
6382 i[34567]86-*-unixware2*
6383 i[34567]86-*-unixware*
6392 * Other removed features
6399 Various m68k-only ROM monitors.
6406 Various Renesas ROM monitors and debugging interfaces for SH and
6411 Support for a Macraigor serial interface to on-chip debugging.
6412 GDB does not directly support the newer parallel or USB
6417 A debug information format. The predecessor to DWARF 2 and
6418 DWARF 3, which are still supported.
6420 Support for the HP aCC compiler on HP-UX/PA-RISC
6422 SOM-encapsulated symbolic debugging information, automatic
6423 invocation of pxdb, and the aCC custom C++ ABI. This does not
6424 affect HP-UX for Itanium or GCC for HP-UX/PA-RISC. Code compiled
6425 with aCC can still be debugged on an assembly level.
6427 MIPS ".pdr" sections
6429 A MIPS-specific format used to describe stack frame layout
6430 in debugging information.
6434 GDB could work with an older version of Guile to debug
6435 the interpreter and Scheme programs running in it.
6437 set mips stack-arg-size
6438 set mips saved-gpreg-size
6440 Use "set mips abi" to control parameter passing for MIPS.
6442 *** Changes in GDB 6.6
6447 Cell Broadband Engine SPU spu-elf
6449 * GDB can now be configured as a cross-debugger targeting native Windows
6450 (mingw32) or Cygwin. It can communicate with a remote debugging stub
6451 running on a Windows system over TCP/IP to debug Windows programs.
6453 * The GDB remote stub, gdbserver, has been updated to support Windows and
6454 Cygwin debugging. Both single-threaded and multi-threaded programs are
6457 * The "set trust-readonly-sections" command works again. This command was
6458 broken in GDB 6.3, 6.4, and 6.5.
6460 * The "load" command now supports writing to flash memory, if the remote
6461 stub provides the required support.
6463 * Support for GNU/Linux Thread Local Storage (TLS, per-thread variables) no
6464 longer requires symbolic debug information (e.g. DWARF-2).
6469 unset substitute-path
6470 show substitute-path
6471 Manage a list of substitution rules that GDB uses to rewrite the name
6472 of the directories where the sources are located. This can be useful
6473 for instance when the sources were moved to a different location
6474 between compilation and debugging.
6478 Print each CLI command as it is executed. Each command is prefixed with
6479 a number of `+' symbols representing the nesting depth.
6480 The source command now has a `-v' option to enable the same feature.
6484 The ARM Demon monitor support (RDP protocol, "target rdp").
6486 Kernel Object Display, an embedded debugging feature which only worked with
6487 an obsolete version of Cisco IOS.
6489 The 'set download-write-size' and 'show download-write-size' commands.
6491 * New remote packets
6494 Tell a stub about GDB client features, and request remote target features.
6495 The first feature implemented is PacketSize, which allows the target to
6496 specify the size of packets it can handle - to minimize the number of
6497 packets required and improve performance when connected to a remote
6501 Fetch an OS auxilliary vector from the remote stub. This packet is a
6502 more efficient replacement for qPart:auxv:read.
6504 qXfer:memory-map:read:
6505 Fetch a memory map from the remote stub, including information about
6506 RAM, ROM, and flash memory devices.
6511 Erase and program a flash memory device.
6513 * Removed remote packets
6516 This packet has been replaced by qXfer:auxv:read. Only GDB 6.4 and 6.5
6517 used it, and only gdbserver implemented it.
6519 *** Changes in GDB 6.5
6523 Renesas M32C/M16C m32c-elf
6525 Morpho Technologies ms1 ms1-elf
6529 init-if-undefined Initialize a convenience variable, but
6530 only if it doesn't already have a value.
6532 The following commands are presently only implemented for native GNU/Linux:
6534 checkpoint Save a snapshot of the program state.
6536 restart <n> Return the program state to a
6537 previously saved state.
6539 info checkpoints List currently saved checkpoints.
6541 delete-checkpoint <n> Delete a previously saved checkpoint.
6543 set|show detach-on-fork Tell gdb whether to detach from a newly
6544 forked process, or to keep debugging it.
6546 info forks List forks of the user program that
6547 are available to be debugged.
6549 fork <n> Switch to debugging one of several
6550 forks of the user program that are
6551 available to be debugged.
6553 delete-fork <n> Delete a fork from the list of forks
6554 that are available to be debugged (and
6555 kill the forked process).
6557 detach-fork <n> Delete a fork from the list of forks
6558 that are available to be debugged (and
6559 allow the process to continue).
6563 Morpho Technologies ms2 ms1-elf
6565 * Improved Windows host support
6567 GDB now builds as a cross debugger hosted on i686-mingw32, including
6568 native console support, and remote communications using either
6569 network sockets or serial ports.
6571 * Improved Modula-2 language support
6573 GDB can now print most types in the Modula-2 syntax. This includes:
6574 basic types, set types, record types, enumerated types, range types,
6575 pointer types and ARRAY types. Procedure var parameters are correctly
6576 printed and hexadecimal addresses and character constants are also
6577 written in the Modula-2 syntax. Best results can be obtained by using
6578 GNU Modula-2 together with the -gdwarf-2 command line option.
6582 The ARM rdi-share module.
6584 The Netware NLM debug server.
6586 *** Changes in GDB 6.4
6588 * New native configurations
6590 OpenBSD/arm arm*-*-openbsd*
6591 OpenBSD/mips64 mips64-*-openbsd*
6595 Morpho Technologies ms1 ms1-elf
6597 * New command line options
6599 --batch-silent As for --batch, but totally silent.
6600 --return-child-result The debugger will exist with the same value
6601 the child (debugged) program exited with.
6602 --eval-command COMMAND, -ex COMMAND
6603 Execute a single GDB CLI command. This may be
6604 specified multiple times and in conjunction
6605 with the --command (-x) option.
6607 * Deprecated commands removed
6609 The following commands, that were deprecated in 2000, have been
6613 set|show arm disassembly-flavor set|show arm disassembler
6614 othernames set arm disassembler
6615 set|show remotedebug set|show debug remote
6616 set|show archdebug set|show debug arch
6617 set|show eventdebug set|show debug event
6620 * New BSD user-level threads support
6622 It is now possible to debug programs using the user-level threads
6623 library on OpenBSD and FreeBSD. Currently supported (target)
6626 FreeBSD/amd64 x86_64-*-freebsd*
6627 FreeBSD/i386 i386-*-freebsd*
6628 OpenBSD/i386 i386-*-openbsd*
6630 Note that the new kernel threads libraries introduced in FreeBSD 5.x
6631 are not yet supported.
6633 * New support for Matsushita MN10300 w/sim added
6634 (Work in progress). mn10300-elf.
6636 * REMOVED configurations and files
6638 VxWorks and the XDR protocol *-*-vxworks
6639 Motorola MCORE mcore-*-*
6640 National Semiconductor NS32000 ns32k-*-*
6642 * New "set print array-indexes" command
6644 After turning this setting "on", GDB prints the index of each element
6645 when displaying arrays. The default is "off" to preserve the previous
6648 * VAX floating point support
6650 GDB now supports the not-quite-ieee VAX F and D floating point formats.
6652 * User-defined command support
6654 In addition to using $arg0..$arg9 for argument passing, it is now possible
6655 to use $argc to determine now many arguments have been passed. See the
6656 section on user-defined commands in the user manual for more information.
6658 *** Changes in GDB 6.3:
6660 * New command line option
6662 GDB now accepts -l followed by a number to set the timeout for remote
6665 * GDB works with GCC -feliminate-dwarf2-dups
6667 GDB now supports a more compact representation of DWARF-2 debug
6668 information using DW_FORM_ref_addr references. These are produced
6669 by GCC with the option -feliminate-dwarf2-dups and also by some
6670 proprietary compilers. With GCC, you must use GCC 3.3.4 or later
6671 to use -feliminate-dwarf2-dups.
6673 * Internationalization
6675 When supported by the host system, GDB will be built with
6676 internationalization (libintl). The task of marking up the sources is
6677 continued, we're looking forward to our first translation.
6681 Initial support for debugging programs compiled with the GNAT
6682 implementation of the Ada programming language has been integrated
6683 into GDB. In this release, support is limited to expression evaluation.
6685 * New native configurations
6687 GNU/Linux/m32r m32r-*-linux-gnu
6691 GDB's remote protocol now includes support for the 'p' packet. This
6692 packet is used to fetch individual registers from a remote inferior.
6694 * END-OF-LIFE registers[] compatibility module
6696 GDB's internal register infrastructure has been completely rewritten.
6697 The new infrastructure making possible the implementation of key new
6698 features including 32x64 (e.g., 64-bit amd64 GDB debugging a 32-bit
6701 GDB 6.3 will be the last release to include the registers[]
6702 compatibility module that allowed out-of-date configurations to
6703 continue to work. This change directly impacts the following
6713 powerpc bdm protocol
6715 Unless there is activity to revive these configurations, they will be
6716 made OBSOLETE in GDB 6.4, and REMOVED from GDB 6.5.
6718 * OBSOLETE configurations and files
6720 Configurations that have been declared obsolete in this release have
6721 been commented out. Unless there is activity to revive these
6722 configurations, the next release of GDB will have their sources
6723 permanently REMOVED.
6732 *** Changes in GDB 6.2.1:
6734 * MIPS `break main; run' gave an heuristic-fence-post warning
6736 When attempting to run even a simple program, a warning about
6737 heuristic-fence-post being hit would be reported. This problem has
6740 * MIPS IRIX 'long double' crashed GDB
6742 When examining a long double variable, GDB would get a segmentation
6743 fault. The crash has been fixed (but GDB 6.2 cannot correctly examine
6744 IRIX long double values).
6748 A bug in the VAX stack code was causing problems with the "next"
6749 command. This problem has been fixed.
6751 *** Changes in GDB 6.2:
6753 * Fix for ``many threads''
6755 On GNU/Linux systems that use the NPTL threads library, a program
6756 rapidly creating and deleting threads would confuse GDB leading to the
6759 ptrace: No such process.
6760 thread_db_get_info: cannot get thread info: generic error
6762 This problem has been fixed.
6764 * "-async" and "-noasync" options removed.
6766 Support for the broken "-noasync" option has been removed (it caused
6769 * New ``start'' command.
6771 This command runs the program until the beginning of the main procedure.
6773 * New BSD Kernel Data Access Library (libkvm) interface
6775 Using ``target kvm'' it is now possible to debug kernel core dumps and
6776 live kernel memory images on various FreeBSD, NetBSD and OpenBSD
6777 platforms. Currently supported (native-only) configurations are:
6779 FreeBSD/amd64 x86_64-*-freebsd*
6780 FreeBSD/i386 i?86-*-freebsd*
6781 NetBSD/i386 i?86-*-netbsd*
6782 NetBSD/m68k m68*-*-netbsd*
6783 NetBSD/sparc sparc-*-netbsd*
6784 OpenBSD/amd64 x86_64-*-openbsd*
6785 OpenBSD/i386 i?86-*-openbsd*
6786 OpenBSD/m68k m68*-openbsd*
6787 OpenBSD/sparc sparc-*-openbsd*
6789 * Signal trampoline code overhauled
6791 Many generic problems with GDB's signal handling code have been fixed.
6792 These include: backtraces through non-contiguous stacks; recognition
6793 of sa_sigaction signal trampolines; backtrace from a NULL pointer
6794 call; backtrace through a signal trampoline; step into and out of
6795 signal handlers; and single-stepping in the signal trampoline.
6797 Please note that kernel bugs are a limiting factor here. These
6798 features have been shown to work on an s390 GNU/Linux system that
6799 include a 2.6.8-rc1 kernel. Ref PR breakpoints/1702.
6801 * Cygwin support for DWARF 2 added.
6803 * New native configurations
6805 GNU/Linux/hppa hppa*-*-linux*
6806 OpenBSD/hppa hppa*-*-openbsd*
6807 OpenBSD/m68k m68*-*-openbsd*
6808 OpenBSD/m88k m88*-*-openbsd*
6809 OpenBSD/powerpc powerpc-*-openbsd*
6810 NetBSD/vax vax-*-netbsd*
6811 OpenBSD/vax vax-*-openbsd*
6813 * END-OF-LIFE frame compatibility module
6815 GDB's internal frame infrastructure has been completely rewritten.
6816 The new infrastructure making it possible to support key new features
6817 including DWARF 2 Call Frame Information. To aid in the task of
6818 migrating old configurations to this new infrastructure, a
6819 compatibility module, that allowed old configurations to continue to
6820 work, was also included.
6822 GDB 6.2 will be the last release to include this frame compatibility
6823 module. This change directly impacts the following configurations:
6833 Unless there is activity to revive these configurations, they will be
6834 made OBSOLETE in GDB 6.3, and REMOVED from GDB 6.4.
6836 * REMOVED configurations and files
6838 Sun 3, running SunOS 3 m68*-*-sunos3*
6839 Sun 3, running SunOS 4 m68*-*-sunos4*
6840 Sun 2, running SunOS 3 m68000-*-sunos3*
6841 Sun 2, running SunOS 4 m68000-*-sunos4*
6842 Motorola 680x0 running LynxOS m68*-*-lynxos*
6843 AT&T 3b1/Unix pc m68*-att-*
6844 Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
6845 decstation mips-dec-* mips-little-*
6846 riscos mips-*-riscos* mips-*-sysv*
6847 sonymips mips-sony-*
6848 sysv mips*-*-sysv4* (IRIX 5/6 not included)
6850 *** Changes in GDB 6.1.1:
6852 * TUI (Text-mode User Interface) built-in (also included in GDB 6.1)
6854 The TUI (Text-mode User Interface) is now built as part of a default
6855 GDB configuration. It is enabled by either selecting the TUI with the
6856 command line option "-i=tui" or by running the separate "gdbtui"
6857 program. For more information on the TUI, see the manual "Debugging
6860 * Pending breakpoint support (also included in GDB 6.1)
6862 Support has been added to allow you to specify breakpoints in shared
6863 libraries that have not yet been loaded. If a breakpoint location
6864 cannot be found, and the "breakpoint pending" option is set to auto,
6865 GDB queries you if you wish to make the breakpoint pending on a future
6866 shared-library load. If and when GDB resolves the breakpoint symbol,
6867 the pending breakpoint is removed as one or more regular breakpoints
6870 Pending breakpoints are very useful for GCJ Java debugging.
6872 * Fixed ISO-C build problems
6874 The files bfd/elf-bfd.h, gdb/dictionary.c and gdb/types.c contained
6875 non ISO-C code that stopped them being built using a more strict ISO-C
6876 compiler (e.g., IBM's C compiler).
6878 * Fixed build problem on IRIX 5
6880 Due to header problems with <sys/proc.h>, the file gdb/proc-api.c
6881 wasn't able to compile compile on an IRIX 5 system.
6883 * Added execute permission to gdb/gdbserver/configure
6885 The shell script gdb/testsuite/gdb.stabs/configure lacked execute
6886 permission. This bug would cause configure to fail on a number of
6887 systems (Solaris, IRIX). Ref: server/519.
6889 * Fixed build problem on hpux2.0w-hp-hpux11.00 using the HP ANSI C compiler
6891 Older HPUX ANSI C compilers did not accept variable array sizes. somsolib.c
6892 has been updated to use constant array sizes.
6894 * Fixed a panic in the DWARF Call Frame Info code on Solaris 2.7
6896 GCC 3.3.2, on Solaris 2.7, includes the DW_EH_PE_funcrel encoding in
6897 its generated DWARF Call Frame Info. This encoding was causing GDB to
6898 panic, that panic has been fixed. Ref: gdb/1628.
6900 * Fixed a problem when examining parameters in shared library code.
6902 When examining parameters in optimized shared library code generated
6903 by a mainline GCC, GDB would incorrectly report ``Variable "..." is
6904 not available''. GDB now correctly displays the variable's value.
6906 *** Changes in GDB 6.1:
6908 * Removed --with-mmalloc
6910 Support for the mmalloc memory manager has been removed, as it
6911 conflicted with the internal gdb byte cache.
6913 * Changes in AMD64 configurations
6915 The AMD64 target now includes the %cs and %ss registers. As a result
6916 the AMD64 remote protocol has changed; this affects the floating-point
6917 and SSE registers. If you rely on those registers for your debugging,
6918 you should upgrade gdbserver on the remote side.
6920 * Revised SPARC target
6922 The SPARC target has been completely revised, incorporating the
6923 FreeBSD/sparc64 support that was added for GDB 6.0. As a result
6924 support for LynxOS and SunOS 4 has been dropped. Calling functions
6925 from within GDB on operating systems with a non-executable stack
6926 (Solaris, OpenBSD) now works.
6930 GDB has a new C++ demangler which does a better job on the mangled
6931 names generated by current versions of g++. It also runs faster, so
6932 with this and other changes gdb should now start faster on large C++
6935 * DWARF 2 Location Expressions
6937 GDB support for location expressions has been extended to support function
6938 arguments and frame bases. Older versions of GDB could crash when they
6941 * C++ nested types and namespaces
6943 GDB's support for nested types and namespaces in C++ has been
6944 improved, especially if you use the DWARF 2 debugging format. (This
6945 is the default for recent versions of GCC on most platforms.)
6946 Specifically, if you have a class "Inner" defined within a class or
6947 namespace "Outer", then GDB realizes that the class's name is
6948 "Outer::Inner", not simply "Inner". This should greatly reduce the
6949 frequency of complaints about not finding RTTI symbols. In addition,
6950 if you are stopped at inside of a function defined within a namespace,
6951 GDB modifies its name lookup accordingly.
6953 * New native configurations
6955 NetBSD/amd64 x86_64-*-netbsd*
6956 OpenBSD/amd64 x86_64-*-openbsd*
6957 OpenBSD/alpha alpha*-*-openbsd*
6958 OpenBSD/sparc sparc-*-openbsd*
6959 OpenBSD/sparc64 sparc64-*-openbsd*
6961 * New debugging protocols
6963 M32R with SDI protocol m32r-*-elf*
6965 * "set prompt-escape-char" command deleted.
6967 The command "set prompt-escape-char" has been deleted. This command,
6968 and its very obscure effect on GDB's prompt, was never documented,
6969 tested, nor mentioned in the NEWS file.
6971 * OBSOLETE configurations and files
6973 Configurations that have been declared obsolete in this release have
6974 been commented out. Unless there is activity to revive these
6975 configurations, the next release of GDB will have their sources
6976 permanently REMOVED.
6978 Sun 3, running SunOS 3 m68*-*-sunos3*
6979 Sun 3, running SunOS 4 m68*-*-sunos4*
6980 Sun 2, running SunOS 3 m68000-*-sunos3*
6981 Sun 2, running SunOS 4 m68000-*-sunos4*
6982 Motorola 680x0 running LynxOS m68*-*-lynxos*
6983 AT&T 3b1/Unix pc m68*-att-*
6984 Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
6985 decstation mips-dec-* mips-little-*
6986 riscos mips-*-riscos* mips-*-sysv*
6987 sonymips mips-sony-*
6988 sysv mips*-*-sysv4* (IRIX 5/6 not included)
6990 * REMOVED configurations and files
6992 SGI Irix-4.x mips-sgi-irix4 or iris4
6993 SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris
6994 Z8000 simulator z8k-zilog-none or z8ksim
6995 Matsushita MN10200 w/simulator mn10200-*-*
6996 H8/500 simulator h8500-hitachi-hms or h8500hms
6997 HP/PA running BSD hppa*-*-bsd*
6998 HP/PA running OSF/1 hppa*-*-osf*
6999 HP/PA Pro target hppa*-*-pro*
7000 PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
7001 386BSD i[3456]86-*-bsd*
7002 Sequent family i[3456]86-sequent-sysv4*
7003 i[3456]86-sequent-sysv*
7004 i[3456]86-sequent-bsd*
7005 SPARC running LynxOS sparc-*-lynxos*
7006 SPARC running SunOS 4 sparc-*-sunos4*
7007 Tsqware Sparclet sparclet-*-*
7008 Fujitsu SPARClite sparclite-fujitsu-none or sparclite
7010 *** Changes in GDB 6.0:
7014 Support for debugging the Objective-C programming language has been
7015 integrated into GDB.
7017 * New backtrace mechanism (includes DWARF 2 Call Frame Information).
7019 DWARF 2's Call Frame Information makes available compiler generated
7020 information that more exactly describes the program's run-time stack.
7021 By using this information, GDB is able to provide more robust stack
7024 The i386, amd64 (nee, x86-64), Alpha, m68hc11, ia64, and m32r targets
7025 have been updated to use a new backtrace mechanism which includes
7026 DWARF 2 CFI support.
7030 GDB's remote protocol has been extended to include support for hosted
7031 file I/O (where the remote target uses GDB's file system). See GDB's
7032 remote protocol documentation for details.
7034 * All targets using the new architecture framework.
7036 All of GDB's targets have been updated to use the new internal
7037 architecture framework. The way is now open for future GDB releases
7038 to include cross-architecture native debugging support (i386 on amd64,
7041 * GNU/Linux's Thread Local Storage (TLS)
7043 GDB now includes support for for the GNU/Linux implementation of
7044 per-thread variables.
7046 * GNU/Linux's Native POSIX Thread Library (NPTL)
7048 GDB's thread code has been updated to work with either the new
7049 GNU/Linux NPTL thread library or the older "LinuxThreads" library.
7051 * Separate debug info.
7053 GDB, in conjunction with BINUTILS, now supports a mechanism for
7054 automatically loading debug information from a separate file. Instead
7055 of shipping full debug and non-debug versions of system libraries,
7056 system integrators can now instead ship just the stripped libraries
7057 and optional debug files.
7059 * DWARF 2 Location Expressions
7061 DWARF 2 Location Expressions allow the compiler to more completely
7062 describe the location of variables (even in optimized code) to the
7065 GDB now includes preliminary support for location expressions (support
7066 for DW_OP_piece is still missing).
7070 A number of long standing bugs that caused GDB to die while starting a
7071 Java application have been fixed. GDB's Java support is now
7072 considered "useable".
7074 * GNU/Linux support for fork, vfork, and exec.
7076 The "catch fork", "catch exec", "catch vfork", and "set follow-fork-mode"
7077 commands are now implemented for GNU/Linux. They require a 2.5.x or later
7080 * GDB supports logging output to a file
7082 There are two new commands, "set logging" and "show logging", which can be
7083 used to capture GDB's output to a file.
7085 * The meaning of "detach" has changed for gdbserver
7087 The "detach" command will now resume the application, as documented. To
7088 disconnect from gdbserver and leave it stopped, use the new "disconnect"
7091 * d10v, m68hc11 `regs' command deprecated
7093 The `info registers' command has been updated so that it displays the
7094 registers using a format identical to the old `regs' command.
7098 A new command, "maint set profile on/off", has been added. This command can
7099 be used to enable or disable profiling while running GDB, to profile a
7100 session or a set of commands. In addition there is a new configure switch,
7101 "--enable-profiling", which will cause GDB to be compiled with profiling
7102 data, for more informative profiling results.
7104 * Default MI syntax changed to "mi2".
7106 The default MI (machine interface) syntax, enabled by the command line
7107 option "-i=mi", has been changed to "mi2". The previous MI syntax,
7108 "mi1", can be enabled by specifying the option "-i=mi1".
7110 Support for the original "mi0" syntax (included in GDB 5.0) has been
7113 Fix for gdb/192: removed extraneous space when displaying frame level.
7114 Fix for gdb/672: update changelist is now output in mi list format.
7115 Fix for gdb/702: a -var-assign that updates the value now shows up
7116 in a subsequent -var-update.
7118 * New native configurations.
7120 FreeBSD/amd64 x86_64-*-freebsd*
7122 * Multi-arched targets.
7124 HP/PA HPUX11 hppa*-*-hpux*
7125 Renesas M32R/D w/simulator m32r-*-elf*
7127 * OBSOLETE configurations and files
7129 Configurations that have been declared obsolete in this release have
7130 been commented out. Unless there is activity to revive these
7131 configurations, the next release of GDB will have their sources
7132 permanently REMOVED.
7134 Z8000 simulator z8k-zilog-none or z8ksim
7135 Matsushita MN10200 w/simulator mn10200-*-*
7136 H8/500 simulator h8500-hitachi-hms or h8500hms
7137 HP/PA running BSD hppa*-*-bsd*
7138 HP/PA running OSF/1 hppa*-*-osf*
7139 HP/PA Pro target hppa*-*-pro*
7140 PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
7141 Sequent family i[3456]86-sequent-sysv4*
7142 i[3456]86-sequent-sysv*
7143 i[3456]86-sequent-bsd*
7144 Tsqware Sparclet sparclet-*-*
7145 Fujitsu SPARClite sparclite-fujitsu-none or sparclite
7147 * REMOVED configurations and files
7150 Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
7151 IBM AIX PS/2 i[3456]86-*-aix
7152 i386 running Mach 3.0 i[3456]86-*-mach3*
7153 i386 running Mach i[3456]86-*-mach*
7154 i386 running OSF/1 i[3456]86-*osf1mk*
7155 HP/Apollo 68k Family m68*-apollo*-sysv*,
7157 m68*-hp-bsd*, m68*-hp-hpux*
7158 Argonaut Risc Chip (ARC) arc-*-*
7159 Mitsubishi D30V d30v-*-*
7160 Fujitsu FR30 fr30-*-elf*
7161 OS/9000 i[34]86-*-os9k
7162 I960 with MON960 i960-*-coff
7164 * MIPS $fp behavior changed
7166 The convenience variable $fp, for the MIPS, now consistently returns
7167 the address of the current frame's base. Previously, depending on the
7168 context, $fp could refer to either $sp or the current frame's base
7169 address. See ``8.10 Registers'' in the manual ``Debugging with GDB:
7170 The GNU Source-Level Debugger''.
7172 *** Changes in GDB 5.3:
7174 * GNU/Linux shared library multi-threaded performance improved.
7176 When debugging a multi-threaded application on GNU/Linux, GDB now uses
7177 `/proc', in preference to `ptrace' for memory reads. This may result
7178 in an improvement in the start-up time of multi-threaded, shared
7179 library applications when run under GDB. One GDB user writes: ``loads
7180 shared libs like mad''.
7182 * ``gdbserver'' now supports multi-threaded applications on some targets
7184 Support for debugging multi-threaded applications which use
7185 the GNU/Linux LinuxThreads package has been added for
7186 arm*-*-linux*-gnu*, i[3456]86-*-linux*-gnu*, mips*-*-linux*-gnu*,
7187 powerpc*-*-linux*-gnu*, and sh*-*-linux*-gnu*.
7189 * GDB now supports C/C++ preprocessor macros.
7191 GDB now expands preprocessor macro invocations in C/C++ expressions,
7192 and provides various commands for showing macro definitions and how
7195 The new command `macro expand EXPRESSION' expands any macro
7196 invocations in expression, and shows the result.
7198 The new command `show macro MACRO-NAME' shows the definition of the
7199 macro named MACRO-NAME, and where it was defined.
7201 Most compilers don't include information about macros in the debugging
7202 information by default. In GCC 3.1, for example, you need to compile
7203 your program with the options `-gdwarf-2 -g3'. If the macro
7204 information is present in the executable, GDB will read it.
7206 * Multi-arched targets.
7208 DEC Alpha (partial) alpha*-*-*
7209 DEC VAX (partial) vax-*-*
7211 National Semiconductor NS32000 (partial) ns32k-*-*
7212 Motorola 68000 (partial) m68k-*-*
7213 Motorola MCORE mcore-*-*
7217 Fujitsu FRV architecture added by Red Hat frv*-*-*
7220 * New native configurations
7222 Alpha NetBSD alpha*-*-netbsd*
7223 SH NetBSD sh*-*-netbsdelf*
7224 MIPS NetBSD mips*-*-netbsd*
7225 UltraSPARC NetBSD sparc64-*-netbsd*
7227 * OBSOLETE configurations and files
7229 Configurations that have been declared obsolete in this release have
7230 been commented out. Unless there is activity to revive these
7231 configurations, the next release of GDB will have their sources
7232 permanently REMOVED.
7234 Mitsubishi D30V d30v-*-*
7235 OS/9000 i[34]86-*-os9k
7236 IBM AIX PS/2 i[3456]86-*-aix
7237 Fujitsu FR30 fr30-*-elf*
7238 Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
7239 Argonaut Risc Chip (ARC) arc-*-*
7240 i386 running Mach 3.0 i[3456]86-*-mach3*
7241 i386 running Mach i[3456]86-*-mach*
7242 i386 running OSF/1 i[3456]86-*osf1mk*
7243 HP/Apollo 68k Family m68*-apollo*-sysv*,
7245 m68*-hp-bsd*, m68*-hp-hpux*
7246 I960 with MON960 i960-*-coff
7248 * OBSOLETE languages
7250 CHILL, a Pascal like language used by telecommunications companies.
7252 * REMOVED configurations and files
7254 AMD 29k family via UDI a29k-amd-udi, udi29k
7255 A29K VxWorks a29k-*-vxworks
7256 AMD 29000 embedded, using EBMON a29k-none-none
7257 AMD 29000 embedded with COFF a29k-none-coff
7258 AMD 29000 embedded with a.out a29k-none-aout
7260 testsuite/gdb.hp/gdb.threads-hp/ directory
7262 * New command "set max-user-call-depth <nnn>"
7264 This command allows the user to limit the call depth of user-defined
7265 commands. The default is 1024.
7267 * Changes in FreeBSD/i386 native debugging.
7269 Support for the "generate-core-file" has been added.
7271 * New commands "dump", "append", and "restore".
7273 These commands allow data to be copied from target memory
7274 to a bfd-format or binary file (dump and append), and back
7275 from a file into memory (restore).
7277 * Improved "next/step" support on multi-processor Alpha Tru64.
7279 The previous single-step mechanism could cause unpredictable problems,
7280 including the random appearance of SIGSEGV or SIGTRAP signals. The use
7281 of a software single-step mechanism prevents this.
7283 *** Changes in GDB 5.2.1:
7291 gdb/182: gdb/323: gdb/237: On alpha, gdb was reporting:
7292 mdebugread.c:2443: gdb-internal-error: sect_index_data not initialized
7293 Fix, by Joel Brobecker imported from mainline.
7295 gdb/439: gdb/291: On some ELF object files, gdb was reporting:
7296 dwarf2read.c:1072: gdb-internal-error: sect_index_text not initialize
7297 Fix, by Fred Fish, imported from mainline.
7299 Dwarf2 .debug_frame & .eh_frame handler improved in many ways.
7300 Surprisingly enough, it works now.
7301 By Michal Ludvig, imported from mainline.
7303 i386 hardware watchpoint support:
7304 avoid misses on second run for some targets.
7305 By Pierre Muller, imported from mainline.
7307 *** Changes in GDB 5.2:
7309 * New command "set trust-readonly-sections on[off]".
7311 This command is a hint that tells gdb that read-only sections
7312 really are read-only (ie. that their contents will not change).
7313 In this mode, gdb will go to the object file rather than the
7314 target to read memory from read-only sections (such as ".text").
7315 This can be a significant performance improvement on some
7316 (notably embedded) targets.
7318 * New command "generate-core-file" (or "gcore").
7320 This new gdb command allows the user to drop a core file of the child
7321 process state at any time. So far it's been implemented only for
7322 GNU/Linux and Solaris, but should be relatively easily ported to other
7323 hosts. Argument is core file name (defaults to core.<pid>).
7325 * New command line option
7327 GDB now accepts --pid or -p followed by a process id.
7329 * Change in command line behavior -- corefiles vs. process ids.
7331 There is a subtle behavior in the way in which GDB handles
7332 command line arguments. The first non-flag argument is always
7333 a program to debug, but the second non-flag argument may either
7334 be a corefile or a process id. Previously, GDB would attempt to
7335 open the second argument as a corefile, and if that failed, would
7336 issue a superfluous error message and then attempt to attach it as
7337 a process. Now, if the second argument begins with a non-digit,
7338 it will be treated as a corefile. If it begins with a digit,
7339 GDB will attempt to attach it as a process, and if no such process
7340 is found, will then attempt to open it as a corefile.
7342 * Changes in ARM configurations.
7344 Multi-arch support is enabled for all ARM configurations. The ARM/NetBSD
7345 configuration is fully multi-arch.
7347 * New native configurations
7349 ARM NetBSD arm*-*-netbsd*
7350 x86 OpenBSD i[3456]86-*-openbsd*
7351 AMD x86-64 running GNU/Linux x86_64-*-linux-*
7352 Sparc64 running FreeBSD sparc64-*-freebsd*
7356 Sanyo XStormy16 xstormy16-elf
7358 * OBSOLETE configurations and files
7360 Configurations that have been declared obsolete in this release have
7361 been commented out. Unless there is activity to revive these
7362 configurations, the next release of GDB will have their sources
7363 permanently REMOVED.
7365 AMD 29k family via UDI a29k-amd-udi, udi29k
7366 A29K VxWorks a29k-*-vxworks
7367 AMD 29000 embedded, using EBMON a29k-none-none
7368 AMD 29000 embedded with COFF a29k-none-coff
7369 AMD 29000 embedded with a.out a29k-none-aout
7371 testsuite/gdb.hp/gdb.threads-hp/ directory
7373 * REMOVED configurations and files
7375 TI TMS320C80 tic80-*-*
7377 PowerPC Solaris powerpcle-*-solaris*
7378 PowerPC Windows NT powerpcle-*-cygwin32
7379 PowerPC Netware powerpc-*-netware*
7380 Harris/CXUX m88k m88*-harris-cxux*
7381 Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-*
7382 ns32k-utek-sysv* ns32k-utek-*
7383 SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
7384 Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
7385 Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
7386 ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
7387 Apple Macintosh (MPW) host and target N/A host, powerpc-*-macos*
7389 * Changes to command line processing
7391 The new `--args' feature can be used to specify command-line arguments
7392 for the inferior from gdb's command line.
7394 * Changes to key bindings
7396 There is a new `operate-and-get-next' function bound to `C-o'.
7398 *** Changes in GDB 5.1.1
7400 Fix compile problem on DJGPP.
7402 Fix a problem with floating-point registers on the i386 being
7405 Fix to stop GDB crashing on .debug_str debug info.
7407 Numerous documentation fixes.
7409 Numerous testsuite fixes.
7411 *** Changes in GDB 5.1:
7413 * New native configurations
7415 Alpha FreeBSD alpha*-*-freebsd*
7416 x86 FreeBSD 3.x and 4.x i[3456]86*-freebsd[34]*
7417 MIPS GNU/Linux mips*-*-linux*
7418 MIPS SGI Irix 6.x mips*-sgi-irix6*
7419 ia64 AIX ia64-*-aix*
7420 s390 and s390x GNU/Linux {s390,s390x}-*-linux*
7424 Motorola 68HC11 and 68HC12 m68hc11-elf
7426 UltraSparc running GNU/Linux sparc64-*-linux*
7428 * OBSOLETE configurations and files
7430 x86 FreeBSD before 2.2 i[3456]86*-freebsd{1,2.[01]}*,
7431 Harris/CXUX m88k m88*-harris-cxux*
7432 Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-*
7433 ns32k-utek-sysv* ns32k-utek-*
7434 TI TMS320C80 tic80-*-*
7436 Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
7437 PowerPC Solaris powerpcle-*-solaris*
7438 PowerPC Windows NT powerpcle-*-cygwin32
7439 PowerPC Netware powerpc-*-netware*
7440 SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
7441 Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
7442 ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
7443 Apple Macintosh (MPW) host N/A
7445 stuff.c (Program to stuff files into a specially prepared space in kdb)
7446 kdb-start.c (Main loop for the standalone kernel debugger)
7448 Configurations that have been declared obsolete in this release have
7449 been commented out. Unless there is activity to revive these
7450 configurations, the next release of GDB will have their sources
7451 permanently REMOVED.
7453 * REMOVED configurations and files
7455 Altos 3068 m68*-altos-*
7456 Convex c1-*-*, c2-*-*
7458 ARM RISCix arm-*-* (as host)
7462 * GDB has been converted to ISO C.
7464 GDB's source code has been converted to ISO C. In particular, the
7465 sources are fully protoized, and rely on standard headers being
7470 * "info symbol" works on platforms which use COFF, ECOFF, XCOFF, and NLM.
7472 * The MI enabled by default.
7474 The new machine oriented interface (MI) introduced in GDB 5.0 has been
7475 revised and enabled by default. Packages which use GDB as a debugging
7476 engine behind a UI or another front end are encouraged to switch to
7477 using the GDB/MI interface, instead of the old annotations interface
7478 which is now deprecated.
7480 * Support for debugging Pascal programs.
7482 GDB now includes support for debugging Pascal programs. The following
7483 main features are supported:
7485 - Pascal-specific data types such as sets;
7487 - automatic recognition of Pascal sources based on file-name
7490 - Pascal-style display of data types, variables, and functions;
7492 - a Pascal expression parser.
7494 However, some important features are not yet supported.
7496 - Pascal string operations are not supported at all;
7498 - there are some problems with boolean types;
7500 - Pascal type hexadecimal constants are not supported
7501 because they conflict with the internal variables format;
7503 - support for Pascal objects and classes is not full yet;
7505 - unlike Pascal, GDB is case-sensitive for symbol names.
7507 * Changes in completion.
7509 Commands such as `shell', `run' and `set args', which pass arguments
7510 to inferior programs, now complete on file names, similar to what
7511 users expect at the shell prompt.
7513 Commands which accept locations, such as `disassemble', `print',
7514 `breakpoint', `until', etc. now complete on filenames as well as
7515 program symbols. Thus, if you type "break foob TAB", and the source
7516 files linked into the programs include `foobar.c', that file name will
7517 be one of the candidates for completion. However, file names are not
7518 considered for completion after you typed a colon that delimits a file
7519 name from a name of a function in that file, as in "break foo.c:bar".
7521 `set demangle-style' completes on available demangling styles.
7523 * New platform-independent commands:
7525 It is now possible to define a post-hook for a command as well as a
7526 hook that runs before the command. For more details, see the
7527 documentation of `hookpost' in the GDB manual.
7529 * Changes in GNU/Linux native debugging.
7531 Support for debugging multi-threaded programs has been completely
7532 revised for all platforms except m68k and sparc. You can now debug as
7533 many threads as your system allows you to have.
7535 Attach/detach is supported for multi-threaded programs.
7537 Support for SSE registers was added for x86. This doesn't work for
7538 multi-threaded programs though.
7540 * Changes in MIPS configurations.
7542 Multi-arch support is enabled for all MIPS configurations.
7544 GDB can now be built as native debugger on SGI Irix 6.x systems for
7545 debugging n32 executables. (Debugging 64-bit executables is not yet
7548 * Unified support for hardware watchpoints in all x86 configurations.
7550 Most (if not all) native x86 configurations support hardware-assisted
7551 breakpoints and watchpoints in a unified manner. This support
7552 implements debug register sharing between watchpoints, which allows to
7553 put a virtually infinite number of watchpoints on the same address,
7554 and also supports watching regions up to 16 bytes with several debug
7557 The new maintenance command `maintenance show-debug-regs' toggles
7558 debugging print-outs in functions that insert, remove, and test
7559 watchpoints and hardware breakpoints.
7561 * Changes in the DJGPP native configuration.
7563 New command ``info dos sysinfo'' displays assorted information about
7564 the CPU, OS, memory, and DPMI server.
7566 New commands ``info dos gdt'', ``info dos ldt'', and ``info dos idt''
7567 display information about segment descriptors stored in GDT, LDT, and
7570 New commands ``info dos pde'' and ``info dos pte'' display entries
7571 from Page Directory and Page Tables (for now works with CWSDPMI only).
7572 New command ``info dos address-pte'' displays the Page Table entry for
7573 a given linear address.
7575 GDB can now pass command lines longer than 126 characters to the
7576 program being debugged (requires an update to the libdbg.a library
7577 which is part of the DJGPP development kit).
7579 DWARF2 debug info is now supported.
7581 It is now possible to `step' and `next' through calls to `longjmp'.
7583 * Changes in documentation.
7585 All GDB documentation was converted to GFDL, the GNU Free
7586 Documentation License.
7588 Tracepoints-related commands are now fully documented in the GDB
7591 TUI, the Text-mode User Interface, is now documented in the manual.
7593 Tracepoints-related commands are now fully documented in the GDB
7596 The "GDB Internals" manual now has an index. It also includes
7597 documentation of `ui_out' functions, GDB coding standards, x86
7598 hardware watchpoints, and memory region attributes.
7600 * GDB's version number moved to ``version.in''
7602 The Makefile variable VERSION has been replaced by the file
7603 ``version.in''. People creating GDB distributions should update the
7604 contents of this file.
7608 GUD support is now a standard part of the EMACS distribution.
7610 *** Changes in GDB 5.0:
7612 * Improved support for debugging FP programs on x86 targets
7614 Unified and much-improved support for debugging floating-point
7615 programs on all x86 targets. In particular, ``info float'' now
7616 displays the FP registers in the same format on all x86 targets, with
7617 greater level of detail.
7619 * Improvements and bugfixes in hardware-assisted watchpoints
7621 It is now possible to watch array elements, struct members, and
7622 bitfields with hardware-assisted watchpoints. Data-read watchpoints
7623 on x86 targets no longer erroneously trigger when the address is
7626 * Improvements in the native DJGPP version of GDB
7628 The distribution now includes all the scripts and auxiliary files
7629 necessary to build the native DJGPP version on MS-DOS/MS-Windows
7630 machines ``out of the box''.
7632 The DJGPP version can now debug programs that use signals. It is
7633 possible to catch signals that happened in the debuggee, deliver
7634 signals to it, interrupt it with Ctrl-C, etc. (Previously, a signal
7635 would kill the program being debugged.) Programs that hook hardware
7636 interrupts (keyboard, timer, etc.) can also be debugged.
7638 It is now possible to debug DJGPP programs that redirect their
7639 standard handles or switch them to raw (as opposed to cooked) mode, or
7640 even close them. The command ``run < foo > bar'' works as expected,
7641 and ``info terminal'' reports useful information about the debuggee's
7642 terminal, including raw/cooked mode, redirection, etc.
7644 The DJGPP version now uses termios functions for console I/O, which
7645 enables debugging graphics programs. Interrupting GDB with Ctrl-C
7648 DOS-style file names with drive letters are now fully supported by
7651 It is now possible to debug DJGPP programs that switch their working
7652 directory. It is also possible to rerun the debuggee any number of
7653 times without restarting GDB; thus, you can use the same setup,
7654 breakpoints, etc. for many debugging sessions.
7656 * New native configurations
7658 ARM GNU/Linux arm*-*-linux*
7659 PowerPC GNU/Linux powerpc-*-linux*
7663 Motorola MCore mcore-*-*
7664 x86 VxWorks i[3456]86-*-vxworks*
7665 PowerPC VxWorks powerpc-*-vxworks*
7666 TI TMS320C80 tic80-*-*
7668 * OBSOLETE configurations
7670 Altos 3068 m68*-altos-*
7671 Convex c1-*-*, c2-*-*
7673 ARM RISCix arm-*-* (as host)
7676 Configurations that have been declared obsolete will be commented out,
7677 but the code will be left in place. If there is no activity to revive
7678 these configurations before the next release of GDB, the sources will
7679 be permanently REMOVED.
7681 * Gould support removed
7683 Support for the Gould PowerNode and NP1 has been removed.
7685 * New features for SVR4
7687 On SVR4 native platforms (such as Solaris), if you attach to a process
7688 without first loading a symbol file, GDB will now attempt to locate and
7689 load symbols from the running process's executable file.
7691 * Many C++ enhancements
7693 C++ support has been greatly improved. Overload resolution now works properly
7694 in almost all cases. RTTI support is on the way.
7696 * Remote targets can connect to a sub-program
7698 A popen(3) style serial-device has been added. This device starts a
7699 sub-process (such as a stand-alone simulator) and then communicates
7700 with that. The sub-program to run is specified using the syntax
7701 ``|<program> <args>'' vis:
7703 (gdb) set remotedebug 1
7704 (gdb) target extended-remote |mn10300-elf-sim program-args
7706 * MIPS 64 remote protocol
7708 A long standing bug in the mips64 remote protocol where by GDB
7709 expected certain 32 bit registers (ex SR) to be transfered as 32
7710 instead of 64 bits has been fixed.
7712 The command ``set remote-mips64-transfers-32bit-regs on'' has been
7713 added to provide backward compatibility with older versions of GDB.
7715 * ``set remotebinarydownload'' replaced by ``set remote X-packet''
7717 The command ``set remotebinarydownload'' command has been replaced by
7718 ``set remote X-packet''. Other commands in ``set remote'' family
7719 include ``set remote P-packet''.
7721 * Breakpoint commands accept ranges.
7723 The breakpoint commands ``enable'', ``disable'', and ``delete'' now
7724 accept a range of breakpoints, e.g. ``5-7''. The tracepoint command
7725 ``tracepoint passcount'' also accepts a range of tracepoints.
7727 * ``apropos'' command added.
7729 The ``apropos'' command searches through command names and
7730 documentation strings, printing out matches, making it much easier to
7731 try to find a command that does what you are looking for.
7735 A new machine oriented interface (MI) has been added to GDB. This
7736 interface is designed for debug environments running GDB as a separate
7737 process. This is part of the long term libGDB project. See the
7738 "GDB/MI" chapter of the GDB manual for further information. It can be
7739 enabled by configuring with:
7741 .../configure --enable-gdbmi
7743 *** Changes in GDB-4.18:
7745 * New native configurations
7747 HP-UX 10.20 hppa*-*-hpux10.20
7748 HP-UX 11.x hppa*-*-hpux11.0*
7749 M68K GNU/Linux m68*-*-linux*
7753 Fujitsu FR30 fr30-*-elf*
7754 Intel StrongARM strongarm-*-*
7755 Mitsubishi D30V d30v-*-*
7757 * OBSOLETE configurations
7759 Gould PowerNode, NP1 np1-*-*, pn-*-*
7761 Configurations that have been declared obsolete will be commented out,
7762 but the code will be left in place. If there is no activity to revive
7763 these configurations before the next release of GDB, the sources will
7764 be permanently REMOVED.
7768 As a compatibility experiment, GDB's source files buildsym.h and
7769 buildsym.c have been converted to pure standard C, no longer
7770 containing any K&R compatibility code. We believe that all systems in
7771 use today either come with a standard C compiler, or have a GCC port
7772 available. If this is not true, please report the affected
7773 configuration to bug-gdb@gnu.org immediately. See the README file for
7774 information about getting a standard C compiler if you don't have one
7779 GDB now uses readline 2.2.
7781 * set extension-language
7783 You can now control the mapping between filename extensions and source
7784 languages by using the `set extension-language' command. For instance,
7785 you can ask GDB to treat .c files as C++ by saying
7786 set extension-language .c c++
7787 The command `info extensions' lists all of the recognized extensions
7788 and their associated languages.
7790 * Setting processor type for PowerPC and RS/6000
7792 When GDB is configured for a powerpc*-*-* or an rs6000*-*-* target,
7793 you can use the `set processor' command to specify what variant of the
7794 PowerPC family you are debugging. The command
7798 sets the PowerPC/RS6000 variant to NAME. GDB knows about the
7799 following PowerPC and RS6000 variants:
7801 ppc-uisa PowerPC UISA - a PPC processor as viewed by user-level code
7802 rs6000 IBM RS6000 ("POWER") architecture, user-level view
7804 403GC IBM PowerPC 403GC
7805 505 Motorola PowerPC 505
7806 860 Motorola PowerPC 860 or 850
7807 601 Motorola PowerPC 601
7808 602 Motorola PowerPC 602
7809 603 Motorola/IBM PowerPC 603 or 603e
7810 604 Motorola PowerPC 604 or 604e
7811 750 Motorola/IBM PowerPC 750 or 750
7813 At the moment, this command just tells GDB what to name the
7814 special-purpose processor registers. Since almost all the affected
7815 registers are inaccessible to user-level programs, this command is
7816 only useful for remote debugging in its present form.
7820 Thanks to a major code donation from Hewlett-Packard, GDB now has much
7821 more extensive support for HP-UX. Added features include shared
7822 library support, kernel threads and hardware watchpoints for 11.00,
7823 support for HP's ANSI C and C++ compilers, and a compatibility mode
7824 for xdb and dbx commands.
7828 HP's donation includes the new concept of catchpoints, which is a
7829 generalization of the old catch command. On HP-UX, it is now possible
7830 to catch exec, fork, and vfork, as well as library loading.
7832 This means that the existing catch command has changed; its first
7833 argument now specifies the type of catch to be set up. See the
7834 output of "help catch" for a list of catchpoint types.
7836 * Debugging across forks
7838 On HP-UX, you can choose which process to debug when a fork() happens
7843 HP has donated a curses-based terminal user interface (TUI). To get
7844 it, build with --enable-tui. Although this can be enabled for any
7845 configuration, at present it only works for native HP debugging.
7847 * GDB remote protocol additions
7849 A new protocol packet 'X' that writes binary data is now available.
7850 Default behavior is to try 'X', then drop back to 'M' if the stub
7851 fails to respond. The settable variable `remotebinarydownload'
7852 allows explicit control over the use of 'X'.
7854 For 64-bit targets, the memory packets ('M' and 'm') can now contain a
7855 full 64-bit address. The command
7857 set remoteaddresssize 32
7859 can be used to revert to the old behaviour. For existing remote stubs
7860 the change should not be noticed, as the additional address information
7863 In order to assist in debugging stubs, you may use the maintenance
7864 command `packet' to send any text string to the stub. For instance,
7866 maint packet heythere
7868 sends the packet "$heythere#<checksum>". Note that it is very easy to
7869 disrupt a debugging session by sending the wrong packet at the wrong
7872 The compare-sections command allows you to compare section data on the
7873 target to what is in the executable file without uploading or
7874 downloading, by comparing CRC checksums.
7876 * Tracing can collect general expressions
7878 You may now collect general expressions at tracepoints. This requires
7879 further additions to the target-side stub; see tracepoint.c and
7880 doc/agentexpr.texi for further details.
7882 * mask-address variable for Mips
7884 For Mips targets, you may control the zeroing of the upper 32 bits of
7885 a 64-bit address by entering `set mask-address on'. This is mainly
7886 of interest to users of embedded R4xxx and R5xxx processors.
7888 * Higher serial baud rates
7890 GDB's serial code now allows you to specify baud rates 57600, 115200,
7891 230400, and 460800 baud. (Note that your host system may not be able
7892 to achieve all of these rates.)
7896 The i960 configuration now includes an initial implementation of a
7897 builtin simulator, contributed by Jim Wilson.
7900 *** Changes in GDB-4.17:
7902 * New native configurations
7904 Alpha GNU/Linux alpha*-*-linux*
7905 Unixware 2.x i[3456]86-unixware2*
7906 Irix 6.x mips*-sgi-irix6*
7907 PowerPC GNU/Linux powerpc-*-linux*
7908 PowerPC Solaris powerpcle-*-solaris*
7909 Sparc GNU/Linux sparc-*-linux*
7910 Motorola sysV68 R3V7.1 m68k-motorola-sysv
7914 Argonaut Risc Chip (ARC) arc-*-*
7915 Hitachi H8/300S h8300*-*-*
7916 Matsushita MN10200 w/simulator mn10200-*-*
7917 Matsushita MN10300 w/simulator mn10300-*-*
7918 MIPS NEC VR4100 mips64*vr4100*{,el}-*-elf*
7919 MIPS NEC VR5000 mips64*vr5000*{,el}-*-elf*
7920 MIPS Toshiba TX39 mips64*tx39*{,el}-*-elf*
7921 Mitsubishi D10V w/simulator d10v-*-*
7922 Mitsubishi M32R/D w/simulator m32r-*-elf*
7923 Tsqware Sparclet sparclet-*-*
7924 NEC V850 w/simulator v850-*-*
7926 * New debugging protocols
7928 ARM with RDI protocol arm*-*-*
7929 M68K with dBUG monitor m68*-*-{aout,coff,elf}
7930 DDB and LSI variants of PMON protocol mips*-*-*
7931 PowerPC with DINK32 monitor powerpc{,le}-*-eabi
7932 PowerPC with SDS protocol powerpc{,le}-*-eabi
7933 Macraigor OCD (Wiggler) devices powerpc{,le}-*-eabi
7937 All configurations can now understand and use the DWARF 2 debugging
7938 format. The choice is automatic, if the symbol file contains DWARF 2
7943 GDB now includes basic Java language support. This support is
7944 only useful with Java compilers that produce native machine code.
7946 * solib-absolute-prefix and solib-search-path
7948 For SunOS and SVR4 shared libraries, you may now set the prefix for
7949 loading absolute shared library symbol files, and the search path for
7950 locating non-absolute shared library symbol files.
7952 * Live range splitting
7954 GDB can now effectively debug code for which GCC has performed live
7955 range splitting as part of its optimization. See gdb/doc/LRS for
7956 more details on the expected format of the stabs information.
7960 GDB's support for the GNU Hurd, including thread debugging, has been
7961 updated to work with current versions of the Hurd.
7965 GDB's ARM target configuration now handles the ARM7T (Thumb) 16-bit
7966 instruction set. ARM GDB automatically detects when Thumb
7967 instructions are in use, and adjusts disassembly and backtracing
7972 GDB's MIPS target configurations now handle the MIP16 16-bit
7977 GDB now includes support for overlays; if an executable has been
7978 linked such that multiple sections are based at the same address, GDB
7979 will decide which section to use for symbolic info. You can choose to
7980 control the decision manually, using overlay commands, or implement
7981 additional target-side support and use "overlay load-target" to bring
7982 in the overlay mapping. Do "help overlay" for more detail.
7986 The command "info symbol <address>" displays information about
7987 the symbol at the specified address.
7991 The standard remote protocol now includes an extension that allows
7992 asynchronous collection and display of trace data. This requires
7993 extensive support in the target-side debugging stub. Tracing mode
7994 includes a new interaction mode in GDB and new commands: see the
7995 file tracepoint.c for more details.
7999 Configurations for embedded MIPS now include a simulator contributed
8000 by Cygnus Solutions. The simulator supports the instruction sets
8001 of most MIPS variants.
8005 Sparc configurations may now include the ERC32 simulator contributed
8006 by the European Space Agency. The simulator is not built into
8007 Sparc targets by default; configure with --enable-sim to include it.
8011 For target configurations that may include multiple variants of a
8012 basic architecture (such as MIPS and SH), you may now set the
8013 architecture explicitly. "set arch" sets, "info arch" lists
8014 the possible architectures.
8016 *** Changes in GDB-4.16:
8018 * New native configurations
8020 Windows 95, x86 Windows NT i[345]86-*-cygwin32
8021 M68K NetBSD m68k-*-netbsd*
8022 PowerPC AIX 4.x powerpc-*-aix*
8023 PowerPC MacOS powerpc-*-macos*
8024 PowerPC Windows NT powerpcle-*-cygwin32
8025 RS/6000 AIX 4.x rs6000-*-aix4*
8029 ARM with RDP protocol arm-*-*
8030 I960 with MON960 i960-*-coff
8031 MIPS VxWorks mips*-*-vxworks*
8032 MIPS VR4300 with PMON mips64*vr4300{,el}-*-elf*
8033 PowerPC with PPCBUG monitor powerpc{,le}-*-eabi*
8035 Matra Sparclet sparclet-*-*
8039 The powerpc-eabi configuration now includes the PSIM simulator,
8040 contributed by Andrew Cagney, with assistance from Mike Meissner.
8041 PSIM is a very elaborate model of the PowerPC, including not only
8042 basic instruction set execution, but also details of execution unit
8043 performance and I/O hardware. See sim/ppc/README for more details.
8047 GDB now works with Solaris 2.5.
8049 * Windows 95/NT native
8051 GDB will now work as a native debugger on Windows 95 and Windows NT.
8052 To build it from source, you must use the "gnu-win32" environment,
8053 which uses a DLL to emulate enough of Unix to run the GNU tools.
8054 Further information, binaries, and sources are available at
8055 ftp.cygnus.com, under pub/gnu-win32.
8057 * dont-repeat command
8059 If a user-defined command includes the command `dont-repeat', then the
8060 command will not be repeated if the user just types return. This is
8061 useful if the command is time-consuming to run, so that accidental
8062 extra keystrokes don't run the same command many times.
8064 * Send break instead of ^C
8066 The standard remote protocol now includes an option to send a break
8067 rather than a ^C to the target in order to interrupt it. By default,
8068 GDB will send ^C; to send a break, set the variable `remotebreak' to 1.
8070 * Remote protocol timeout
8072 The standard remote protocol includes a new variable `remotetimeout'
8073 that allows you to set the number of seconds before GDB gives up trying
8074 to read from the target. The default value is 2.
8076 * Automatic tracking of dynamic object loading (HPUX and Solaris only)
8078 By default GDB will automatically keep track of objects as they are
8079 loaded and unloaded by the dynamic linker. By using the command `set
8080 stop-on-solib-events 1' you can arrange for GDB to stop the inferior
8081 when shared library events occur, thus allowing you to set breakpoints
8082 in shared libraries which are explicitly loaded by the inferior.
8084 Note this feature does not work on hpux8. On hpux9 you must link
8085 /usr/lib/end.o into your program. This feature should work
8086 automatically on hpux10.
8088 * Irix 5.x hardware watchpoint support
8090 Irix 5 configurations now support the use of hardware watchpoints.
8092 * Mips protocol "SYN garbage limit"
8094 When debugging a Mips target using the `target mips' protocol, you
8095 may set the number of characters that GDB will ignore by setting
8096 the `syn-garbage-limit'. A value of -1 means that GDB will ignore
8097 every character. The default value is 1050.
8099 * Recording and replaying remote debug sessions
8101 If you set `remotelogfile' to the name of a file, gdb will write to it
8102 a recording of a remote debug session. This recording may then be
8103 replayed back to gdb using "gdbreplay". See gdbserver/README for
8104 details. This is useful when you have a problem with GDB while doing
8105 remote debugging; you can make a recording of the session and send it
8106 to someone else, who can then recreate the problem.
8108 * Speedups for remote debugging
8110 GDB includes speedups for downloading and stepping MIPS systems using
8111 the IDT monitor, fast downloads to the Hitachi SH E7000 emulator,
8112 and more efficient S-record downloading.
8114 * Memory use reductions and statistics collection
8116 GDB now uses less memory and reports statistics about memory usage.
8117 Try the `maint print statistics' command, for example.
8119 *** Changes in GDB-4.15:
8121 * Psymtabs for XCOFF
8123 The symbol reader for AIX GDB now uses partial symbol tables. This
8124 can greatly improve startup time, especially for large executables.
8126 * Remote targets use caching
8128 Remote targets now use a data cache to speed up communication with the
8129 remote side. The data cache could lead to incorrect results because
8130 it doesn't know about volatile variables, thus making it impossible to
8131 debug targets which use memory mapped I/O devices. `set remotecache
8132 off' turns the data cache off.
8134 * Remote targets may have threads
8136 The standard remote protocol now includes support for multiple threads
8137 in the target system, using new protocol commands 'H' and 'T'. See
8138 gdb/remote.c for details.
8142 If GDB is configured with `--enable-netrom', then it will include
8143 support for the NetROM ROM emulator from XLNT Designs. The NetROM
8144 acts as though it is a bank of ROM on the target board, but you can
8145 write into it over the network. GDB's support consists only of
8146 support for fast loading into the emulated ROM; to debug, you must use
8147 another protocol, such as standard remote protocol. The usual
8148 sequence is something like
8150 target nrom <netrom-hostname>
8152 target remote <netrom-hostname>:1235
8156 GDB now includes support for the Apple Macintosh, as a host only. It
8157 may be run as either an MPW tool or as a standalone application, and
8158 it can debug through the serial port. All the usual GDB commands are
8159 available, but to the target command, you must supply "serial" as the
8160 device type instead of "/dev/ttyXX". See mpw-README in the main
8161 directory for more information on how to build. The MPW configuration
8162 scripts */mpw-config.in support only a few targets, and only the
8163 mips-idt-ecoff target has been tested.
8167 GDB configuration now uses autoconf. This is not user-visible,
8168 but does simplify configuration and building.
8172 GDB now supports hpux10.
8174 *** Changes in GDB-4.14:
8176 * New native configurations
8178 x86 FreeBSD i[345]86-*-freebsd
8179 x86 NetBSD i[345]86-*-netbsd
8180 NS32k NetBSD ns32k-*-netbsd
8181 Sparc NetBSD sparc-*-netbsd
8185 A29K VxWorks a29k-*-vxworks
8186 HP PA PRO embedded (WinBond W89K & Oki OP50N) hppa*-*-pro*
8187 CPU32 EST-300 emulator m68*-*-est*
8188 PowerPC ELF powerpc-*-elf
8191 * Alpha OSF/1 support for procfs
8193 GDB now supports procfs under OSF/1-2.x and higher, which makes it
8194 possible to attach to running processes. As the mounting of the /proc
8195 filesystem is optional on the Alpha, GDB automatically determines
8196 the availability of /proc during startup. This can lead to problems
8197 if /proc is unmounted after GDB has been started.
8199 * Arguments to user-defined commands
8201 User commands may accept up to 10 arguments separated by whitespace.
8202 Arguments are accessed within the user command via $arg0..$arg9. A
8205 print $arg0 + $arg1 + $arg2
8207 To execute the command use:
8210 Defines the command "adder" which prints the sum of its three arguments.
8211 Note the arguments are text substitutions, so they may reference variables,
8212 use complex expressions, or even perform inferior function calls.
8214 * New `if' and `while' commands
8216 This makes it possible to write more sophisticated user-defined
8217 commands. Both commands take a single argument, which is the
8218 expression to evaluate, and must be followed by the commands to
8219 execute, one per line, if the expression is nonzero, the list being
8220 terminated by the word `end'. The `if' command list may include an
8221 `else' word, which causes the following commands to be executed only
8222 if the expression is zero.
8224 * Fortran source language mode
8226 GDB now includes partial support for Fortran 77. It will recognize
8227 Fortran programs and can evaluate a subset of Fortran expressions, but
8228 variables and functions may not be handled correctly. GDB will work
8229 with G77, but does not yet know much about symbols emitted by other
8232 * Better HPUX support
8234 Most debugging facilities now work on dynamic executables for HPPAs
8235 running hpux9 or later. You can attach to running dynamically linked
8236 processes, but by default the dynamic libraries will be read-only, so
8237 for instance you won't be able to put breakpoints in them. To change
8238 that behavior do the following before running the program:
8244 This will cause the libraries to be mapped private and read-write.
8245 To revert to the normal behavior, do this:
8251 You cannot set breakpoints or examine data in the library until after
8252 the library is loaded if the function/data symbols do not have
8255 GDB can now also read debug symbols produced by the HP C compiler on
8256 HPPAs (sorry, no C++, Fortran or 68k support).
8258 * Target byte order now dynamically selectable
8260 You can choose which byte order to use with a target system, via the
8261 commands "set endian big" and "set endian little", and you can see the
8262 current setting by using "show endian". You can also give the command
8263 "set endian auto", in which case GDB will use the byte order
8264 associated with the executable. Currently, only embedded MIPS
8265 configurations support dynamic selection of target byte order.
8267 * New DOS host serial code
8269 This version uses DPMI interrupts to handle buffered I/O, so you
8270 no longer need to run asynctsr when debugging boards connected to
8273 *** Changes in GDB-4.13:
8275 * New "complete" command
8277 This lists all the possible completions for the rest of the line, if it
8278 were to be given as a command itself. This is intended for use by emacs.
8280 * Trailing space optional in prompt
8282 "set prompt" no longer adds a space for you after the prompt you set. This
8283 allows you to set a prompt which ends in a space or one that does not.
8285 * Breakpoint hit counts
8287 "info break" now displays a count of the number of times the breakpoint
8288 has been hit. This is especially useful in conjunction with "ignore"; you
8289 can ignore a large number of breakpoint hits, look at the breakpoint info
8290 to see how many times the breakpoint was hit, then run again, ignoring one
8291 less than that number, and this will get you quickly to the last hit of
8294 * Ability to stop printing at NULL character
8296 "set print null-stop" will cause GDB to stop printing the characters of
8297 an array when the first NULL is encountered. This is useful when large
8298 arrays actually contain only short strings.
8300 * Shared library breakpoints
8302 In SunOS 4.x, SVR4, and Alpha OSF/1 configurations, you can now set
8303 breakpoints in shared libraries before the executable is run.
8305 * Hardware watchpoints
8307 There is a new hardware breakpoint for the watch command for sparclite
8308 targets. See gdb/sparclite/hw_breakpoint.note.
8310 Hardware watchpoints are also now supported under GNU/Linux.
8314 Annotations have been added. These are for use with graphical interfaces,
8315 and are still experimental. Currently only gdba.el uses these.
8317 * Improved Irix 5 support
8319 GDB now works properly with Irix 5.2.
8321 * Improved HPPA support
8323 GDB now works properly with the latest GCC and GAS.
8325 * New native configurations
8327 Sequent PTX4 i[34]86-sequent-ptx4
8328 HPPA running OSF/1 hppa*-*-osf*
8329 Atari TT running SVR4 m68*-*-sysv4*
8330 RS/6000 LynxOS rs6000-*-lynxos*
8334 OS/9000 i[34]86-*-os9k
8335 MIPS R4000 mips64*{,el}-*-{ecoff,elf}
8338 * Hitachi SH7000 and E7000-PC ICE support
8340 There is now support for communicating with the Hitachi E7000-PC ICE.
8341 This is available automatically when GDB is configured for the SH.
8345 As usual, a variety of small fixes and improvements, both generic
8346 and configuration-specific. See the ChangeLog for more detail.
8348 *** Changes in GDB-4.12:
8350 * Irix 5 is now supported
8354 GDB-4.12 on the HPPA has a number of changes which make it unable
8355 to debug the output from the currently released versions of GCC and
8356 GAS (GCC 2.5.8 and GAS-2.2 or PAGAS-1.36). Until the next major release
8357 of GCC and GAS, versions of these tools designed to work with GDB-4.12
8358 can be retrieved via anonymous ftp from jaguar.cs.utah.edu:/dist.
8361 *** Changes in GDB-4.11:
8363 * User visible changes:
8367 The "set remotedebug" option is now consistent between the mips remote
8368 target, remote targets using the gdb-specific protocol, UDI (AMD's
8369 debug protocol for the 29k) and the 88k bug monitor. It is now an
8370 integer specifying a debug level (normally 0 or 1, but 2 means more
8371 debugging info for the mips target).
8373 * DEC Alpha native support
8375 GDB now works on the DEC Alpha. GCC 2.4.5 does not produce usable
8376 debug info, but GDB works fairly well with the DEC compiler and should
8377 work with a future GCC release. See the README file for a few
8378 Alpha-specific notes.
8380 * Preliminary thread implementation
8382 GDB now has preliminary thread support for both SGI/Irix and LynxOS.
8384 * LynxOS native and target support for 386
8386 This release has been hosted on LynxOS 2.2, and also can be configured
8387 to remotely debug programs running under LynxOS (see gdb/gdbserver/README
8390 * Improvements in C++ mangling/demangling.
8392 This release has much better g++ debugging, specifically in name
8393 mangling/demangling, virtual function calls, print virtual table,
8394 call methods, ...etc.
8396 *** Changes in GDB-4.10:
8398 * User visible changes:
8400 Remote debugging using the GDB-specific (`target remote') protocol now
8401 supports the `load' command. This is only useful if you have some
8402 other way of getting the stub to the target system, and you can put it
8403 somewhere in memory where it won't get clobbered by the download.
8405 Filename completion now works.
8407 When run under emacs mode, the "info line" command now causes the
8408 arrow to point to the line specified. Also, "info line" prints
8409 addresses in symbolic form (as well as hex).
8411 All vxworks based targets now support a user settable option, called
8412 vxworks-timeout. This option represents the number of seconds gdb
8413 should wait for responses to rpc's. You might want to use this if
8414 your vxworks target is, perhaps, a slow software simulator or happens
8415 to be on the far side of a thin network line.
8419 This release contains support for using a DEC alpha as a GDB host for
8420 cross debugging. Native alpha debugging is not supported yet.
8423 *** Changes in GDB-4.9:
8427 This is the first GDB release which is accompanied by a matching testsuite.
8428 The testsuite requires installation of dejagnu, which should be available
8429 via ftp from most sites that carry GNU software.
8433 'Cfront' style demangling has had its name changed to 'ARM' style, to
8434 emphasize that it was written from the specifications in the C++ Annotated
8435 Reference Manual, not necessarily to be compatible with AT&T cfront. Despite
8436 disclaimers, it still generated too much confusion with users attempting to
8437 use gdb with AT&T cfront.
8441 GDB now uses a standard remote interface to a simulator library.
8442 So far, the library contains simulators for the Zilog Z8001/2, the
8443 Hitachi H8/300, H8/500 and Super-H.
8445 * New targets supported
8447 H8/300 simulator h8300-hitachi-hms or h8300hms
8448 H8/500 simulator h8500-hitachi-hms or h8500hms
8449 SH simulator sh-hitachi-hms or sh
8450 Z8000 simulator z8k-zilog-none or z8ksim
8451 IDT MIPS board over serial line mips-idt-ecoff
8453 Cross-debugging to GO32 targets is supported. It requires a custom
8454 version of the i386-stub.c module which is integrated with the
8455 GO32 memory extender.
8457 * New remote protocols
8459 MIPS remote debugging protocol.
8461 * New source languages supported
8463 This version includes preliminary support for Chill, a Pascal like language
8464 used by telecommunications companies. Chill support is also being integrated
8465 into the GNU compiler, but we don't know when it will be publically available.
8468 *** Changes in GDB-4.8:
8470 * HP Precision Architecture supported
8472 GDB now supports HP PA-RISC machines running HPUX. A preliminary
8473 version of this support was available as a set of patches from the
8474 University of Utah. GDB does not support debugging of programs
8475 compiled with the HP compiler, because HP will not document their file
8476 format. Instead, you must use GCC (version 2.3.2 or later) and PA-GAS
8477 (as available from jaguar.cs.utah.edu:/dist/pa-gas.u4.tar.Z).
8479 Many problems in the preliminary version have been fixed.
8481 * Faster and better demangling
8483 We have improved template demangling and fixed numerous bugs in the GNU style
8484 demangler. It can now handle type modifiers such as `static' or `const'. Wide
8485 character types (wchar_t) are now supported. Demangling of each symbol is now
8486 only done once, and is cached when the symbol table for a file is read in.
8487 This results in a small increase in memory usage for C programs, a moderate
8488 increase in memory usage for C++ programs, and a fantastic speedup in
8491 `Cfront' style demangling still doesn't work with AT&T cfront. It was written
8492 from the specifications in the Annotated Reference Manual, which AT&T's
8493 compiler does not actually implement.
8495 * G++ multiple inheritance compiler problem
8497 In the 2.3.2 release of gcc/g++, how the compiler resolves multiple
8498 inheritance lattices was reworked to properly discover ambiguities. We
8499 recently found an example which causes this new algorithm to fail in a
8500 very subtle way, producing bad debug information for those classes.
8501 The file 'gcc.patch' (in this directory) can be applied to gcc to
8502 circumvent the problem. A future GCC release will contain a complete
8505 The previous G++ debug info problem (mentioned below for the gdb-4.7
8506 release) is fixed in gcc version 2.3.2.
8508 * Improved configure script
8510 The `configure' script will now attempt to guess your system type if
8511 you don't supply a host system type. The old scheme of supplying a
8512 host system triplet is preferable over using this. All the magic is
8513 done in the new `config.guess' script. Examine it for details.
8515 We have also brought our configure script much more in line with the FSF's
8516 version. It now supports the --with-xxx options. In particular,
8517 `--with-minimal-bfd' can be used to make the GDB binary image smaller.
8518 The resulting GDB will not be able to read arbitrary object file formats --
8519 only the format ``expected'' to be used on the configured target system.
8520 We hope to make this the default in a future release.
8522 * Documentation improvements
8524 There's new internal documentation on how to modify GDB, and how to
8525 produce clean changes to the code. We implore people to read it
8526 before submitting changes.
8528 The GDB manual uses new, sexy Texinfo conditionals, rather than arcane
8529 M4 macros. The new texinfo.tex is provided in this release. Pre-built
8530 `info' files are also provided. To build `info' files from scratch,
8531 you will need the latest `makeinfo' release, which will be available in
8532 a future texinfo-X.Y release.
8534 *NOTE* The new texinfo.tex can cause old versions of TeX to hang.
8535 We're not sure exactly which versions have this problem, but it has
8536 been seen in 3.0. We highly recommend upgrading to TeX version 3.141
8537 or better. If that isn't possible, there is a patch in
8538 `texinfo/tex3patch' that will modify `texinfo/texinfo.tex' to work
8539 around this problem.
8543 GDB now supports array constants that can be used in expressions typed in by
8544 the user. The syntax is `{element, element, ...}'. Ie: you can now type
8545 `print {1, 2, 3}', and it will build up an array in memory malloc'd in
8548 The new directory `gdb/sparclite' contains a program that demonstrates
8549 how the sparc-stub.c remote stub runs on a Fujitsu SPARClite processor.
8551 * New native hosts supported
8553 HP/PA-RISC under HPUX using GNU tools hppa1.1-hp-hpux
8554 386 CPUs running SCO Unix 3.2v4 i386-unknown-sco3.2v4
8556 * New targets supported
8558 AMD 29k family via UDI a29k-amd-udi or udi29k
8560 * New file formats supported
8562 BFD now supports reading HP/PA-RISC executables (SOM file format?),
8563 HPUX core files, and SCO 3.2v2 core files.
8567 Attaching to processes now works again; thanks for the many bug reports.
8569 We have also stomped on a bunch of core dumps caused by
8570 printf_filtered("%s") problems.
8572 We eliminated a copyright problem on the rpc and ptrace header files
8573 for VxWorks, which was discovered at the last minute during the 4.7
8574 release. You should now be able to build a VxWorks GDB.
8576 You can now interrupt gdb while an attached process is running. This
8577 will cause the attached process to stop, and give control back to GDB.
8579 We fixed problems caused by using too many file descriptors
8580 for reading symbols from object files and libraries. This was
8581 especially a problem for programs that used many (~100) shared
8584 The `step' command now only enters a subroutine if there is line number
8585 information for the subroutine. Otherwise it acts like the `next'
8586 command. Previously, `step' would enter subroutines if there was
8587 any debugging information about the routine. This avoids problems
8588 when using `cc -g1' on MIPS machines.
8590 * Internal improvements
8592 GDB's internal interfaces have been improved to make it easier to support
8593 debugging of multiple languages in the future.
8595 GDB now uses a common structure for symbol information internally.
8596 Minimal symbols (derived from linkage symbols in object files), partial
8597 symbols (from a quick scan of debug information), and full symbols
8598 contain a common subset of information, making it easier to write
8599 shared code that handles any of them.
8601 * New command line options
8603 We now accept --silent as an alias for --quiet.
8607 The memory-mapped-malloc library is now licensed under the GNU Library
8608 General Public License.
8610 *** Changes in GDB-4.7:
8612 * Host/native/target split
8614 GDB has had some major internal surgery to untangle the support for
8615 hosts and remote targets. Now, when you configure GDB for a remote
8616 target, it will no longer load in all of the support for debugging
8617 local programs on the host. When fully completed and tested, this will
8618 ensure that arbitrary host/target combinations are possible.
8620 The primary conceptual shift is to separate the non-portable code in
8621 GDB into three categories. Host specific code is required any time GDB
8622 is compiled on that host, regardless of the target. Target specific
8623 code relates to the peculiarities of the target, but can be compiled on
8624 any host. Native specific code is everything else: it can only be
8625 built when the host and target are the same system. Child process
8626 handling and core file support are two common `native' examples.
8628 GDB's use of /proc for controlling Unix child processes is now cleaner.
8629 It has been split out into a single module under the `target_ops' vector,
8630 plus two native-dependent functions for each system that uses /proc.
8632 * New hosts supported
8634 HP/Apollo 68k (under the BSD domain) m68k-apollo-bsd or apollo68bsd
8635 386 CPUs running various BSD ports i386-unknown-bsd or 386bsd
8636 386 CPUs running SCO Unix i386-unknown-scosysv322 or i386sco
8638 * New targets supported
8640 Fujitsu SPARClite sparclite-fujitsu-none or sparclite
8641 68030 and CPU32 m68030-*-*, m68332-*-*
8643 * New native hosts supported
8645 386 CPUs running various BSD ports i386-unknown-bsd or 386bsd
8646 (386bsd is not well tested yet)
8647 386 CPUs running SCO Unix i386-unknown-scosysv322 or sco
8649 * New file formats supported
8651 BFD now supports COFF files for the Zilog Z8000 microprocessor. It
8652 supports reading of `a.out.adobe' object files, which are an a.out
8653 format extended with minimal information about multiple sections.
8657 `show copying' is the same as the old `info copying'.
8658 `show warranty' is the same as `info warrantee'.
8659 These were renamed for consistency. The old commands continue to work.
8661 `info handle' is a new alias for `info signals'.
8663 You can now define pre-command hooks, which attach arbitrary command
8664 scripts to any command. The commands in the hook will be executed
8665 prior to the user's command. You can also create a hook which will be
8666 executed whenever the program stops. See gdb.texinfo.
8670 We now deal with Cfront style name mangling, and can even extract type
8671 info from mangled symbols. GDB can automatically figure out which
8672 symbol mangling style your C++ compiler uses.
8674 Calling of methods and virtual functions has been improved as well.
8678 The crash that occurred when debugging Sun Ansi-C compiled binaries is
8679 fixed. This was due to mishandling of the extra N_SO stabs output
8682 We also finally got Ultrix 4.2 running in house, and fixed core file
8683 support, with help from a dozen people on the net.
8685 John M. Farrell discovered that the reason that single-stepping was so
8686 slow on all of the Mips based platforms (primarily SGI and DEC) was
8687 that we were trying to demangle and lookup a symbol used for internal
8688 purposes on every instruction that was being stepped through. Changing
8689 the name of that symbol so that it couldn't be mistaken for a C++
8690 mangled symbol sped things up a great deal.
8692 Rich Pixley sped up symbol lookups in general by getting much smarter
8693 about when C++ symbol mangling is necessary. This should make symbol
8694 completion (TAB on the command line) much faster. It's not as fast as
8695 we'd like, but it's significantly faster than gdb-4.6.
8699 A new user controllable variable 'call_scratch_address' can
8700 specify the location of a scratch area to be used when GDB
8701 calls a function in the target. This is necessary because the
8702 usual method of putting the scratch area on the stack does not work
8703 in systems that have separate instruction and data spaces.
8705 We integrated changes to support the 29k UDI (Universal Debugger
8706 Interface), but discovered at the last minute that we didn't have all
8707 of the appropriate copyright paperwork. We are working with AMD to
8708 resolve this, and hope to have it available soon.
8712 We have sped up the remote serial line protocol, especially for targets
8713 with lots of registers. It now supports a new `expedited status' ('T')
8714 message which can be used in place of the existing 'S' status message.
8715 This allows the remote stub to send only the registers that GDB
8716 needs to make a quick decision about single-stepping or conditional
8717 breakpoints, eliminating the need to fetch the entire register set for
8718 each instruction being stepped through.
8720 The GDB remote serial protocol now implements a write-through cache for
8721 registers, only re-reading the registers if the target has run.
8723 There is also a new remote serial stub for SPARC processors. You can
8724 find it in gdb-4.7/gdb/sparc-stub.c. This was written to support the
8725 Fujitsu SPARClite processor, but will run on any stand-alone SPARC
8726 processor with a serial port.
8730 Configure.in files have become much easier to read and modify. A new
8731 `table driven' format makes it more obvious what configurations are
8732 supported, and what files each one uses.
8736 There is a new opcodes library which will eventually contain all of the
8737 disassembly routines and opcode tables. At present, it only contains
8738 Sparc and Z8000 routines. This will allow the assembler, debugger, and
8739 disassembler (binutils/objdump) to share these routines.
8741 The libiberty library is now copylefted under the GNU Library General
8742 Public License. This allows more liberal use, and was done so libg++
8743 can use it. This makes no difference to GDB, since the Library License
8744 grants all the rights from the General Public License.
8748 The file gdb-4.7/gdb/doc/stabs.texinfo is a (relatively) complete
8749 reference to the stabs symbol info used by the debugger. It is (as far
8750 as we know) the only published document on this fascinating topic. We
8751 encourage you to read it, compare it to the stabs information on your
8752 system, and send improvements on the document in general (to
8753 bug-gdb@prep.ai.mit.edu).
8755 And, of course, many bugs have been fixed.
8758 *** Changes in GDB-4.6:
8760 * Better support for C++ function names
8762 GDB now accepts as input the "demangled form" of C++ overloaded function
8763 names and member function names, and can do command completion on such names
8764 (using TAB, TAB-TAB, and ESC-?). The names have to be quoted with a pair of
8765 single quotes. Examples are 'func (int, long)' and 'obj::operator==(obj&)'.
8766 Make use of command completion, it is your friend.
8768 GDB also now accepts a variety of C++ mangled symbol formats. They are
8769 the GNU g++ style, the Cfront (ARM) style, and the Lucid (lcc) style.
8770 You can tell GDB which format to use by doing a 'set demangle-style {gnu,
8771 lucid, cfront, auto}'. 'gnu' is the default. Do a 'set demangle-style foo'
8772 for the list of formats.
8774 * G++ symbol mangling problem
8776 Recent versions of gcc have a bug in how they emit debugging information for
8777 C++ methods (when using dbx-style stabs). The file 'gcc.patch' (in this
8778 directory) can be applied to gcc to fix the problem. Alternatively, if you
8779 can't fix gcc, you can #define GCC_MANGLE_BUG when compiling gdb/symtab.c. The
8780 usual symptom is difficulty with setting breakpoints on methods. GDB complains
8781 about the method being non-existent. (We believe that version 2.2.2 of GCC has
8784 * New 'maintenance' command
8786 All of the commands related to hacking GDB internals have been moved out of
8787 the main command set, and now live behind the 'maintenance' command. This
8788 can also be abbreviated as 'mt'. The following changes were made:
8790 dump-me -> maintenance dump-me
8791 info all-breakpoints -> maintenance info breakpoints
8792 printmsyms -> maintenance print msyms
8793 printobjfiles -> maintenance print objfiles
8794 printpsyms -> maintenance print psymbols
8795 printsyms -> maintenance print symbols
8797 The following commands are new:
8799 maintenance demangle Call internal GDB demangler routine to
8800 demangle a C++ link name and prints the result.
8801 maintenance print type Print a type chain for a given symbol
8803 * Change to .gdbinit file processing
8805 We now read the $HOME/.gdbinit file before processing the argv arguments
8806 (e.g. reading symbol files or core files). This allows global parameters to
8807 be set, which will apply during the symbol reading. The ./.gdbinit is still
8808 read after argv processing.
8810 * New hosts supported
8812 Solaris-2.0 !!! sparc-sun-solaris2 or sun4sol2
8814 GNU/Linux support i386-unknown-linux or linux
8816 We are also including code to support the HP/PA running BSD and HPUX. This
8817 is almost guaranteed not to work, as we didn't have time to test or build it
8818 for this release. We are including it so that the more adventurous (or
8819 masochistic) of you can play with it. We also had major problems with the
8820 fact that the compiler that we got from HP doesn't support the -g option.
8823 * New targets supported
8825 Hitachi H8/300 h8300-hitachi-hms or h8300hms
8827 * More smarts about finding #include files
8829 GDB now remembers the compilation directory for all include files, and for
8830 all files from which C is generated (like yacc and lex sources). This
8831 greatly improves GDB's ability to find yacc/lex sources, and include files,
8832 especially if you are debugging your program from a directory different from
8833 the one that contains your sources.
8835 We also fixed a bug which caused difficulty with listing and setting
8836 breakpoints in include files which contain C code. (In the past, you had to
8837 try twice in order to list an include file that you hadn't looked at before.)
8839 * Interesting infernals change
8841 GDB now deals with arbitrary numbers of sections, where the symbols for each
8842 section must be relocated relative to that section's landing place in the
8843 target's address space. This work was needed to support ELF with embedded
8844 stabs used by Solaris-2.0.
8846 * Bug fixes (of course!)
8848 There have been loads of fixes for the following things:
8849 mips, rs6000, 29k/udi, m68k, g++, type handling, elf/dwarf, m88k,
8850 i960, stabs, DOS(GO32), procfs, etc...
8852 See the ChangeLog for details.
8854 *** Changes in GDB-4.5:
8856 * New machines supported (host and target)
8858 IBM RS6000 running AIX rs6000-ibm-aix or rs6000
8860 SGI Irix-4.x mips-sgi-irix4 or iris4
8862 * New malloc package
8864 GDB now uses a new memory manager called mmalloc, based on gmalloc.
8865 Mmalloc is capable of handling multiple heaps of memory. It is also
8866 capable of saving a heap to a file, and then mapping it back in later.
8867 This can be used to greatly speedup the startup of GDB by using a
8868 pre-parsed symbol table which lives in a mmalloc managed heap. For
8869 more details, please read mmalloc/mmalloc.texi.
8873 The 'info proc' command (SVR4 only) has been enhanced quite a bit. See
8874 'help info proc' for details.
8876 * MIPS ecoff symbol table format
8878 The code that reads MIPS symbol table format is now supported on all hosts.
8879 Thanks to MIPS for releasing the sym.h and symconst.h files to make this
8882 * File name changes for MS-DOS
8884 Many files in the config directories have been renamed to make it easier to
8885 support GDB on MS-DOSe systems (which have very restrictive file name
8886 conventions :-( ). MS-DOSe host support (under DJ Delorie's GO32
8887 environment) is close to working but has some remaining problems. Note
8888 that debugging of DOS programs is not supported, due to limitations
8889 in the ``operating system'', but it can be used to host cross-debugging.
8891 * Cross byte order fixes
8893 Many fixes have been made to support cross debugging of Sparc and MIPS
8894 targets from hosts whose byte order differs.
8896 * New -mapped and -readnow options
8898 If memory-mapped files are available on your system through the 'mmap'
8899 system call, you can use the -mapped option on the `file' or
8900 `symbol-file' commands to cause GDB to write the symbols from your
8901 program into a reusable file. If the program you are debugging is
8902 called `/path/fred', the mapped symbol file will be `./fred.syms'.
8903 Future GDB debugging sessions will notice the presence of this file,
8904 and will quickly map in symbol information from it, rather than reading
8905 the symbol table from the executable program. Using the '-mapped'
8906 option in a GDB `file' or `symbol-file' command has the same effect as
8907 starting GDB with the '-mapped' command-line option.
8909 You can cause GDB to read the entire symbol table immediately by using
8910 the '-readnow' option with any of the commands that load symbol table
8911 information (or on the GDB command line). This makes the command
8912 slower, but makes future operations faster.
8914 The -mapped and -readnow options are typically combined in order to
8915 build a `fred.syms' file that contains complete symbol information.
8916 A simple GDB invocation to do nothing but build a `.syms' file for future
8919 gdb -batch -nx -mapped -readnow programname
8921 The `.syms' file is specific to the host machine on which GDB is run.
8922 It holds an exact image of GDB's internal symbol table. It cannot be
8923 shared across multiple host platforms.
8925 * longjmp() handling
8927 GDB is now capable of stepping and nexting over longjmp(), _longjmp(), and
8928 siglongjmp() without losing control. This feature has not yet been ported to
8929 all systems. It currently works on many 386 platforms, all MIPS-based
8930 platforms (SGI, DECstation, etc), and Sun3/4.
8934 Preliminary work has been put in to support the new Solaris OS from Sun. At
8935 this time, it can control and debug processes, but it is not capable of
8940 As always, many many bug fixes. The major areas were with g++, and mipsread.
8941 People using the MIPS-based platforms should experience fewer mysterious
8942 crashes and trashed symbol tables.
8944 *** Changes in GDB-4.4:
8946 * New machines supported (host and target)
8948 SCO Unix on i386 IBM PC clones i386-sco-sysv or i386sco
8950 BSD Reno on Vax vax-dec-bsd
8951 Ultrix on Vax vax-dec-ultrix
8953 * New machines supported (target)
8955 AMD 29000 embedded, using EBMON a29k-none-none
8959 GDB continues to improve its handling of C++. `References' work better.
8960 The demangler has also been improved, and now deals with symbols mangled as
8961 per the Annotated C++ Reference Guide.
8963 GDB also now handles `stabs' symbol information embedded in MIPS
8964 `ecoff' symbol tables. Since the ecoff format was not easily
8965 extensible to handle new languages such as C++, this appeared to be a
8966 good way to put C++ debugging info into MIPS binaries. This option
8967 will be supported in the GNU C compiler, version 2, when it is
8970 * New features for SVR4
8972 GDB now handles SVR4 shared libraries, in the same fashion as SunOS
8973 shared libraries. Debugging dynamically linked programs should present
8974 only minor differences from debugging statically linked programs.
8976 The `info proc' command will print out information about any process
8977 on an SVR4 system (including the one you are debugging). At the moment,
8978 it prints the address mappings of the process.
8980 If you bring up GDB on another SVR4 system, please send mail to
8981 bug-gdb@prep.ai.mit.edu to let us know what changes were reqired (if any).
8983 * Better dynamic linking support in SunOS
8985 Reading symbols from shared libraries which contain debugging symbols
8986 now works properly. However, there remain issues such as automatic
8987 skipping of `transfer vector' code during function calls, which
8988 make it harder to debug code in a shared library, than to debug the
8989 same code linked statically.
8993 GDB is now using the latest `getopt' routines from the FSF. This
8994 version accepts the -- prefix for options with long names. GDB will
8995 continue to accept the old forms (-option and +option) as well.
8996 Various single letter abbreviations for options have been explicity
8997 added to the option table so that they won't get overshadowed in the
8998 future by other options that begin with the same letter.
9002 The `cleanup_undefined_types' bug that many of you noticed has been squashed.
9003 Many assorted bugs have been handled. Many more remain to be handled.
9004 See the various ChangeLog files (primarily in gdb and bfd) for details.
9007 *** Changes in GDB-4.3:
9009 * New machines supported (host and target)
9011 Amiga 3000 running Amix m68k-cbm-svr4 or amix
9012 NCR 3000 386 running SVR4 i386-ncr-svr4 or ncr3000
9013 Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
9015 * Almost SCO Unix support
9017 We had hoped to support:
9018 SCO Unix on i386 IBM PC clones i386-sco-sysv or i386sco
9019 (except for core file support), but we discovered very late in the release
9020 that it has problems with process groups that render gdb unusable. Sorry
9021 about that. I encourage people to fix it and post the fixes.
9023 * Preliminary ELF and DWARF support
9025 GDB can read ELF object files on System V Release 4, and can handle
9026 debugging records for C, in DWARF format, in ELF files. This support
9027 is preliminary. If you bring up GDB on another SVR4 system, please
9028 send mail to bug-gdb@prep.ai.mit.edu to let us know what changes were
9033 GDB now uses the latest `readline' library. One user-visible change
9034 is that two tabs will list possible command completions, which previously
9035 required typing M-? (meta-question mark, or ESC ?).
9039 The `stepi' bug that many of you noticed has been squashed.
9040 Many bugs in C++ have been handled. Many more remain to be handled.
9041 See the various ChangeLog files (primarily in gdb and bfd) for details.
9043 * State of the MIPS world (in case you wondered):
9045 GDB can understand the symbol tables emitted by the compilers
9046 supplied by most vendors of MIPS-based machines, including DEC. These
9047 symbol tables are in a format that essentially nobody else uses.
9049 Some versions of gcc come with an assembler post-processor called
9050 mips-tfile. This program is required if you want to do source-level
9051 debugging of gcc-compiled programs. I believe FSF does not ship
9052 mips-tfile with gcc version 1, but it will eventually come with gcc
9055 Debugging of g++ output remains a problem. g++ version 1.xx does not
9056 really support it at all. (If you're lucky, you should be able to get
9057 line numbers and stack traces to work, but no parameters or local
9058 variables.) With some work it should be possible to improve the
9061 When gcc version 2 is released, you will have somewhat better luck.
9062 However, even then you will get confusing results for inheritance and
9065 We will eventually provide full debugging of g++ output on
9066 DECstations. This will probably involve some kind of stabs-in-ecoff
9067 encapulation, but the details have not been worked out yet.
9070 *** Changes in GDB-4.2:
9072 * Improved configuration
9074 Only one copy of `configure' exists now, and it is not self-modifying.
9075 Porting BFD is simpler.
9079 The `step' and `next' commands now only stop at the first instruction
9080 of a source line. This prevents the multiple stops that used to occur
9081 in switch statements, for-loops, etc. `Step' continues to stop if a
9082 function that has debugging information is called within the line.
9086 Lots of small bugs fixed. More remain.
9088 * New host supported (not target)
9090 Intel 386 PC clone running Mach i386-none-mach
9093 *** Changes in GDB-4.1:
9095 * Multiple source language support
9097 GDB now has internal scaffolding to handle several source languages.
9098 It determines the type of each source file from its filename extension,
9099 and will switch expression parsing and number formatting to match the
9100 language of the function in the currently selected stack frame.
9101 You can also specifically set the language to be used, with
9102 `set language c' or `set language modula-2'.
9106 GDB now has preliminary support for the GNU Modula-2 compiler,
9107 currently under development at the State University of New York at
9108 Buffalo. Development of both GDB and the GNU Modula-2 compiler will
9109 continue through the fall of 1991 and into 1992.
9111 Other Modula-2 compilers are currently not supported, and attempting to
9112 debug programs compiled with them will likely result in an error as the
9113 symbol table is read. Feel free to work on it, though!
9115 There are hooks in GDB for strict type checking and range checking,
9116 in the `Modula-2 philosophy', but they do not currently work.
9120 GDB can now write to executable and core files (e.g. patch
9121 a variable's value). You must turn this switch on, specify
9122 the file ("exec foo" or "core foo"), *then* modify it, e.g.
9123 by assigning a new value to a variable. Modifications take
9126 * Automatic SunOS shared library reading
9128 When you run your program, GDB automatically determines where its
9129 shared libraries (if any) have been loaded, and reads their symbols.
9130 The `share' command is no longer needed. This also works when
9131 examining core files.
9135 You can specify the number of lines that the `list' command shows.
9138 * New machines supported (host and target)
9140 SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris
9141 Sony NEWS (68K) running NEWSOS 3.x: m68k-sony-sysv or news
9142 Ultracomputer (29K) running Sym1: a29k-nyu-sym1 or ultra3
9144 * New hosts supported (not targets)
9146 IBM RT/PC: romp-ibm-aix or rtpc
9148 * New targets supported (not hosts)
9150 AMD 29000 embedded with COFF a29k-none-coff
9151 AMD 29000 embedded with a.out a29k-none-aout
9152 Ultracomputer remote kernel debug a29k-nyu-kern
9154 * New remote interfaces
9160 *** Changes in GDB-4.0:
9164 Wide output is wrapped at good places to make the output more readable.
9166 Gdb now supports cross-debugging from a host machine of one type to a
9167 target machine of another type. Communication with the target system
9168 is over serial lines. The ``target'' command handles connecting to the
9169 remote system; the ``load'' command will download a program into the
9170 remote system. Serial stubs for the m68k and i386 are provided. Gdb
9171 also supports debugging of realtime processes running under VxWorks,
9172 using SunRPC Remote Procedure Calls over TCP/IP to talk to a debugger
9173 stub on the target system.
9175 New CPUs supported include the AMD 29000 and Intel 960.
9177 GDB now reads object files and symbol tables via a ``binary file''
9178 library, which allows a single copy of GDB to debug programs of multiple
9179 object file types such as a.out and coff.
9181 There is now a GDB reference card in "doc/refcard.tex". (Make targets
9182 refcard.dvi and refcard.ps are available to format it).
9185 * Control-Variable user interface simplified
9187 All variables that control the operation of the debugger can be set
9188 by the ``set'' command, and displayed by the ``show'' command.
9190 For example, ``set prompt new-gdb=>'' will change your prompt to new-gdb=>.
9191 ``Show prompt'' produces the response:
9192 Gdb's prompt is new-gdb=>.
9194 What follows are the NEW set commands. The command ``help set'' will
9195 print a complete list of old and new set commands. ``help set FOO''
9196 will give a longer description of the variable FOO. ``show'' will show
9197 all of the variable descriptions and their current settings.
9199 confirm on/off: Enables warning questions for operations that are
9200 hard to recover from, e.g. rerunning the program while
9201 it is already running. Default is ON.
9203 editing on/off: Enables EMACS style command line editing
9204 of input. Previous lines can be recalled with
9205 control-P, the current line can be edited with control-B,
9206 you can search for commands with control-R, etc.
9209 history filename NAME: NAME is where the gdb command history
9210 will be stored. The default is .gdb_history,
9211 or the value of the environment variable
9214 history size N: The size, in commands, of the command history. The
9215 default is 256, or the value of the environment variable
9218 history save on/off: If this value is set to ON, the history file will
9219 be saved after exiting gdb. If set to OFF, the
9220 file will not be saved. The default is OFF.
9222 history expansion on/off: If this value is set to ON, then csh-like
9223 history expansion will be performed on
9224 command line input. The default is OFF.
9226 radix N: Sets the default radix for input and output. It can be set
9227 to 8, 10, or 16. Note that the argument to "radix" is interpreted
9228 in the current radix, so "set radix 10" is always a no-op.
9230 height N: This integer value is the number of lines on a page. Default
9231 is 24, the current `stty rows'' setting, or the ``li#''
9232 setting from the termcap entry matching the environment
9235 width N: This integer value is the number of characters on a line.
9236 Default is 80, the current `stty cols'' setting, or the ``co#''
9237 setting from the termcap entry matching the environment
9240 Note: ``set screensize'' is obsolete. Use ``set height'' and
9241 ``set width'' instead.
9243 print address on/off: Print memory addresses in various command displays,
9244 such as stack traces and structure values. Gdb looks
9245 more ``symbolic'' if you turn this off; it looks more
9246 ``machine level'' with it on. Default is ON.
9248 print array on/off: Prettyprint arrays. New convenient format! Default
9251 print demangle on/off: Print C++ symbols in "source" form if on,
9254 print asm-demangle on/off: Same, for assembler level printouts
9257 print vtbl on/off: Prettyprint C++ virtual function tables. Default is OFF.
9260 * Support for Epoch Environment.
9262 The epoch environment is a version of Emacs v18 with windowing. One
9263 new command, ``inspect'', is identical to ``print'', except that if you
9264 are running in the epoch environment, the value is printed in its own
9268 * Support for Shared Libraries
9270 GDB can now debug programs and core files that use SunOS shared libraries.
9271 Symbols from a shared library cannot be referenced
9272 before the shared library has been linked with the program (this
9273 happens after you type ``run'' and before the function main() is entered).
9274 At any time after this linking (including when examining core files
9275 from dynamically linked programs), gdb reads the symbols from each
9276 shared library when you type the ``sharedlibrary'' command.
9277 It can be abbreviated ``share''.
9279 sharedlibrary REGEXP: Load shared object library symbols for files
9280 matching a unix regular expression. No argument
9281 indicates to load symbols for all shared libraries.
9283 info sharedlibrary: Status of loaded shared libraries.
9288 A watchpoint stops execution of a program whenever the value of an
9289 expression changes. Checking for this slows down execution
9290 tremendously whenever you are in the scope of the expression, but is
9291 quite useful for catching tough ``bit-spreader'' or pointer misuse
9292 problems. Some machines such as the 386 have hardware for doing this
9293 more quickly, and future versions of gdb will use this hardware.
9295 watch EXP: Set a watchpoint (breakpoint) for an expression.
9297 info watchpoints: Information about your watchpoints.
9299 delete N: Deletes watchpoint number N (same as breakpoints).
9300 disable N: Temporarily turns off watchpoint number N (same as breakpoints).
9301 enable N: Re-enables watchpoint number N (same as breakpoints).
9304 * C++ multiple inheritance
9306 When used with a GCC version 2 compiler, GDB supports multiple inheritance
9309 * C++ exception handling
9311 Gdb now supports limited C++ exception handling. Besides the existing
9312 ability to breakpoint on an exception handler, gdb can breakpoint on
9313 the raising of an exception (before the stack is peeled back to the
9316 catch FOO: If there is a FOO exception handler in the dynamic scope,
9317 set a breakpoint to catch exceptions which may be raised there.
9318 Multiple exceptions (``catch foo bar baz'') may be caught.
9320 info catch: Lists all exceptions which may be caught in the
9321 current stack frame.
9324 * Minor command changes
9326 The command ``call func (arg, arg, ...)'' now acts like the print
9327 command, except it does not print or save a value if the function's result
9328 is void. This is similar to dbx usage.
9330 The ``up'' and ``down'' commands now always print the frame they end up
9331 at; ``up-silently'' and `down-silently'' can be used in scripts to change
9332 frames without printing.
9334 * New directory command
9336 'dir' now adds directories to the FRONT of the source search path.
9337 The path starts off empty. Source files that contain debug information
9338 about the directory in which they were compiled can be found even
9339 with an empty path; Sun CC and GCC include this information. If GDB can't
9340 find your source file in the current directory, type "dir .".
9342 * Configuring GDB for compilation
9344 For normal use, type ``./configure host''. See README or gdb.texinfo
9347 GDB now handles cross debugging. If you are remotely debugging between
9348 two different machines, type ``./configure host -target=targ''.
9349 Host is the machine where GDB will run; targ is the machine
9350 where the program that you are debugging will run.