Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Unified Diff: gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.ada/ref_tick_size.exp ('k') | gdb/testsuite/gdb.ada/set_pckd_arr_elt/foo.adb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
similarity index 59%
copy from gdb/testsuite/gdb.ada/start.exp
copy to gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
index c36db3f02eab6ad3c33d9f733c7fda08cd8ed9f2..7f6f1d3ad95a8143f5f2cdf064f53dd97bcdf88e 100644
--- a/gdb/testsuite/gdb.ada/start.exp
+++ b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
@@ -1,4 +1,4 @@
-# Copyright 2005, 2007-2012 Free Software Foundation, Inc.
+# Copyright 2012 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
@@ -13,23 +13,12 @@
# 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 $tracelevel then {
- strace $tracelevel
-}
-
load_lib "ada.exp"
if { [skip_ada_tests] } { return -1 }
-# This testcase verifies the behavior of the `start' command, which
-# does not work when we use the gdb stub...
-if [target_info exists use_gdb_stub] {
- untested start.exp
- return
-}
-
-set testdir "start"
-set testfile "${testdir}/dummy"
+set testdir "set_pckd_arr_elt"
+set testfile "${testdir}/foo"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
@@ -40,12 +29,19 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
clean_restart ${testfile}
-# Verify that "start" lands inside the right procedure.
-if { [gdb_start_cmd] < 0 } {
- untested start
- return -1
-}
+set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
+runto "foo.adb:$bp_location"
+
+gdb_test "print sa(3) := 9" " = 9"
+
+# To verify that the assignment was made correctly, we use the fact
+# that the program passes this very same element as an argument to
+# one of the functions. So we insert a breakpoint on that function,
+# and verify that the argument value is correct.
+
+gdb_breakpoint "update_small"
+
+gdb_test "continue" \
+ "Breakpoint .*, pck\\.update_small \\(s=9\\) at .*pck.adb:.*" \
+ "continue to update_small"
-gdb_test "" \
- "dummy \\(\\) at .*dummy.adb.*" \
- "start"
« no previous file with comments | « gdb/testsuite/gdb.ada/ref_tick_size.exp ('k') | gdb/testsuite/gdb.ada/set_pckd_arr_elt/foo.adb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698