A.5. Changes in GDB

Red Hat Developer Toolset 6.0 is distributed with GDB 7.12, which provides a number of bug fixes and improvements over the Red Hat Enterprise Linux system version and the version included in the previous release of Red Hat Developer Toolset. Below is a comprehensive list of new features in this release.

A.5.1. Changes Since Red Hat Developer Toolset 4.1

The following features have been added since the release of GDB in Red Hat Developer Toolset 4.1:

New Features

  • Support for tracepoints and fast tracepoints has been added in GDBserver for the following architectures:
    • IBM z Systems
    • IBM System z9
    The support includes JIT compiling of conditional expressions in bytecode of fast tracepoints into native code.
  • Support has been added for running interpreters on specified input and output devices.
    GDB now supports a new mechanism that allows frontends to provide fully-featured GDB console views as a better alternative to building such views on top of the -interpreter-exec console command. See also the new new-ui command below. With that command, frontends can now start GDB in the traditional command-line mode running in an embedded terminal-emulator widget and create a separate MI interpreter running on a specified I/O device. In this way, GDB handles line editing, history, tab completion, and other tasks in the console all by itself, and the GUI uses the separate MI interpreter for its own control and synchronization, invisible to the command line.
  • Support has been added for Fortran pointers to dynamic types.
  • Support has been added for Fortran structures with fields of dynamic types and arrays of dynamic types.
  • Support has been added to GDBserver for recording btrace without having to maintain an active GDB connection.
  • Support has been added for a negative repeat count in the x command. This allows for examining memory backward from the given address. For example:
    (gdb) bt
     #0  Func1 (n=42, p=0x40061c "hogehoge") at main.cpp:4
     #1  0x400580 in main (argc=1, argv=0x7fffffffe5c8) at main.cpp:8
    (gdb) x/-5i 0x0000000000400580
       0x40056a <main(int, char**)+8>:      mov    %edi,-0x4(%rbp)
       0x40056d <main(int, char**)+11>:     mov    %rsi,-0x10(%rbp)
       0x400571 <main(int, char**)+15>:     mov    $0x40061c,%esi
       0x400576 <main(int, char**)+20>:     mov    $0x2a,%edi
       0x40057b <main(int, char**)+25>:
        callq  0x400536 <Func1(int, char const*)>
  • Support has been added for multibit bitfields and enums in the target register descriptions.
  • A new convenience function, $_as_string(val), based on Python, which returns the textual representation of a value, has been added. The function is useful for obtaining the text label of an enum value.
  • Segmentation faults caused by Intel MPX boundary violations now display the type of violation (upper or lower), the memory address accessed, and the memory bounds, along with the signal received and code location. For example:
    Program received signal SIGSEGV, Segmentation fault
    Upper bound violation while accessing address 0x7fffffffc3b3
    Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
    0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68

New Commands

The following new commands have been added:
skip -file file, skip -gfile file-glob-pattern, skip -function function, skip -rfunction regular-expression
A generalized form of the skip command, with new support for glob-style file names and regular expressions for function names. Additionally, a file spec and a function spec may now be combined.
maint info line-table REGEXP
Show the contents of the internal line-table data struture.
maint selftest
Run all compiled in GDB unit tests.
Start a new user interface instance running INTERP as interpreter, using the TTY file for input and output.
The following command has been enhanced:
  • When issued with the group: or g: prefix, the catch syscall command now supports catching groups of related system calls.

Python Scripting Support

Python scripting support has been improved:
  • A new attribute, pending, has been added to gdb.Breakpoint objects, which indicates whether the breakpoint is pending.
  • Three new events related to breakpoints have been added: gdb.breakpoint_created, gdb.breakpoint_modified, and gdb.breakpoint_deleted.

Change in the Machine Interface Interpreter (GDB/MI)

The following change has been made the GDB/MI.
  • The =record-started async record now includes the method and format used for recording. For example:
  • The =thread-selected async record now includes the frame field. For example: