+2011-01-06 Joel Brobecker <brobecker@adacore.com>
+
+ Add marker to be used as anchor for inserting breakpoints.
+ * gdb.ada/null_record/null_record.adb: Add "-- START" comment.
+ * gdb.ada/start/dummy.adb, gdb.ada/uninitialized_vars/parse.adb:
+ Likewise.
+
+ Remove uses of gdb_start_cmd.
+ * gdb.ada/null_record.exp: Remove use of gdb_start_cmd.
+ * gdb.ada/print_pc.exp, gdb.ada/uninitialized_vars.exp: Ditto.
+
+ Do not run testcase if testing with GDBserver.
+ * gdb.ada/exec_changed.exp, gdb.ada/start.exp: Abort as untested
+ if testing with GDBserver.
+
2011-01-06 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/complete/foo.adb, gdb.ada/complete/pck.adb,
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 exec_changed.exp
+ return
+}
+
set testdir "exec_changed"
file mkdir ${objdir}/${subdir}/${testdir}
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-if { [gdb_start_cmd] < 0 } {
- untested start
- return -1
-}
-
-gdb_test "" \
- "null_record \\(\\) at .*null_record.adb.*" \
- "start"
+set bp_location [gdb_get_line_number "START" ${testdir}/null_record.adb]
+runto "null_record.adb:$bp_location"
gdb_test "ptype empty" \
"type = record null; end record" \
procedure Null_Record is
E : Void_Star := new Empty;
begin
- Do_Nothing (E);
+ Do_Nothing (E); -- START
end Null_Record;
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-if { [gdb_start_cmd] < 0 } {
- untested start
- return -1
-}
-
-gdb_test "" \
- "dummy \\(\\) at .*dummy.adb:.*" \
- "start inferior"
+set bp_location [gdb_get_line_number "START" ${testdir}/dummy.adb]
+runto "dummy.adb:$bp_location"
gdb_test "p /x \$pc" \
"= 0x\[0-9a-zA-Z\]+" \
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 exec_changed.exp
+ return
+}
+
set testdir "start"
set testfile "${testdir}/dummy"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
procedure Dummy is
begin
- null;
+ null; -- START
end Dummy;
# Start the program; we should land in the program main procedure, before
# variable initialization.
-if { [gdb_start_cmd] < 0 } {
- untested start
- return -1
-}
-
-gdb_test "" \
- "parse \\(\\) at .*parse.adb.*" \
- "start"
+set bp_location [gdb_get_line_number "START" ${testdir}/parse.adb]
+runto "parse.adb:$bp_location"
# Check that printing uninitialized variables does not crash the debugger.
gdb_test "info locals" \
with Parse_Controlled;
-procedure Parse is
+procedure Parse is -- START
A : aliased Integer := 1;