From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH 3/4] Use TYPE_TARGET_TYPE.
Date: Thu, 22 Nov 2012 07:33:00 -0000 [thread overview]
Message-ID: <1353569539-744-4-git-send-email-yao@codesourcery.com> (raw)
In-Reply-To: <1353569539-744-1-git-send-email-yao@codesourcery.com>
For TYPE_CODE_METHODPTR, we should use TYPE_TARGET_TYPE to get the
type of function. This patch fixes this fail
FAIL: gdb.cp/member-ptr.exp: ptype (a.*pmf)(3)
gdb:
2012-11-22 Daniel Jacobowitz <dan@codesourcery.com>
* eval.c (evaluate_subexp_standard): Use TYPE_TARGET_TYPE.
---
gdb/eval.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/eval.c b/gdb/eval.c
index 9957d02..82ea81b 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1391,7 +1391,7 @@ evaluate_subexp_standard (struct type *expect_type,
if (TYPE_CODE (type) == TYPE_CODE_METHODPTR)
{
if (noside == EVAL_AVOID_SIDE_EFFECTS)
- arg1 = value_zero (type, not_lval);
+ arg1 = value_zero (TYPE_TARGET_TYPE (type), not_lval);
else
arg1 = cplus_method_ptr_to_value (&arg2, arg1);
--
1.7.7.6
next prev parent reply other threads:[~2012-11-22 7:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 7:32 [PATCH 0/4] Fix member pointer bugs Yao Qi
2012-11-22 7:32 ` [PATCH 1/4] testcase - pointer to member function Yao Qi
2012-11-26 16:32 ` Tom Tromey
2012-11-22 7:33 ` [PATCH 2/4] factor code Yao Qi
2012-11-22 7:33 ` [PATCH 4/4] Handle TYPE_CODE_MEMBERPTR Yao Qi
2012-11-22 8:07 ` Yao Qi
2012-11-26 16:42 ` Tom Tromey
2012-11-22 7:33 ` Yao Qi [this message]
2012-11-26 16:41 ` [PATCH 3/4] Use TYPE_TARGET_TYPE Tom Tromey
2012-11-27 8:03 ` [committed]: [PATCH 0/4] Fix member pointer bugs Yao Qi
2012-11-28 14:47 ` Tom Tromey
2012-11-28 15:14 ` Yao Qi
2012-11-28 16:37 ` Tom Tromey
2012-11-29 7:46 ` Yao Qi
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=1353569539-744-4-git-send-email-yao@codesourcery.com \
--to=yao@codesourcery.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