summaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-03-21 00:46:16 +0000
committerTom Tromey <tromey@redhat.com>2009-03-21 00:46:16 +0000
commitb4494ffc89755afd15f3dda0b71b82244aa5ea2f (patch)
tree9c5f633b76daae88b828311019d15b4ab5b61756 /gdb/c-lang.c
parent095e9826734cc7660ab9f444e72a517736272902 (diff)
downloadgdb-b4494ffc89755afd15f3dda0b71b82244aa5ea2f.tar.gz
* c-lang.c (evaluate_subexp_c): Call check_typedef.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r--gdb/c-lang.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index deab3f4fa0b..0c9e4f8059e 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -917,6 +917,10 @@ evaluate_subexp_c (struct type *expect_type, struct expression *exp,
default:
internal_error (__FILE__, __LINE__, "unhandled c_string_type");
}
+
+ /* Ensure TYPE_LENGTH is valid for TYPE. */
+ check_typedef (type);
+
dest_charset = charset_for_string_type (dest_type);
++*pos;