From: Hui Zhu <hui_zhu@mentor.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Subject: [PATCH] Fix ptype.exp fail in MIPS
Date: Tue, 13 May 2014 04:10:00 -0000 [thread overview]
Message-ID: <53719B17.5000208@mentor.com> (raw)
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"
+ }
}
next reply other threads:[~2014-05-13 4:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 4:10 Hui Zhu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53719B17.5000208@mentor.com \
--to=hui_zhu@mentor.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox