This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix ptype.exp fail in MIPS
- From: Hui Zhu <hui_zhu at mentor dot com>
- To: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Tue, 13 May 2014 12:09:59 +0800
- Subject: [PATCH] Fix ptype.exp fail in MIPS
- Authentication-results: sourceware.org; auth=none
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"
+ }
}