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

Unified Diff: gdb/testsuite/gdb.python/py-type.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.python/py-template.exp ('k') | gdb/testsuite/gdb.python/py-value.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.python/py-type.exp
diff --git a/gdb/testsuite/gdb.python/py-type.exp b/gdb/testsuite/gdb.python/py-type.exp
index 66782b126d94bc2ee15c019c6bf5a862f23171e0..98a055e06ebb0504c8086cfd85115e14009ba0ce 100644
--- a/gdb/testsuite/gdb.python/py-type.exp
+++ b/gdb/testsuite/gdb.python/py-type.exp
@@ -16,17 +16,11 @@
# This file is part of the GDB testsuite. It tests the mechanism
# of exposing types to Python.
-if $tracelevel then {
- strace $tracelevel
-}
-
load_lib gdb-python.exp
-set testfile "py-type"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
-if [get_compiler_info not-used c++] {
+if [get_compiler_info c++] {
return -1;
}
@@ -90,6 +84,11 @@ proc test_fields {lang} {
gdb_test "python print fields\[0\].name" "a" "Check structure field a name"
gdb_test "python print fields\[1\].name" "b" "Check structure field b name"
+ # Regression test for
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=12070.
+ gdb_test "python print 'type' in dir(fields\[0\])" "True" \
+ "Check that dir includes name"
+
# Test Python mapping behavior of gdb.Type for structs/classes
gdb_test "python print len(st.type)" "2" "Check number of fields"
gdb_test "python print st.type\['a'\].name" "a" "Check fields lookup by name"
@@ -135,8 +134,8 @@ proc test_enums {} {
gdb_test "python print len(e.type)" "3" "Check the number of enum fields"
gdb_test "python print e.type\['v1'\].name" "v1" "Check enum field lookup by name"
gdb_test "python print e.type\['v3'\].name" "v3" "Check enum field lookup by name"
- gdb_test "python print \[v.bitpos for v in e.type.itervalues()\]" {\[0L, 1L, 2L\]} "Check num fields iteration over values"
- gdb_test "python print \[(n, v.bitpos) for (n, v) in e.type.items()\]" {\[\('v1', 0L\), \('v2', 1L\), \('v3', 2L\)\]} "Check enum fields items list"
+ gdb_test "python print \[v.enumval for v in e.type.itervalues()\]" {\[0L, 1L, 2L\]} "Check num fields iteration over values"
+ gdb_test "python print \[(n, v.enumval) for (n, v) in e.type.items()\]" {\[\('v1', 0L\), \('v2', 1L\), \('v3', 2L\)\]} "Check enum fields items list"
}
proc test_base_class {} {
gdb_py_test_silent_cmd "print d" "print value" 1
@@ -193,7 +192,10 @@ proc test_template {} {
gdb_test "python print isinstance(ttype.template_argument(1), gdb.Value)" \
"True"
- setup_kfail "gcc/41736" *-*-*
+ if {[test_compiler_info {gcc-[0-3]-*}]
+ || [test_compiler_info {gcc-4-[0-5]-*}]} {
+ setup_xfail "gcc/46955" *-*-*
+ }
gdb_test "python print ttype.template_argument(2)" "&C::c"
}
« no previous file with comments | « gdb/testsuite/gdb.python/py-template.exp ('k') | gdb/testsuite/gdb.python/py-value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698