diff options
author | Pedro Alves <pedro@codesourcery.com> | 2010-02-11 18:24:57 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2010-02-11 18:24:57 +0000 |
commit | 29358440d19f9907e482575b6a2bb8b8733d0ebd (patch) | |
tree | e6a1c5f64e9798850b112fa007a7e136ba0ff3b1 /gdb/ax-gdb.c | |
parent | 12fb15aa6a46cb01ac0c70dd7b9cc3f1094d9428 (diff) | |
download | gdb-29358440d19f9907e482575b6a2bb8b8733d0ebd.tar.gz |
* ax-gdb.c (gen_deref): Don't allow dereferencing void pointers.
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r-- | gdb/ax-gdb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index 5776bb0ce6d..eb532384ca6 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -1082,6 +1082,8 @@ gen_deref (struct agent_expr *ax, struct axs_value *value) T" to "T", and mark the value as an lvalue in memory. Leave it to the consumer to actually dereference it. */ value->type = check_typedef (TYPE_TARGET_TYPE (value->type)); + if (TYPE_CODE (value->type) == TYPE_CODE_VOID) + error (_("Attempt to dereference a generic pointer.")); value->kind = ((TYPE_CODE (value->type) == TYPE_CODE_FUNC) ? axs_rvalue : axs_lvalue_memory); } |