Description of problem: In some cases GDB cannot print errno - such as for core files of multithreaded applications. It also affects printing errno when no glibc-debuginfo.rpm is installed and 'errno' is used in a non-trivial numeric expression in GDB. Version-Release number of selected component (if applicable): FAIL: All existing versions of GDB incl. upstream so far. FAIL: devtoolset-6-gdb-7.12-0.20.20161006.el{7,6} How reproducible: Always. Steps to Reproduce: mv /usr/lib/debug /usr/lib/debug-x echo 'int main(){}'|gcc -pthread -x c - ./gdb -q -ex start -ex 'p errno' ./a.out Actual results: Cannot access memory at address 0xffffef7c9698 Expected results: $1 = 0 Additional info: [patch+7.12.1 2/2] Fix TLS (such as 'errno') regression https://sourceware.org/ml/gdb-patches/2016-10/msg00207.html
QA: New testfile: gdb.threads/tls-nodebug-pie.exp It is the reported regression: FAIL: gdb.dwarf2/dw2-errno2.exp: macros=N threads=Y: print errno for core
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2737.html