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

Unified Diff: gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.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.dwarf2/dw2-icc-opaque.S ('k') | gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
similarity index 52%
copy from gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
copy to gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
index 72a075c86e4d3125f2adfc6f9e2edde4e4623f1a..fe7d7e8e8c85e5f0d79b84805ceeff523c9e4228 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
@@ -1,5 +1,5 @@
-# Copyright 2011-2012 Free Software Foundation, Inc.
-#
+# Copyright (C) 2011-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
# the Free Software Foundation; either version 3 of the License, or
@@ -14,15 +14,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
load_lib dwarf.exp
+# Test that we can correctly resolve opaque structures compiled by the Intel
+# compiler, which does not set DW_AT_declaration on opaque structure types.
+# This is GDB PR symtab/13277.
+
# This test can only be run on targets which support DWARF-2 and use gas.
if {![dwarf2_support]} {
- return 0
+ return 0
}
-set testfile "dw2-simple-locdesc"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
return -1
@@ -30,18 +32,14 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != ""
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
- }
- -re " = \\(int \\*\\) 0x14\r\n$gdb_prompt $" {
- kfail "symtab/13307" $test
- }
+# Before PR 13277 was fixed, this would output:
+# type = struct opaque_struct_t {
+# <no data fields>
+# } *
+if { [istarget s390x-*-*] && [is_lp64_target] } {
+ # The hand-coded DWARF info hard-codes a pointer size of 4 bytes,
+ # which is represented as @mode32 on s390x.
+ gdb_test "ptype p_struct" "type = struct opaque_struct_t {\r\n *int wrapped_value;\r\n} \\* @mode32"
+} else {
+ gdb_test "ptype p_struct" "type = struct opaque_struct_t {\r\n *int wrapped_value;\r\n} \\*"
}
-
-# 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.dwarf2/dw2-icc-opaque.S ('k') | gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698