Binutils with MCST patches
Go to file
Andrew Burgess b86352cfc1 gdb/dwarf: Ensure the target type of ranges is not void
If a DW_TAG_subrange_type DWARF entry has no DW_AT_type then a default
type based on the size of an address on the current target is assumed.
We store this type as the target type for GDB's range types.

Currently GDB can create ranges for which the target type is VOID,
this is incorrect but seems to cause no problems. I believe the reason
this doesn't cause any issues is because the languages (for example
Ada) that actually make use of a ranges target type also have
compilers that generate DWARF that includes a DW_AT_type attribute.

However, gfortran does not include a DW_AT_type, its DWARF instead
relies on the default target type.  This isn't currently a problem for
GDB as gfortran doesn't make use of the target type when printing
subranges, but it shouldn't hurt to fix this issue now.

I've added an assert into create_range_type that will catch this issue
if it comes up again.

This was tested on an x86-64/GNU-Linux machine with both the Ada and
gfortran compilers available with both '--target_board=unix' and
'--target_board=unix/-m32'.  There are no user visible changes after
this commit.

gdb/ChangeLog:

	* dwarf2read.c (read_subrange_index_type): New function.
	(read_subrange_type): Move code into new function and call it.
	* gdbtypes.c (create_range_type): Add some asserts.
2019-07-12 12:09:53 +01:00
bfd Automatic date update in version.in 2019-07-12 00:00:19 +00:00
binutils Prevent attempts to allocate excessive amounts of memory when parsing corrupt ELF files. 2019-06-28 15:30:43 +01:00
config
contrib
cpu
elfcpp [GOLD] R_PPC64_REL16_HIGH relocs 2019-06-28 10:17:08 +09:30
etc
gas Re: gas/ELF: don't accumulate .type settings 2019-07-09 14:30:00 +09:30
gdb gdb/dwarf: Ensure the target type of ranges is not void 2019-07-12 12:09:53 +01:00
gnulib Fix gnulib/update-gnulib.sh 2019-06-21 13:23:59 +01:00
gold [GOLD] PowerPC tweak relnum tests 2019-06-28 10:18:03 +09:30
gprof
include [gas][aarch64][SVE2] Fix pmull{t,b} requirement on SVE2-AES 2019-07-01 15:17:22 +01:00
intl
ld Re: PowerPC notoc call stub tests 2019-07-08 15:24:14 +09:30
libctf libctf: fix spurious error when rolling back to the first snapshot 2019-07-01 11:05:59 +01:00
libdecnumber
libiberty
opcodes arm-dis.c (print_insn_coprocessor): Rename index to index_operand. 2019-07-10 18:42:06 +02:00
readline [readline] Fix heap-buffer-overflow in update_line 2019-07-12 09:53:02 +02:00
sim sim/testsuite/or1k: Add tests for unordered compares 2019-06-13 21:27:10 +09:00
texinfo
zlib
.cvsignore
.gitattributes
.gitignore
ar-lib
ChangeLog Add gnulib to gdb release tarball 2019-06-21 15:20:34 +02:00
compile
config-ml.in
config.guess
config.rpath
config.sub
configure Move gnulib to top level 2019-06-14 12:40:02 -06:00
configure.ac Move gnulib to top level 2019-06-14 12:40:02 -06:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Move gnulib to top level 2019-06-14 12:40:02 -06:00
Makefile.def Move gnulib to top level 2019-06-14 12:40:02 -06:00
Makefile.in Move gnulib to top level 2019-06-14 12:40:02 -06:00
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
setup.com
src-release.sh Add gnulib to gdb release tarball 2019-06-21 15:20:34 +02:00
symlink-tree
test-driver
ylwrap

		   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.