From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32202 invoked by alias); 5 Feb 2008 15:58:57 -0000 Received: (qmail 32189 invoked by uid 22791); 5 Feb 2008 15:58:57 -0000 X-Spam-Check-By: sourceware.org Received: from fk-out-0910.google.com (HELO fk-out-0910.google.com) (209.85.128.188) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 05 Feb 2008 15:58:34 +0000 Received: by fk-out-0910.google.com with SMTP id 26so2402840fkx.10 for ; Tue, 05 Feb 2008 07:58:32 -0800 (PST) Received: by 10.82.174.20 with SMTP id w20mr15638707bue.28.1202227111552; Tue, 05 Feb 2008 07:58:31 -0800 (PST) Received: by 10.82.165.12 with HTTP; Tue, 5 Feb 2008 07:58:31 -0800 (PST) Message-ID: <8f2776cb0802050758o1d3b80cfw11e88ec413f0c423@mail.gmail.com> Date: Tue, 05 Feb 2008 15:58:00 -0000 From: "Jim Blandy" To: "andrzej zaborowski" Subject: Re: [PATCH] Disallow pseudo-registers in agent expression. Cc: gdb-patches@sources.redhat.com In-Reply-To: <8f2776cb0802050734x1f79a335kfa3eaa104f25fedc@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8f2776cb0801271007r125463e0la1cf8a7c9d1efef@mail.gmail.com> <8f2776cb0801281728v2ff40d50y2be92664b2c28de5@mail.gmail.com> <8f2776cb0802050734x1f79a335kfa3eaa104f25fedc@mail.gmail.com> X-Google-Sender-Auth: 95d2744df4e355d7 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00105.txt.bz2 I've committed the following, to fix part of this. gdb/ChangeLog: 2008-02-05 Jim Blandy * 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);