diff options
author | Pedro Alves <palves@redhat.com> | 2010-12-28 17:59:58 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-12-28 17:59:58 +0000 |
commit | 6ab12e0f337aeec39c6d0858eada8a7f6a516909 (patch) | |
tree | 68408b6af17b71b6e4b96056b6cbd667154a88ed | |
parent | 175ff332d0cbd9e522a396be6a990d20fdd0ea07 (diff) | |
download | gdb-6ab12e0f337aeec39c6d0858eada8a7f6a516909.zip gdb-6ab12e0f337aeec39c6d0858eada8a7f6a516909.tar.gz gdb-6ab12e0f337aeec39c6d0858eada8a7f6a516909.tar.bz2 |
* ax-gdb.c (gen_expr) <OP_REGISTER>: Error out if trying to
collect a user register.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ax-gdb.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6508a66..1288db1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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, diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index ab6b829..f56183b 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); |