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

Unified Diff: gdb/testsuite/gdb.base/enum_cond.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.base/enum_cond.c ('k') | gdb/testsuite/gdb.base/enumval.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/enum_cond.exp
diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/enum_cond.exp
similarity index 53%
copy from gdb/testsuite/gdb.base/arrayidx.exp
copy to gdb/testsuite/gdb.base/enum_cond.exp
index ed8e17a5379ab646ee1912f1f78bb070556dada0..5c041d94bc8c514881901e577e9ed311af7588ce 100644
--- a/gdb/testsuite/gdb.base/arrayidx.exp
+++ b/gdb/testsuite/gdb.base/enum_cond.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
@@ -17,44 +17,28 @@
# gdb can correctly print arrays with indexes for each element of the
# array.
-if $tracelevel {
- strace $tracelevel
-}
-
-set testfile "arrayidx"
+set testfile "enum_cond"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "Couldn't compile ${srcfile}"
+
+set opts [list debug additional_flags=-fshort-enums]
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
+ untested "Could not compile ${srcfile}"
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart $testfile
if ![runto_main] then {
- perror "couldn't run to breakpoint"
+ perror "could not run to main"
continue
}
-# First, print the array without the indexes
-
-gdb_test_no_output "set print array-indexes off" \
- "Set print array-indexes to off"
-
-gdb_test "print array" \
- "\\{1, 2, 3, 4\\}" \
- "Print array with array-indexes off"
-
-# Second, print the same array with the indexes
-
-gdb_test_no_output "set print array-indexes on" \
- "Set print array-indexes to on"
-
-gdb_test "print array" \
- "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
- "Print array with array-indexes on"
+gdb_test "break call_me if param.e == 1" \
+ "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal\\."
+# Continue. We should hit our breakpoint...
+gdb_test "continue" \
+ "Breakpoint $decimal, call_me \\(param=\\.\\.\\.\\) at .*" \
+ "continue to conditional breakpoint in call_me"
« no previous file with comments | « gdb/testsuite/gdb.base/enum_cond.c ('k') | gdb/testsuite/gdb.base/enumval.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698