From: Jim Blandy Date: Tue, 5 Feb 2008 15:54:34 +0000 (+0000) Subject: * ax-gdb.c (gen_expr): Yield ordinary error if asked to trace a X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=02e4669d2765f33e140f75a449db9ce8f2a3b404;p=binutils-gdb.git * ax-gdb.c (gen_expr): Yield ordinary error if asked to trace a pseudoregister, not an internal error. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8e06da09032..8c16a08d7ce 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-02-05 Jim Blandy + + * ax-gdb.c (gen_expr): Yield ordinary error if asked to trace a + pseudoregister, not an internal error. + 2008-02-04 Vladimir Prus * varobj.c (c_value_of_variable): Use xstrdup. diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index b527663fe01..571c3e7c8e4 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -1607,6 +1607,10 @@ gen_expr (union exp_element **pc, struct agent_expr *ax, if (reg == -1) internal_error (__FILE__, __LINE__, _("Register $%s not available"), name); + if (reg >= gdbarch_num_regs (current_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 (current_gdbarch, reg);