This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix ptype.exp fail in MIPS


ptype $pc
type = int32_t
(gdb) FAIL: gdb.base/ptype.exp: ptype $pc
This is because the $pc register in MIPS is set to int but not code_ptr.
And according to the discussion in
https://sourceware.org/ml/gdb/2013-06/msg00020.html, the type cannot be
changed.
So I make a patch for ptype.exp.

Thanks,
Hui

2014-05-13  Hui Zhu  <hui@codesourcery.com>

	* gdb.base/ptype.exp: Add special "ptype $pc" test for MIPS.

Index: gdb-trunk/gdb/testsuite/gdb.base/ptype.exp
===================================================================
--- gdb-trunk.orig/gdb/testsuite/gdb.base/ptype.exp 2014-05-12 19:55:30.759020736 -0700 +++ gdb-trunk/gdb/testsuite/gdb.base/ptype.exp 2014-05-12 20:42:18.057516141 -0700
@@ -631,5 +631,9 @@
   set timeout $prev_timeout

   # Test ptype of user register
-  gdb_test "ptype \$pc" "void \\(\\*\\)\\(\\)" "ptype \$pc"
+  if { ![istarget "mips*-*-*"] } then {
+    gdb_test "ptype \$pc" "void \\(\\*\\)\\(\\)" "ptype \$pc"
+  } else {
+    gdb_test "ptype \$pc" "int.*|long.*" "ptype \$pc"
+  }
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]