Skip to content
Snippets Groups Projects
Commit b1028c8e authored by Pedro Alves's avatar Pedro Alves
Browse files

* ax-gdb.c (gen_deref): Don't allow dereferencing void pointers.

parent 24981e7b
No related branches found
No related tags found
No related merge requests found
2010-02-11 Pedro Alves <pedro@codesourcery.com>
* ax-gdb.c (gen_deref): Don't allow dereferencing void pointers.
2010-02-11 Vladimir Prus <vladimir@codesourcery.com> 2010-02-11 Vladimir Prus <vladimir@codesourcery.com>
* mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Add extra * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Add extra
......
...@@ -1082,6 +1082,8 @@ gen_deref (struct agent_expr *ax, struct axs_value *value) ...@@ -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 T" to "T", and mark the value as an lvalue in memory. Leave it
to the consumer to actually dereference it. */ to the consumer to actually dereference it. */
value->type = check_typedef (TYPE_TARGET_TYPE (value->type)); 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) value->kind = ((TYPE_CODE (value->type) == TYPE_CODE_FUNC)
? axs_rvalue : axs_lvalue_memory); ? axs_rvalue : axs_lvalue_memory);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment