From 6ab12e0f337aeec39c6d0858eada8a7f6a516909 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 28 Dec 2010 17:59:58 +0000 Subject: [PATCH] * ax-gdb.c (gen_expr) : Error out if trying to collect a user register. --- gdb/ChangeLog | 5 +++++ gdb/ax-gdb.c | 6 ++++++ 2 files changed, 11 insertions(+) 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); -- 2.30.2