diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d9f1f83f67..1191b95009 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2011-12-06 Joel Brobecker + + * gdb.ada/watch_arg/pck.ads, gdb.ada/watch_arg/pck.adb: New files. + * gdb.ada/watch_arg/watch.adb: Adjust code to avoid modification + of parameter X in procedure Foo. + 2011-12-05 Stan Shebs * gdb.trace/tfind.exp: Update help string matches. diff --git a/gdb/testsuite/gdb.ada/watch_arg/pck.adb b/gdb/testsuite/gdb.ada/watch_arg/pck.adb new file mode 100644 index 0000000000..a9c836bb19 --- /dev/null +++ b/gdb/testsuite/gdb.ada/watch_arg/pck.adb @@ -0,0 +1,23 @@ +-- Copyright 2011 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 . + +package body Pck is + + procedure Do_Nothing (A : System.Address) is + begin + null; + end Do_Nothing; + +end Pck; diff --git a/gdb/testsuite/gdb.ada/watch_arg/pck.ads b/gdb/testsuite/gdb.ada/watch_arg/pck.ads new file mode 100644 index 0000000000..f8a4ed52ea --- /dev/null +++ b/gdb/testsuite/gdb.ada/watch_arg/pck.ads @@ -0,0 +1,19 @@ +-- Copyright 2011 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 . + +with System; +package Pck is + procedure Do_Nothing (A : System.Address); +end Pck; diff --git a/gdb/testsuite/gdb.ada/watch_arg/watch.adb b/gdb/testsuite/gdb.ada/watch_arg/watch.adb index d10e63d484..d5e2c333ea 100644 --- a/gdb/testsuite/gdb.ada/watch_arg/watch.adb +++ b/gdb/testsuite/gdb.ada/watch_arg/watch.adb @@ -14,11 +14,14 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . +with Pck; use Pck; + procedure Watch is procedure Foo (X : in out Integer) is begin - X := 3; -- BREAK1 + -- Reference X in a way that does not change its value. + Do_Nothing (X'Address); -- BREAK1 end Foo; X : Integer := 1;