aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2012-11-29 07:55:10 +0000
committerYao Qi <yao@codesourcery.com>2012-11-29 07:55:10 +0000
commitf56825018b528a7051cb2527b4be934c0306a5ef (patch)
tree7673aee1e6861962f7839bd790868913212797a0
parent891df0eae7494721e35789299303d78ed6a8ae2b (diff)
downloadgdb-f56825018b528a7051cb2527b4be934c0306a5ef.zip
gdb-f56825018b528a7051cb2527b4be934c0306a5ef.tar.gz
gdb-f56825018b528a7051cb2527b4be934c0306a5ef.tar.bz2
gdb/
2012-11-29 Yao Qi <yao@codesourcery.com> Tom Tromey <tromey@redhat.com> * eval.c (evaluate_subexp_standard): Get the correct pointer type for TYPE_CODE_MEMBERPTR.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/eval.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1eb4c8f..ac85062 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2012-11-29 Yao Qi <yao@codesourcery.com>
+ Tom Tromey <tromey@redhat.com>
+
+ * eval.c (evaluate_subexp_standard): Get the correct pointer
+ type for TYPE_CODE_MEMBERPTR.
+
2012-11-28 Edjunior Machado <emachado@linux.vnet.ibm.com>
* rs6000-tdep.c (gdb_print_insn_powerpc): Remove info->mach checking,
diff --git a/gdb/eval.c b/gdb/eval.c
index 55582e0..7d48d7e 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1404,13 +1404,15 @@ evaluate_subexp_standard (struct type *expect_type,
{
struct type *type_ptr
= lookup_pointer_type (TYPE_DOMAIN_TYPE (type));
+ struct type *target_type_ptr
+ = lookup_pointer_type (TYPE_TARGET_TYPE (type));
/* Now, convert these values to an address. */
arg2 = value_cast (type_ptr, arg2);
mem_offset = value_as_long (arg1);
- arg1 = value_from_pointer (type_ptr,
+ arg1 = value_from_pointer (target_type_ptr,
value_as_long (arg2) + mem_offset);
arg1 = value_ind (arg1);
tem = 1;