このコンテンツは選択した言語では利用できません。
7.59. gdb
Updated gdb packages that fix several bugs are now available for Red Hat Enterprise Linux 6.
The GNU Debugger (GDB) allows users to debug programs written in various programming languages including C, C++, and Fortran.
Bug Fixes
- BZ#1099929
- When GDB found a thread with PID -1, GDB attempted to attach to that incorrect PID and consequently failed with an internal error. With this update, GDB detects the incorrect PID -1 earlier and displays a warning message to the user. In addition, the debugging session is no longer affected by the scenario described above.
- BZ#1117841
- GDB used a splay tree to store elements related to address maps. However, when iterating through splay trees that were too large, the recursion of the splay_tree_foreach_helper() function caused GDB to run out of stack, which generated a segmentation fault. The implementation of splay_tree_foreach_helper() has been changed to non-recursive, which improves the efficiency of iterator() and makes GDB avoid the aforementioned failure.
- BZ#1119119
- Previously, GDB did not check for a NULL pointer when trying to find the charset names from the user environment. This caused GDB to terminate unexpectedly, generating a segmentation fault. With this update, GDB correctly checks if it is dealing with a NULL file pointer, thus fixing the bug.
- BZ#1139405
- GDB uses the "(anonymous namespace)" string in the string representation of any symbol defined in an anonymous namespace. However, the linespec parser did not recognize that this string was a necessary component, symbol lookups failed and breakpoints could not set or reset on symbols defined in anonymous namespaces. To fix this bug, the anonymous namespace recognition has been abstracted to clarify the unique role of this representation requirement. Additionally, the linespec parser has been updated to properly deal with the required string. As a result, breakpoints on symbols in anonymous namespaces can be properly set or reset by GDB.
- BZ#1149205
- The "catch syscall" command uses a special type of breakpoint inside GDB, which is not maintained by the code that handles normal breakpoints. Previously, GDB was not able to properly catch a system call in the parent process after the fork() function call. With this update, system call catchpoints are no longer removed from a program that forked itself, and GDB is now able to correctly stop at a call from the parent process after it has forked.
- BZ#1156192
- A defect in the dlopen() library function previously caused recursive calls to dlopen() to crash or abort with a library assertion. Recursive calls to dlopen() may occur if an implementation of malloc() provided by the user calls dlopen(). The dlopen implementation is now reentrant, and recursive calls to dlopen() no longer crash or abort with an assertion.
- BZ#1162264
- Under certain conditions, while attaching to a process, GDB can perform the initial low level ptrace attach request, but the kernel previously refused to let the debugger finish the attach sequence. Consequently, GDB terminated unexpectedly with an internal error. Now, GDB handles the described scenario gracefully, reporting back to the user that the attach request failed. As a result, the user receives a warning noting that GDB was unable to attach because permission was denied. In addition, the debugging session is not affected by this behavior.
- BZ#1186476
- When a breakpoint was pending and a new object file appeared and this new object file contained multiple possible locations for the breakpoint, GDB was being too strict on checking this condition, and issued an internal error. The check for multiple locations for the same breakpoint has been relaxed, and GDB no longer issues an internal error in this scenario. The user now receives a warning mentioning that more than one location for the breakpoint has been found, but only one location will be used.
Users of gdb are advised to upgrade to these updated packages, which fix these bugs.