+2019-07-30 Tom Tromey <tromey@adacore.com>
+
+ * block.c (contained_in): Remove BLOCK_FUNCTION check.
+
2019-07-30 Kevin Buettner <kevinb@redhat.com>
* printcmd.c (print_address_symbolic): Print negative offsets.
{
if (a == b)
return 1;
- /* If A is a function block, then A cannot be contained in B,
- except if A was inlined. */
- if (BLOCK_FUNCTION (a) != NULL && !block_inlined_p (a))
- return 0;
a = BLOCK_SUPERBLOCK (a);
}
while (a != NULL);
+2019-07-30 Tom Tromey <tromey@adacore.com>
+
+ * gdb.ada/display_nested.exp: New file.
+ * gdb.ada/display_nested/foo.adb: New file.
+ * gdb.ada/display_nested/pack.adb: New file.
+ * gdb.ada/display_nested/pack.ads: New file.
+
2019-07-30 Christian Biesinger <cbiesinger@google.com>
* gdb.python/py-symbol.c: Add a static variable and one in an anonymous
--- /dev/null
+# Copyright 2019 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/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile foo
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
+ return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
+runto "foo.adb:$bp_location"
+
+gdb_test "display s(I..I+5)" [string_to_regexp "1: s(I..I+5) = \"test s\""]
--- /dev/null
+-- Copyright 2019 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/>.
+
+with Pack; use Pack;
+
+procedure Foo is
+ S : String := "test string";
+ I : Natural := S'First;
+begin
+ declare
+ procedure Nested is
+ begin
+ Do_Nothing (S); -- BREAK
+ end Nested;
+ begin
+ Nested;
+ end;
+end Foo;
--- /dev/null
+-- Copyright 2019 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/>.
+
+package body Pack is
+
+ procedure Do_Nothing (S : String) is
+ begin
+ null;
+ end Do_Nothing;
+
+end Pack;
--- /dev/null
+-- Copyright 2019 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/>.
+
+package Pack is
+
+ procedure Do_Nothing (S : String);
+
+end Pack;