No description
Find a file
Walfred Tedeschi 4f19a0e6b4 Fix of default lookup for "this" symbol.
Using the default lookup for the symbol "this" might lead to segmentation
fault in GDB.
Some languages, e.g. Fortran, use as default lookup routine the C++
routines.
For those languages "this" can be the instance of a class or even the
definition of a class.
When an instance of a class having the name "this" is evaluated
in GDB a segmentation fault was observed.

As example of the issue take into consideration the Fortran code:
  type foo
    real :: a
    type(bar) :: x
    character*7 :: b
  end type foo
  type(foo) :: this

Issue appears when evaluating the variable "this" in GDB.

Within the language definition structure there is a field that represents
the name of the special symbol used for the C++ "this" for the language
being described.
The fix presented here takes into account the aforementioned field. In the
case the aforementioned field is NULL "this" is not represented in the
language described and the lookup should return a null_block_symbol.

Tests: Performed tests with gfortran and ifort.

Reviewed:
https://sourceware.org/ml/gdb-patches/2016-04/msg00068.html

After the commited patch:
https://sourceware.org/ml/gdb-patches/2016-06/msg00364.html
Patch can be applied.

2016-06-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>

gdb/ChangeLog:

	* cp-namespace.c (cp_lookup_bare_symbol): Use language passed as
	parameter to look for the symbol "this".

gdb/testsuite/ChangeLog:

	* gdb.fortran/derived-types.exp (result_line, result_line_2):
	New variables.
	(print this%a, print this%b, print this): New tests.
	* gdb.fortran/derived-types.f90 (this): New object and
	initialization.
2016-07-07 17:33:05 +02:00
bfd Automatic date update in version.in 2016-07-07 00:00:21 +00:00
binutils [ARM] Change noread to purecode. 2016-07-05 11:28:46 +01:00
config
cpu
elfcpp
etc
gas x86: fix register check in check_qword_reg() 2016-07-05 11:14:51 +02:00
gdb Fix of default lookup for "this" symbol. 2016-07-07 17:33:05 +02:00
gold Fix gold testsuite failure with GCC 6. 2016-06-29 23:24:35 -07:00
gprof
include [ARM] Change noread to purecode. 2016-07-05 11:28:46 +01:00
intl
ld FT32 linker script cleanup 2016-07-06 18:58:10 -07:00
libdecnumber
libiberty
opcodes x86: allow suffix-less movzw and 64-bit movzb 2016-07-01 09:01:41 +02:00
readline
sim Add support for simulating big-endian AArch64 binaries. 2016-06-30 09:10:41 +01:00
texinfo
zlib
.cvsignore
.gitattributes
.gitignore
ChangeLog [TILEPro] Don't build gdb 2016-06-28 14:16:15 -04:00
compile
config-ml.in
config.guess
config.rpath
config.sub
configure [TILEPro] Don't build gdb 2016-06-28 14:16:15 -04:00
configure.ac [TILEPro] Don't build gdb 2016-06-28 14:16:15 -04:00
COPYING
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
COPYING3
COPYING3.LIB
depcomp
djunpack.bat
install-sh
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
README
README-maintainer-mode
setup.com
src-release.sh
symlink-tree
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.