* ax-gdb.c (gen_expr): Yield ordinary error if asked to trace a
authorJim Blandy <jimb@codesourcery.com>
Tue, 5 Feb 2008 15:54:34 +0000 (15:54 +0000)
committerJim Blandy <jimb@codesourcery.com>
Tue, 5 Feb 2008 15:54:34 +0000 (15:54 +0000)
pseudoregister, not an internal error.

gdb/ChangeLog
gdb/ax-gdb.c

index 8e06da0903204da7a4fae051520fde85c1265ba9..8c16a08d7ce5b431a49d67dd7b8ceb5c1c82f973 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-05  Jim Blandy  <jimb@red-bean.com>
+
+       * ax-gdb.c (gen_expr): Yield ordinary error if asked to trace a
+       pseudoregister, not an internal error.
+
 2008-02-04  Vladimir Prus  <vladimir@codesourcery.com>
 
        * varobj.c (c_value_of_variable): Use xstrdup.
index b527663fe01f32420b7729b35406d2f12957d9b9..571c3e7c8e49c9e9ede1d27931d07dae3d0da3e6 100644 (file)
@@ -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);