Compare commits

...

6 Commits

Author SHA1 Message Date
Bernhard Heckel
bee226f9b2 Fortran: Document scope operator.
Document scope operator in GDB manual.

2016-08-10  Bernhard Heckel  <bernhard.heckel@intel.com>

gdb/Changelog:
	* doc/gdb.texinfo: Describe scope operator.

Change-Id: I15ff901b4a729f0994410a971bba639ebc361d2a
2016-12-23 12:20:09 +01:00
Bernhard Heckel
1c04575472 Fortran: Nested functions, add scope parameter.
In order to avoid name clashing in GDB, we add a scope
to nested subroutines. Enveloping function gives the
scope.

Change-Id: I7d424b1e3039613d938aae56ec1a3b3d1cdda744
2016-12-23 12:20:06 +01:00
Bernhard Heckel
671c004cc4 Fortran: Enable setting breakpoint on nested functions.
Like in Ada, we want to be able to set a breakpoint on
nested functions, called "contained routines" in Fortran.

2016-06-30  Bernhard Heckel  <bernhard.heckel@intel.com>

gdb/Changelog:
	* dwarf2read.c (todo)

gdb/Changelog:
	* gdb.fortran/nested-funcs.exp: Set breakpoint on contained routines.

Change-Id: I7f2897f8f3160c0d5618850273d87579cc2479c8
2016-12-23 12:20:04 +01:00
Bernhard Heckel
57ed8b65cc Dwarf: Fortran, support DW_TAG_entry_point.
Fortran provides additional entry-points to an subprogram.
Those entry-points may have only a subset of parameters
of the original subprogram as well.
Add support for parsing DW_TAG_entry_point's for Fortran.

2016-06-01  Bernhard Heckel  <bernhard.heckel@intel.com>

gdb/Changelog:
	* gdb/dwarf2read.c (add_partial_symbol): Handle DW_TAG_entry_point.
	(add_partial_entry_point): New.
	(add_partial_subprogram): Search for entry_points.
	(process_die): Handle DW_TAG_entry_point.
	(dwarf2_get_pc_bounds): Update low pc from DWARF.
	(load_partial_dies): Save DW_TAG_entry_point's.
	(load_partial_dies): Save DW_TAG_entry_point to hash table.
	(load_partial_dies): Look into child's of DW_TAG_sub_program
	for fortran.
	(new_symbol_full): Process DW_TAG_entry_point.
	(read_type_die_1): Handle DW_TAG_entry_point.

gdb/Testsuite/Changelog:
	* gdb.fortran/entry_point.f90: New.
	* gdb.fortran/entry_point.exp: New.

Change-Id: I886699802fc940cd9b995806c32a85a05cf57dc4
2016-12-23 12:20:01 +01:00
Joe Seymour
4eabf34463 [msp430] Sync tc-msp430.c with devices.csv
This patch syncs the generated data structure in tc-msp430.c with the
latest version of devices.csv released by TI.

My understanding is that the devices being removed were "invalid spins",
so can't be being used by anyone, and never will be. Current web
searches related to these devices return no relevant results.

Built and tested (no regressions) as follows:
  Configured with: --target=msp430-elf --disable-gdb
  Test variations:
    msp430-sim/-mcpu=msp430
    msp430-sim/-mcpu=msp430x
    msp430-sim/-mcpu=msp430x/-mlarge/-mdata-region=either/-mcode-region=either
    msp430-sim/-mhwmult=none
    msp430-sim/-mhwmult=f5series

gas/
	* config/tc-msp430.c (msp430_mcu_data): Sync with data from TI's
	devices.csv file as of September 2016.
2016-12-23 10:19:15 +00:00
Tristan Gingold
99b5dbf2e7 Bump version to 2.28.51
bfd/
2016-12-23  Tristan Gingold  <gingold@adacore.com>

	* version.m4: Bump version to 2.28.51
	* configure: Regenerate.

binutils/
2016-12-23  Tristan Gingold  <gingold@adacore.com>

	* configure: Regenerate.

gas/
2016-12-23  Tristan Gingold  <gingold@adacore.com>

	* configure: Regenerate.

gprof/
2016-12-23  Tristan Gingold  <gingold@adacore.com>

	* configure: Regenerate.

ld/
2016-12-23  Tristan Gingold  <gingold@adacore.com>

	* configure: Regenerate.

opcodes/
2016-12-23  Tristan Gingold  <gingold@adacore.com>

	* configure: Regenerate.
2016-12-23 09:50:53 +01:00
20 changed files with 424 additions and 74 deletions

View File

@@ -1,3 +1,8 @@
2016-12-23 Tristan Gingold <gingold@adacore.com>
* version.m4: Bump version to 2.28.51
* configure: Regenerate.
2016-12-23 Tristan Gingold <gingold@adacore.com>
* po/bfd.pot: Regenerate.

20
bfd/configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for bfd 2.27.51.
# Generated by GNU Autoconf 2.64 for bfd 2.28.51.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bfd'
PACKAGE_TARNAME='bfd'
PACKAGE_VERSION='2.27.51'
PACKAGE_STRING='bfd 2.27.51'
PACKAGE_VERSION='2.28.51'
PACKAGE_STRING='bfd 2.28.51'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1354,7 +1354,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures bfd 2.27.51 to adapt to many kinds of systems.
\`configure' configures bfd 2.28.51 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1425,7 +1425,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of bfd 2.27.51:";;
short | recursive ) echo "Configuration of bfd 2.28.51:";;
esac
cat <<\_ACEOF
@@ -1546,7 +1546,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
bfd configure 2.27.51
bfd configure 2.28.51
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2188,7 +2188,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by bfd $as_me 2.27.51, which was
It was created by bfd $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -3997,7 +3997,7 @@ fi
# Define the identity of the package.
PACKAGE='bfd'
VERSION='2.27.51'
VERSION='2.28.51'
cat >>confdefs.h <<_ACEOF
@@ -16622,7 +16622,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by bfd $as_me 2.27.51, which was
This file was extended by bfd $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16686,7 +16686,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
bfd config.status 2.27.51
bfd config.status 2.28.51
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@@ -1 +1 @@
m4_define([BFD_VERSION], [2.27.51])
m4_define([BFD_VERSION], [2.28.51])

View File

@@ -1,3 +1,7 @@
2016-12-23 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
2016-12-23 Tristan Gingold <gingold@adacore.com>
* NEWS: Add marker for 2.28.

20
binutils/configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for binutils 2.27.51.
# Generated by GNU Autoconf 2.64 for binutils 2.28.51.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='binutils'
PACKAGE_TARNAME='binutils'
PACKAGE_VERSION='2.27.51'
PACKAGE_STRING='binutils 2.27.51'
PACKAGE_VERSION='2.28.51'
PACKAGE_STRING='binutils 2.28.51'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures binutils 2.27.51 to adapt to many kinds of systems.
\`configure' configures binutils 2.28.51 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1409,7 +1409,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of binutils 2.27.51:";;
short | recursive ) echo "Configuration of binutils 2.28.51:";;
esac
cat <<\_ACEOF
@@ -1530,7 +1530,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
binutils configure 2.27.51
binutils configure 2.28.51
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2172,7 +2172,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by binutils $as_me 2.27.51, which was
It was created by binutils $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -3981,7 +3981,7 @@ fi
# Define the identity of the package.
PACKAGE='binutils'
VERSION='2.27.51'
VERSION='2.28.51'
cat >>confdefs.h <<_ACEOF
@@ -15223,7 +15223,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by binutils $as_me 2.27.51, which was
This file was extended by binutils $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15287,7 +15287,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
binutils config.status 2.27.51
binutils config.status 2.28.51
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@@ -1,3 +1,12 @@
2016-12-23 Joe Seymour <joe.s@somniumtech.com>
* config/tc-msp430.c (msp430_mcu_data): Sync with data from TI's
devices.csv file as of September 2016.
2016-12-23 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
2016-12-23 Tristan Gingold <gingold@adacore.com>
* NEWS: Add marker for 2.28.

View File

@@ -706,8 +706,8 @@ msp430_set_arch (int option)
/* This is a copy of the same data structure found in gcc/config/msp430/msp430.c
Keep these two structures in sync.
The data in this structure has been extracted from the devices.csv file
released by TI, updated as of March 2016. */
The data in this structure has been extracted from version 1.194 of the
devices.csv file released by TI in September 2016. */
struct msp430_mcu_data
{
@@ -1133,6 +1133,8 @@ msp430_mcu_data [] =
{ "msp430fg6626",2,8 },
{ "msp430fr2032",2,0 },
{ "msp430fr2033",2,0 },
{ "msp430fr2110",2,0 },
{ "msp430fr2111",2,0 },
{ "msp430fr2310",2,0 },
{ "msp430fr2311",2,0 },
{ "msp430fr2433",2,8 },
@@ -1173,8 +1175,6 @@ msp430_mcu_data [] =
{ "msp430fr5858",2,8 },
{ "msp430fr5859",2,8 },
{ "msp430fr5867",2,8 },
{ "msp430fr5862",2,8 },
{ "msp430fr5864",2,8 },
{ "msp430fr58671",2,8 },
{ "msp430fr5868",2,8 },
{ "msp430fr5869",2,8 },
@@ -1185,8 +1185,6 @@ msp430_mcu_data [] =
{ "msp430fr5888",2,8 },
{ "msp430fr5889",2,8 },
{ "msp430fr58891",2,8 },
{ "msp430fr5892",2,8 },
{ "msp430fr5894",2,8 },
{ "msp430fr5922",2,8 },
{ "msp430fr59221",2,8 },
{ "msp430fr5947",2,8 },
@@ -1212,6 +1210,7 @@ msp430_mcu_data [] =
{ "msp430fr59891",2,8 },
{ "msp430fr5992",2,8 },
{ "msp430fr5994",2,8 },
{ "msp430fr59941",2,8 },
{ "msp430fr5xx_6xxgeneric",2,8 },
{ "msp430fr6820",2,8 },
{ "msp430fr6822",2,8 },

20
gas/configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for gas 2.27.51.
# Generated by GNU Autoconf 2.64 for gas 2.28.51.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gas'
PACKAGE_TARNAME='gas'
PACKAGE_VERSION='2.27.51'
PACKAGE_STRING='gas 2.27.51'
PACKAGE_VERSION='2.28.51'
PACKAGE_STRING='gas 2.28.51'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1330,7 +1330,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures gas 2.27.51 to adapt to many kinds of systems.
\`configure' configures gas 2.28.51 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1401,7 +1401,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of gas 2.27.51:";;
short | recursive ) echo "Configuration of gas 2.28.51:";;
esac
cat <<\_ACEOF
@@ -1523,7 +1523,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
gas configure 2.27.51
gas configure 2.28.51
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1933,7 +1933,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gas $as_me 2.27.51, which was
It was created by gas $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -3742,7 +3742,7 @@ fi
# Define the identity of the package.
PACKAGE='gas'
VERSION='2.27.51'
VERSION='2.28.51'
cat >>confdefs.h <<_ACEOF
@@ -15212,7 +15212,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by gas $as_me 2.27.51, which was
This file was extended by gas $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15276,7 +15276,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
gas config.status 2.27.51
gas config.status 2.28.51
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

3
gdb/doc/gdb.texinfo Normal file → Executable file
View File

@@ -15228,6 +15228,9 @@ The access component operator. Normally used to access elements in derived
types. Also suitable for unions. As unions aren't part of regular Fortran,
this can only happen when accessing a register that uses a gdbarch-defined
union type.
@item ::
The scope operator. Normally used to access variables in modules or to set breakpoints
on subroutines nested in modules or in other subroutines (internal subroutines).
@end table
@node Fortran Defaults

View File

@@ -1425,6 +1425,10 @@ static void add_partial_module (struct partial_die_info *pdi, CORE_ADDR *lowpc,
static void add_partial_enumeration (struct partial_die_info *enum_pdi,
struct dwarf2_cu *cu);
static void add_partial_entry_point (struct partial_die_info *pdi,
CORE_ADDR *lowpc, CORE_ADDR *highpc,
int need_pc, struct dwarf2_cu *cu);
static void add_partial_subprogram (struct partial_die_info *pdi,
CORE_ADDR *lowpc, CORE_ADDR *highpc,
int need_pc, struct dwarf2_cu *cu);
@@ -6817,6 +6821,7 @@ partial_die_parent_scope (struct partial_die_info *pdi,
return NULL;
}
/* Internal (nested) subroutines in Fortran get a prefix. */
if (pdi->tag == DW_TAG_enumerator)
/* Enumerators should not get the name of the enumeration as a prefix. */
parent->scope = grandparent_scope;
@@ -6826,7 +6831,10 @@ partial_die_parent_scope (struct partial_die_info *pdi,
|| parent->tag == DW_TAG_class_type
|| parent->tag == DW_TAG_interface_type
|| parent->tag == DW_TAG_union_type
|| parent->tag == DW_TAG_enumeration_type)
|| parent->tag == DW_TAG_enumeration_type
|| (cu->language == language_fortran
&& parent->tag == DW_TAG_subprogram
&& pdi->tag == DW_TAG_subprogram))
{
if (grandparent_scope == NULL)
parent->scope = parent->name;
@@ -6911,9 +6919,30 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
switch (pdi->tag)
{
case DW_TAG_entry_point:
addr = gdbarch_adjust_dwarf2_addr (gdbarch, pdi->lowpc + baseaddr);
/* DW_TAG_entry_point provides an additional entry_point to an
existing sub_program. Therefore, we inherit the "external"
attribute from the sub_program to which the entry_point
belongs to. */
if (pdi->die_parent->is_external)
add_psymbol_to_list (actual_name, strlen (actual_name),
built_actual_name != NULL,
VAR_DOMAIN, LOC_BLOCK,
&objfile->global_psymbols,
addr, cu->language, objfile);
else
add_psymbol_to_list (actual_name, strlen (actual_name),
built_actual_name != NULL,
VAR_DOMAIN, LOC_BLOCK,
&objfile->static_psymbols,
addr, cu->language, objfile);
break;
case DW_TAG_subprogram:
addr = gdbarch_adjust_dwarf2_addr (gdbarch, pdi->lowpc + baseaddr);
if (pdi->is_external || cu->language == language_ada)
if (pdi->is_external
|| cu->language == language_ada
|| cu->language == language_fortran)
{
/* brobecker/2007-12-26: Normally, only "external" DIEs are part
of the global scope. But in Ada, we want to be able to access
@@ -7108,6 +7137,17 @@ add_partial_module (struct partial_die_info *pdi, CORE_ADDR *lowpc,
scan_partial_symbols (pdi->die_child, lowpc, highpc, set_addrmap, cu);
}
static void
add_partial_entry_point (struct partial_die_info *pdi,
CORE_ADDR *p_lowpc, CORE_ADDR *p_highpc,
int set_addrmap, struct dwarf2_cu *cu)
{
if (pdi->name == NULL)
complaint (&symfile_complaints, _("DW_TAG_entry_point have to have a name"));
else
add_partial_symbol (pdi, cu);
}
/* Read a partial die corresponding to a subprogram and create a partial
symbol for that subprogram. When the CU language allows it, this
routine also defines a partial symbol for each nested subprogram
@@ -7178,6 +7218,18 @@ add_partial_subprogram (struct partial_die_info *pdi,
pdi = pdi->die_sibling;
}
}
else if (cu->language == language_fortran)
{
pdi = pdi->die_child;
while (pdi != NULL)
{
if (pdi->tag == DW_TAG_entry_point)
add_partial_entry_point (pdi, lowpc, highpc, set_addrmap, cu);
else if (pdi->tag == DW_TAG_subprogram)
add_partial_subprogram (pdi, lowpc, highpc, set_addrmap, cu);
pdi = pdi->die_sibling;
}
}
}
/* Read a partial die corresponding to an enumeration type. */
@@ -8283,6 +8335,12 @@ process_die (struct die_info *die, struct dwarf2_cu *cu)
read_type_unit_scope (die, cu);
break;
case DW_TAG_subprogram:
/* Internal subprograms in Fortran get a prefix. */
if (cu->language == language_fortran
&& die->parent != NULL
&& die->parent->tag == DW_TAG_subprogram)
cu->processing_has_namespace_info = 1;
case DW_TAG_entry_point:
case DW_TAG_inlined_subroutine:
read_func_scope (die, cu);
break;
@@ -12063,6 +12121,27 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
CORE_ADDR high = 0;
enum pc_bounds_kind ret;
if (die->tag == DW_TAG_entry_point)
{
/* Entry_point is embedded in an subprogram. Therefore, we can use
the highpc from it's enveloping subprogram and get the
lowpc from DWARF. */
if (PC_BOUNDS_INVALID == dwarf2_get_pc_bounds (die->parent, lowpc, highpc, cu, pst))
return PC_BOUNDS_INVALID;
attr = dwarf2_attr (die, DW_AT_low_pc, cu);
if (!attr)
{
complaint (&symfile_complaints,
_("DW_TAG_entry_point is missing DW_AT_low_pc"));
return PC_BOUNDS_INVALID;
}
low = attr_value_as_address (attr);
*lowpc = low;
return PC_BOUNDS_HIGH_LOW;
}
attr_high = dwarf2_attr (die, DW_AT_high_pc, cu);
if (attr_high)
{
@@ -15632,6 +15711,7 @@ load_partial_dies (const struct die_reader_specs *reader,
&& abbrev->tag != DW_TAG_constant
&& abbrev->tag != DW_TAG_enumerator
&& abbrev->tag != DW_TAG_subprogram
&& abbrev->tag != DW_TAG_entry_point
&& abbrev->tag != DW_TAG_lexical_block
&& abbrev->tag != DW_TAG_variable
&& abbrev->tag != DW_TAG_namespace
@@ -15758,6 +15838,7 @@ load_partial_dies (const struct die_reader_specs *reader,
if (load_all
|| abbrev->tag == DW_TAG_constant
|| abbrev->tag == DW_TAG_subprogram
|| abbrev->tag == DW_TAG_entry_point
|| abbrev->tag == DW_TAG_variable
|| abbrev->tag == DW_TAG_namespace
|| part_die->is_declaration)
@@ -15799,7 +15880,9 @@ load_partial_dies (const struct die_reader_specs *reader,
|| last_die->tag == DW_TAG_union_type))
|| (cu->language == language_ada
&& (last_die->tag == DW_TAG_subprogram
|| last_die->tag == DW_TAG_lexical_block))))
|| last_die->tag == DW_TAG_lexical_block))
|| (cu->language == language_fortran
&& last_die->tag == DW_TAG_subprogram)))
{
nesting_level++;
parent_die = last_die;
@@ -18440,13 +18523,28 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
SYMBOL_ACLASS_INDEX (sym) = LOC_LABEL;
add_symbol_to_list (sym, cu->list_in_scope);
break;
case DW_TAG_entry_point:
/* SYMBOL_BLOCK_VALUE (sym) will be filled in later by
finish_block. */
SYMBOL_ACLASS_INDEX (sym) = LOC_BLOCK;
/* DW_TAG_entry_point provides an additional entry_point to an
existing sub_program. Therefore, we inherit the "external"
attribute from the sub_program to which the entry_point
belongs to. */
attr2 = dwarf2_attr (die->parent, DW_AT_external, cu);
if (attr2 && (DW_UNSND (attr2) != 0))
list_to_add = &global_symbols;
else
list_to_add = cu->list_in_scope;
break;
case DW_TAG_subprogram:
/* SYMBOL_BLOCK_VALUE (sym) will be filled in later by
finish_block. */
SYMBOL_ACLASS_INDEX (sym) = LOC_BLOCK;
attr2 = dwarf2_attr (die, DW_AT_external, cu);
if ((attr2 && (DW_UNSND (attr2) != 0))
|| cu->language == language_ada)
|| cu->language == language_ada
|| cu->language == language_fortran)
{
/* Subprograms marked external are stored as a global symbol.
Ada subprograms, whether marked external or not, are always
@@ -19124,6 +19222,7 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu)
case DW_TAG_enumeration_type:
this_type = read_enumeration_type (die, cu);
break;
case DW_TAG_entry_point:
case DW_TAG_subprogram:
case DW_TAG_subroutine_type:
case DW_TAG_inlined_subroutine:
@@ -19450,6 +19549,19 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
return TYPE_TAG_NAME (parent_type);
return "";
}
case DW_TAG_subprogram:
/* Only internal subroutines in Fortran get a prefix with the name
of the parent's subroutine. */
if (cu->language == language_fortran)
{
if ((die->tag == DW_TAG_subprogram)
&& (dwarf2_name (parent, cu) != NULL))
return dwarf2_name (parent, cu);
else
return "";
}
else
return determine_prefix (parent, cu);
/* Fall through. */
default:
return determine_prefix (parent, cu);

View File

@@ -0,0 +1,70 @@
# Copyright 2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if { [skip_fortran_tests] } { return -1 }
standard_testfile .f90
load_lib "fortran.exp"
if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
return -1
}
if ![runto MAIN__] then {
perror "couldn't run to breakpoint MAIN__"
continue
}
# Test if we can set a breakpoint via entry-point name
set ept_name "foo"
gdb_breakpoint $ept_name
gdb_test "continue" \
[multi_line "Breakpoint $decimal, $ept_name \\(j=1, k=2, l=3, i1=4\\) at .*" \
".*"] \
"continue to breakpoint: $ept_name"
gdb_test "print j" "= 1" "print j, entered via $ept_name"
gdb_test "print k" "= 2" "print k, entered via $ept_name"
gdb_test "print l" "= 3" "print l, entered via $ept_name"
gdb_test "print i1" "= 4" "print i1, entered via $ept_name"
gdb_test "info args" \
[multi_line "j = 1" \
"k = 2" \
"l = 3" \
"i1 = 4"] \
"info args, entered via $ept_name"
# Test if we can set a breakpoint via function name
set ept_name "bar"
gdb_breakpoint $ept_name
gdb_test "continue" \
[multi_line "Breakpoint $decimal, $ept_name \\(i=4, j=5, k=6, i1=7\\) at .*" \
".*"] \
"continue to breakpoint: $ept_name"
gdb_test "print i" "= 4" "print i, entered via $ept_name"
gdb_test "print j" "= 5" "print j, entered via $ept_name"
gdb_test "print k" "= 6" "print k, entered via $ept_name"
gdb_test "print i1" "= 7" "print i1, entered via $ept_name"
set ept_name "tim"
gdb_breakpoint $ept_name
gdb_test "continue" \
[multi_line "Breakpoint $decimal, $ept_name \\(j=1\\) at .*" \
".*"] \
"continue to breakpoint: $ept_name"
gdb_test "print j" "= 1" "print j, entered via $ept_name"
gdb_test "info args" "j = 1" "info args, entered via $ept_name"

View File

@@ -0,0 +1,48 @@
! Copyright 2016 Free Software Foundation, Inc.
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 3 of the License, or
! (at your option) any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program. If not, see <http://www.gnu.org/licenses/>.
program TestEntryPoint
call foo(1,2,3,4)
call bar(4,5,6,7)
call tim(1)
end program TestEntryPoint
subroutine bar(I,J,K,I1)
INTEGER I,J,K,L,I1
INTEGER A
REAL C
A = 0
C = 0.0
A = I + K + I1
goto 1000
entry foo(J,K,L,I1)
A = J + K + L + I1
200 C = J
goto 1000
entry tim(J)
goto 200
1000 A = C + 1
C = J * 1.5
return
end subroutine

View File

@@ -30,6 +30,10 @@ if ![runto MAIN__] then {
continue
}
# Test if we can set a breakpoint in a nested function
gdb_breakpoint "testnestedfuncs::sub_nested_outer"
gdb_continue_to_breakpoint "testnestedfuncs::sub_nested_outer" ".*local_int = 19"
# Test if we can access local and
# non-local variables defined one level up.
gdb_breakpoint [gdb_get_line_number "! BP_outer"]
@@ -39,10 +43,17 @@ gdb_test "set index = 42"
gdb_test "print index" "= 42" "print index at BP_outer, manipulated"
gdb_test "print local_int" "= 19" "print local_int in outer function"
# Non-local variable should be affected in one frame up as well.
gdb_test "up"
gdb_test "print index" "= 42" "print index at BP1, one frame up"
# Test if we can set a breakpoint in a nested function
gdb_breakpoint "testnestedfuncs::sub_nested_inner"
gdb_continue_to_breakpoint "testnestedfuncs::sub_nested_inner" ".*local_int = 17"
# Test if we can access local and
# non-local variables defined two level up.
gdb_breakpoint [gdb_get_line_number "! BP_inner"]
@@ -51,12 +62,29 @@ gdb_test "print index" "= 42" "print index at BP_inner"
gdb_test "print v_state%code" "= 61" "print v_state%code at BP_inner"
gdb_test "print local_int" "= 17" "print local_int in inner function"
# Test if local variable is still correct.
gdb_breakpoint [gdb_get_line_number "! BP_outer_2"]
gdb_continue_to_breakpoint "! BP_outer_2" ".*! BP_outer_2"
gdb_test "print local_int" "= 19" \
"print local_int in outer function, after sub_nested_inner"
# Test if we can set a breakpoint in public routine with the same name as the internal
gdb_breakpoint "sub_nested_outer"
gdb_continue_to_breakpoint "sub_nested_outer" ".*name = 'sub_nested_outer external'"
# Test if we can set a breakpoint in public routine with the same name as the internal
gdb_breakpoint "sub_with_sub_nested_outer::sub_nested_outer"
gdb_continue_to_breakpoint "sub_with_sub_nested_outer::sub_nested_outer" ".*local_int = 11"
# Test if we can set a breakpoint in public routine with the same name as the internal
gdb_breakpoint "mod1::sub_nested_outer"
gdb_continue_to_breakpoint "mod1::sub_nested_outer" ".*name = 'sub_nested_outer_mod1'"
# Sanity check in main.
gdb_breakpoint [gdb_get_line_number "! BP_main"]
gdb_continue_to_breakpoint "! BP_main" ".*! BP_main"

View File

@@ -13,8 +13,64 @@
! You should have received a copy of the GNU General Public License
! along with this program. If not, see <http://www.gnu.org/licenses/>.
program TestNestedFuncs
module mod1
integer :: var_i = 1
integer :: var_const
parameter (var_const = 20)
CONTAINS
SUBROUTINE sub_nested_outer
integer :: local_int
character (len=20) :: name
name = 'sub_nested_outer_mod1'
local_int = 11
END SUBROUTINE sub_nested_outer
end module mod1
! Public sub_nested_outer
SUBROUTINE sub_nested_outer
integer :: local_int
character (len=16) :: name
name = 'sub_nested_outer external'
local_int = 11
END SUBROUTINE sub_nested_outer
! Needed indirection to call public sub_nested_outer from main
SUBROUTINE sub_nested_outer_ind
character (len=20) :: name
name = 'sub_nested_outer_ind'
CALL sub_nested_outer
END SUBROUTINE sub_nested_outer_ind
! public routine with internal subroutine
SUBROUTINE sub_with_sub_nested_outer()
integer :: local_int
character (len=16) :: name
name = 'subroutine_with_int_sub'
local_int = 1
CALL sub_nested_outer ! Should call the internal fct
CONTAINS
SUBROUTINE sub_nested_outer
integer :: local_int
local_int = 11
END SUBROUTINE sub_nested_outer
END SUBROUTINE sub_with_sub_nested_outer
! Main
program TestNestedFuncs
USE mod1, sub_nested_outer_use_mod1 => sub_nested_outer
IMPLICIT NONE
TYPE :: t_State
@@ -22,10 +78,14 @@ program TestNestedFuncs
END TYPE t_State
TYPE (t_State) :: v_state
integer index
integer index, local_int
local_int = 14
index = 13
CALL sub_nested_outer
CALL sub_nested_outer ! Call internal sub_nested_outer
CALL sub_nested_outer_ind ! Call external sub_nested_outer via sub_nested_outer_ind
CALL sub_with_sub_nested_outer ! Call external routine with nested sub_nested_outer
CALL sub_nested_outer_use_mod1 ! Call sub_nested_outer imported via module
index = 11 ! BP_main
v_state%code = 27

View File

@@ -1,3 +1,7 @@
2016-12-23 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
2016-12-23 Tristan Gingold <gingold@adacore.com>
* po/gprof.pot: Regenerate.

20
gprof/configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for gprof 2.27.51.
# Generated by GNU Autoconf 2.64 for gprof 2.28.51.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gprof'
PACKAGE_TARNAME='gprof'
PACKAGE_VERSION='2.27.51'
PACKAGE_STRING='gprof 2.27.51'
PACKAGE_VERSION='2.28.51'
PACKAGE_STRING='gprof 2.28.51'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1302,7 +1302,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures gprof 2.27.51 to adapt to many kinds of systems.
\`configure' configures gprof 2.28.51 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1373,7 +1373,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of gprof 2.27.51:";;
short | recursive ) echo "Configuration of gprof 2.28.51:";;
esac
cat <<\_ACEOF
@@ -1479,7 +1479,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
gprof configure 2.27.51
gprof configure 2.28.51
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1844,7 +1844,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gprof $as_me 2.27.51, which was
It was created by gprof $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -3653,7 +3653,7 @@ fi
# Define the identity of the package.
PACKAGE='gprof'
VERSION='2.27.51'
VERSION='2.28.51'
cat >>confdefs.h <<_ACEOF
@@ -12787,7 +12787,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by gprof $as_me 2.27.51, which was
This file was extended by gprof $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12851,7 +12851,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
gprof config.status 2.27.51
gprof config.status 2.28.51
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@@ -1,3 +1,7 @@
2016-12-23 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
2016-12-23 Tristan Gingold <gingold@adacore.com>
* NEWS: Add marker for 2.28.

20
ld/configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for ld 2.27.51.
# Generated by GNU Autoconf 2.64 for ld 2.28.51.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ld'
PACKAGE_TARNAME='ld'
PACKAGE_VERSION='2.27.51'
PACKAGE_STRING='ld 2.27.51'
PACKAGE_VERSION='2.28.51'
PACKAGE_STRING='ld 2.28.51'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1354,7 +1354,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures ld 2.27.51 to adapt to many kinds of systems.
\`configure' configures ld 2.28.51 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1425,7 +1425,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ld 2.27.51:";;
short | recursive ) echo "Configuration of ld 2.28.51:";;
esac
cat <<\_ACEOF
@@ -1550,7 +1550,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ld configure 2.27.51
ld configure 2.28.51
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ld $as_me 2.27.51, which was
It was created by ld $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -4069,7 +4069,7 @@ fi
# Define the identity of the package.
PACKAGE='ld'
VERSION='2.27.51'
VERSION='2.28.51'
cat >>confdefs.h <<_ACEOF
@@ -17813,7 +17813,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ld $as_me 2.27.51, which was
This file was extended by ld $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17877,7 +17877,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
ld config.status 2.27.51
ld config.status 2.28.51
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@@ -1,3 +1,7 @@
2016-12-23 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
2016-12-23 Tristan Gingold <gingold@adacore.com>
* po/opcodes.pot: Regenerate.

20
opcodes/configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for opcodes 2.27.51.
# Generated by GNU Autoconf 2.64 for opcodes 2.28.51.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='opcodes'
PACKAGE_TARNAME='opcodes'
PACKAGE_VERSION='2.27.51'
PACKAGE_STRING='opcodes 2.27.51'
PACKAGE_VERSION='2.28.51'
PACKAGE_STRING='opcodes 2.28.51'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1322,7 +1322,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures opcodes 2.27.51 to adapt to many kinds of systems.
\`configure' configures opcodes 2.28.51 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1393,7 +1393,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of opcodes 2.27.51:";;
short | recursive ) echo "Configuration of opcodes 2.28.51:";;
esac
cat <<\_ACEOF
@@ -1500,7 +1500,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
opcodes configure 2.27.51
opcodes configure 2.28.51
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1910,7 +1910,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by opcodes $as_me 2.27.51, which was
It was created by opcodes $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -3719,7 +3719,7 @@ fi
# Define the identity of the package.
PACKAGE='opcodes'
VERSION='2.27.51'
VERSION='2.28.51'
cat >>confdefs.h <<_ACEOF
@@ -13305,7 +13305,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by opcodes $as_me 2.27.51, which was
This file was extended by opcodes $as_me 2.28.51, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13369,7 +13369,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
opcodes config.status 2.27.51
opcodes config.status 2.28.51
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"