This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Disallow pseudo-registers in agent expression.


I've committed the following, to fix part of this.

gdb/ChangeLog:
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.
	Reported by: Andrzej Zaborowski

diff -r fb37ff1fb896 -r da7d103c89a5 gdb/ax-gdb.c
--- a/gdb/ax-gdb.c	Tue Feb 05 07:36:35 2008 -0800
+++ b/gdb/ax-gdb.c	Tue Feb 05 07:56:09 2008 -0800
@@ -1607,6 +1607,10 @@ gen_expr (union exp_element **pc, struct
 	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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]