public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix ptype.exp fail in MIPS
@ 2014-05-13  4:10 Hui Zhu
  2014-05-15 17:26 ` Tom Tromey
  2014-05-15 17:53 ` Pedro Alves
  0 siblings, 2 replies; 9+ messages in thread
From: Hui Zhu @ 2014-05-13  4:10 UTC (permalink / raw)
  To: gdb-patches ml

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"
+  }
  }

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-05-27 21:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13  4:10 [PATCH] Fix ptype.exp fail in MIPS Hui Zhu
2014-05-15 17:26 ` Tom Tromey
2014-05-15 17:53 ` Pedro Alves
2014-05-16  7:41   ` Hui Zhu
2014-05-19 14:51     ` Doug Evans
2014-05-27  8:53       ` Hui Zhu
2014-05-27 18:25       ` Pedro Alves
2014-05-27 18:15     ` Pedro Alves
2014-05-27 21:52       ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).