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

Unified Diff: gdb/testsuite/gdb.arch/i386-sse-stack-align.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.arch/i386-sse-stack-align.c ('k') | gdb/testsuite/gdb.arch/i386-unwind.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
similarity index 50%
copy from gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
copy to gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
index 72a075c86e4d3125f2adfc6f9e2edde4e4623f1a..5a04c7484dbb7b7eb25fe79c079ffafc99530930 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
+++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
@@ -1,4 +1,4 @@
-# Copyright 2011-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
@@ -12,36 +12,49 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-load_lib dwarf.exp
-# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
+if ![is_x86_like_target] {
+ verbose "Skipping x86 SSE stack alignment tests."
+ return
}
-set testfile "dw2-simple-locdesc"
+set testfile "i386-sse-stack-align"
set srcfile ${testfile}.S
-set executable ${testfile}.x
+set csrcfile ${testfile}.c
+set executable ${testfile}
set binfile ${objdir}/${subdir}/${executable}
+set opts {}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
+if [info exists COMPILE] {
+ set srcfile ${csrcfile}
+ lappend opts debug optimize=-O2 additional_flags=-msse
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
+ unsupported "cannot compile ${srcfile}"
return -1
}
clean_restart $executable
-# Re: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF
-# http://sourceware.org/ml/gdb-patches/2011-07/msg00766.html
-set test "p &s.shl"
-gdb_test_multiple $test $test {
- -re " = \\(int \\*\\) 0x1000000\r\n$gdb_prompt $" {
- pass $test
+if ![runto_main] then {
+ return -1
+}
+
+set args ""
+foreach i {0 1 2 3 4} {
+ set test "print g$i ($args)"
+ gdb_test_multiple $test $test {
+ -re " = 2\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "Program received signal SIGSEGV, Segmentation fault\\..*\r\n$gdb_prompt $" {
+ fail $test
+ }
}
- -re " = \\(int \\*\\) 0x14\r\n$gdb_prompt $" {
- kfail "symtab/13307" $test
+
+ if {$args != ""} {
+ set args "$args, "
}
+ set args "$args[expr $i + 1]"
}
-
-# Re: RFC: fix DW_AT_data_member_location buglet
-# http://sourceware.org/ml/gdb-patches/2011-05/msg00291.html
-gdb_test "p &s.data4" { = \(int \*\) 0x10000}
« no previous file with comments | « gdb/testsuite/gdb.arch/i386-sse-stack-align.c ('k') | gdb/testsuite/gdb.arch/i386-unwind.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698