From: Pedro Alves Date: Tue, 28 Dec 2010 17:59:58 +0000 (+0000) Subject: * ax-gdb.c (gen_expr) : Error out if trying to X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ab12e0f337aeec39c6d0858eada8a7f6a516909;p=binutils-gdb.git * ax-gdb.c (gen_expr) : Error out if trying to collect a user register. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6508a66842e..1288db11e9a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-12-28 Pedro Alves + + * ax-gdb.c (gen_expr) : Error out if trying to + collect a user register. + 2010-12-28 Hui Zhu * gdbarch.sh (ax_pseudo_register_collect, diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index ab6b82918bb..f56183b0517 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -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);