aboutsummaryrefslogtreecommitdiff
path: root/gdb/ax-gdb.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2008-02-05 15:54:34 +0000
committerJim Blandy <jimb@codesourcery.com>2008-02-05 15:54:34 +0000
commit02e4669d2765f33e140f75a449db9ce8f2a3b404 (patch)
tree7fd8b7155127349f948f5beee84ff992f752d792 /gdb/ax-gdb.c
parent2399638e511ccd3bdc840e904ca480f3abb6cf9a (diff)
downloadgdb-02e4669d2765f33e140f75a449db9ce8f2a3b404.zip
gdb-02e4669d2765f33e140f75a449db9ce8f2a3b404.tar.gz
gdb-02e4669d2765f33e140f75a449db9ce8f2a3b404.tar.bz2
* ax-gdb.c (gen_expr): Yield ordinary error if asked to trace a
pseudoregister, not an internal error.
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r--gdb/ax-gdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index b527663..571c3e7 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);