Binutils with MCST patches
Go to file
Joel Brobecker ddb87a81ac gdb/DWARF: dynamic subrange type of dynamic subrange type.
Consider the following code:

   type Record_Type (N : Integer) is record
      A : Array_Type (1 .. N);
   end record;
   [...]
   R : Record_Type := Get (10);

Trying to print the bounds of the array R.A yielded:

    (gdb) p r.a'last
    $4 = cannot find reference address for offset property

A slightly different example, but from the same cause:

    (gdb) ptype r
    type = <ref> record
        n: integer;
        a: array (cannot find reference address for offset property

Looking at the debugging info, "A" is described as...

        .uleb128 0x11   # (DIE (0x181) DW_TAG_member)
        .ascii "a\0"    # DW_AT_name
        .long   0x15d   # DW_AT_type
        [...]

... which is an array...

        .uleb128 0x12   # (DIE (0x15d) DW_TAG_array_type)
        .long   .LASF18 # DW_AT_name: "foo__record_type__T4b"
        .long   0x194   # DW_AT_type
        .long   0x174   # DW_AT_sibling

... whose bounds are described as:

        .uleb128 0x13   # (DIE (0x16a) DW_TAG_subrange_type)
        .long   0x174   # DW_AT_type
        .long   0x153   # DW_AT_upper_bound
        .byte   0       # end of children of DIE 0x15d

We can see above that the range has an implict lower value of
1, and an upper value which is a reference 0x153="n". All Good.

But looking at the array's subrange subtype, we see...

        .uleb128 0x14   # (DIE (0x174) DW_TAG_subrange_type)
        .long   0x153   # DW_AT_upper_bound
        .long   .LASF19 # DW_AT_name: "foo__record_type__T3b"
        .long   0x18d   # DW_AT_type

... another subrange type whose bounds are exactly described
the same way. So we have a subrange of a subrange, both with
one bound that's dynamic.

What happens in the case above is that GDB's resolution of "R.A"
yields a array whose index type has static bounds. However, the
subtype of the array's index type was left untouched, so, when
taking the subtype of the array's subrange type, we were left
with the unresolved subrange type, triggering the error above.

gdb/ChangeLog:

        * gdbtypes.c (is_dynamic_type_internal) <TYPE_CODE_RANGE>: Return
        nonzero if the type's subtype is dynamic.
        (resolve_dynamic_range): Also resolve the range's subtype.

Tested on x86_64-linux, no regression.
2015-01-29 12:05:36 +04:00
bfd Correct PowerPC64 local-dynamic TLS linker optimization 2015-01-29 13:13:02 +10:30
binutils FT32 initial support 2015-01-28 16:25:18 +10:30
config Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
cpu or1k: add missing l.msync, l.psync and l.psync instructions. 2014-07-20 20:26:09 +03:00
elfcpp ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
etc PR external/{16327,16328}: Remove etc/configure.texi and etc/standards.texi. 2014-06-27 11:33:25 +02:00
gas FT32 initial support 2015-01-28 16:25:18 +10:30
gdb gdb/DWARF: dynamic subrange type of dynamic subrange type. 2015-01-29 12:05:36 +04:00
gold Allow undefined references to TLS symbols. 2015-01-28 15:39:08 -08:00
gprof Regenerate Makeile.in file for copyright update 2015-01-02 22:27:27 +10:30
include FT32 initial support 2015-01-28 16:25:18 +10:30
intl
ld Correct PowerPC64 local-dynamic TLS linker optimization 2015-01-29 13:13:02 +10:30
libdecnumber Another part of fixing "make TAGS". 2015-01-22 21:07:31 +02:00
libiberty strerror.c: Do not declare sys_nerr or sys_errlist if already macros 2015-01-19 16:29:07 +01:00
opcodes FT32 initial support 2015-01-28 16:25:18 +10:30
readline Fix executable indicator in file name completion on Windows. 2014-12-30 21:14:25 +02:00
sim Build failure in sim/rx/gdb-if.c on windows 2015-01-15 07:21:50 +04:00
texinfo
.cvsignore
.gitattributes Add a .gitattributes file for use with git-merge-changelog 2014-07-25 18:07:23 -04:00
.gitignore
COPYING
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
COPYING3
COPYING3.LIB
ChangeLog FT32 initial support 2015-01-28 16:25:18 +10:30
MAINTAINERS Update description of ownership of files in include/ 2014-11-04 16:14:14 -08:00
Makefile.def [GCC bug #63539]: libgo does not use the newly built objcopy when doing a combined build 2015-01-03 14:54:45 -08:00
Makefile.in [GCC bug #63539]: libgo does not use the newly built objcopy when doing a combined build 2015-01-03 14:54:45 -08:00
Makefile.tpl [GCC bug #63539]: libgo does not use the newly built objcopy when doing a combined build 2015-01-03 14:54:45 -08:00
README
README-maintainer-mode
compile Update from upstream Automake 2014-11-16 13:43:48 +01:00
config-ml.in
config.guess config.sub, config.guess: Update from upstream, to 2015-01-01 version. 2015-01-02 10:40:57 +01:00
config.rpath
config.sub config.sub, config.guess: Update from upstream, to 2015-01-01 version. 2015-01-02 10:40:57 +01:00
configure FT32 initial support 2015-01-28 16:25:18 +10:30
configure.ac FT32 initial support 2015-01-28 16:25:18 +10:30
depcomp Update from upstream Automake 2014-11-16 13:43:48 +01:00
djunpack.bat
install-sh Update from upstream Automake 2014-11-16 13:43:48 +01:00
libtool.m4 Update libtool.m4 from GCC trunk 2014-11-24 09:14:09 -08:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
makefile.vms
missing Update from upstream Automake 2014-11-16 13:43:48 +01:00
mkdep
mkinstalldirs Update from upstream Automake 2014-11-16 13:43:48 +01:00
move-if-change Update `move-if-change' from gnulib 2014-11-16 17:04:02 +01:00
setup.com
src-release.sh src-release.sh: configure using --target. 2014-10-15 09:50:53 +02:00
symlink-tree
ylwrap Update from upstream Automake 2014-11-16 13:43:48 +01:00

README

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.