aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/ax-ada/prog.adb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-12-21 11:52:37 -0700
committerTom Tromey <tromey@adacore.com>2023-02-27 08:09:02 -0700
commit013a623f4cb70060556cf302f4ae54d5f96e66e1 (patch)
tree1ece7263df373e35700ee0aa30c1f91d34b4c622 /gdb/testsuite/gdb.ada/ax-ada/prog.adb
parentd11280feed53fa1faa2c543fb04344ae312143b2 (diff)
downloadbinutils-013a623f4cb70060556cf302f4ae54d5f96e66e1.zip
binutils-013a623f4cb70060556cf302f4ae54d5f96e66e1.tar.gz
binutils-013a623f4cb70060556cf302f4ae54d5f96e66e1.tar.bz2
Implement some agent expressions for Ada
Ada historically has not implemented agent expressions, and some Ada constructs probably cannot reasonably be converted to agent expressions. However, a subset of simple operations can be, and this patch represents a first step in that direction. On one internal AdaCore test case, this improves the performance of a conditional breakpoint from 5 minutes to 5 seconds. The main tricky part in this patch is ensuring the converted expressions detect the cases that will not work. This is done by examining the code in the corresponding evaluation methods.
Diffstat (limited to 'gdb/testsuite/gdb.ada/ax-ada/prog.adb')
-rw-r--r--gdb/testsuite/gdb.ada/ax-ada/prog.adb20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.ada/ax-ada/prog.adb b/gdb/testsuite/gdb.ada/ax-ada/prog.adb
new file mode 100644
index 0000000..3852711
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/ax-ada/prog.adb
@@ -0,0 +1,20 @@
+-- Copyright 2023 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/>.
+
+procedure Prog is
+ Variable : Integer := 23;
+begin
+ null; -- START
+end Prog;