https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101905

--- Comment #3 from Yuri Karlsbrun <yuri.karlsbrun at broadcom dot com> ---
With the gcc-5.3 correct debug info for global register variable is written,
and variable is visible to gdb

gcc -v
Using built-in specs.
COLLECT_GCC=/tools/oss/packages/x86_64-centos7/gcc/5.3.0/bin/gcc
COLLECT_LTO_WRAPPER=/tools/oss/packages/x86_64-rhel7/gcc/5.3.0/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../../gcc-5.3.0/configure
--prefix=/tools/oss/packages/x86_64-centos7/gcc/5.3.0 --with-gnu-as
--with-as=/tools/oss/packages/x86_64-centos7/binutils/2.25/bin/as --with-gnu-ld
--with-ld=/tools/oss/packages/x86_64-centos7/binutils/2.25/bin/ld
--with-mpc=/tools/oss/packages/x86_64-centos7/mpc/1.0.3
--with-mpfr=/tools/oss/packages/x86_64-centos7/mpfr/3.1.2
--enable-languages=c,c++,objc,java,fortran --enable-symvers=gnu
Thread model: posix
gcc version 5.3.0 (GCC)


< 1><0x00000075>    DW_TAG_variable
                      DW_AT_name                  regVar
                      DW_AT_decl_file             0x00000001
/projects/play/ev.c
                      DW_AT_decl_line             0x00000001
                      DW_AT_type                  <0x00000082>
                      DW_AT_external              yes(1)
                      DW_AT_location              len 0x0001: 5f: DW_OP_reg15

Reply via email to