* ax-gdb.c (gen_expr) <OP_REGISTER>: Error out if trying to

collect a user register.
This commit is contained in:
Pedro Alves 2010-12-28 17:59:58 +00:00
parent 175ff332d0
commit 6ab12e0f33
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-12-28 Pedro Alves <pedro@codesourcery.com>
* ax-gdb.c (gen_expr) <OP_REGISTER>: Error out if trying to
collect a user register.
2010-12-28 Hui Zhu <teawater@gmail.com>
* gdbarch.sh (ax_pseudo_register_collect,

View File

@ -1978,6 +1978,12 @@ gen_expr (struct expression *exp, union exp_element **pc,
if (reg == -1)
internal_error (__FILE__, __LINE__,
_("Register $%s not available"), name);
/* No support for tracing user registers yet. */
if (reg >= gdbarch_num_regs (exp->gdbarch)
+ gdbarch_num_pseudo_regs (exp->gdbarch))
error (_("'%s' is a pseudo-register; "
"GDB cannot yet trace pseudoregister contents."),
name);
value->kind = axs_lvalue_register;
value->u.reg = reg;
value->type = register_type (exp->gdbarch, reg);