From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31512 invoked by alias); 22 Sep 2013 13:55:34 -0000 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 Received: (qmail 31499 invoked by uid 89); 22 Sep 2013 13:55:34 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 22 Sep 2013 13:55:34 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8MDtU13025137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 22 Sep 2013 09:55:31 -0400 Received: from host2.jankratochvil.net (ovpn-116-46.ams2.redhat.com [10.36.116.46]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8MDtRvU003496 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 22 Sep 2013 09:55:29 -0400 Date: Sun, 22 Sep 2013 13:55:00 -0000 From: Jan Kratochvil To: "Metzger, Markus T" Cc: "gdb-patches@sourceware.org" Subject: Re: [patch v4 11/24] record-btrace: supply register target methods Message-ID: <20130922135527.GA19149@host2.jankratochvil.net> References: <1372842874-28951-1-git-send-email-markus.t.metzger@intel.com> <1372842874-28951-12-git-send-email-markus.t.metzger@intel.com> <20130818190727.GI24153@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00797.txt.bz2 On Mon, 16 Sep 2013 11:18:02 +0200, Metzger, Markus T wrote: > OK. I added an error message for the to_store_registers method. OK: (gdb) p $rax=1 This record target does not allow writing registers. > > > + > > > + if (may_write_registers == 0) > > > + error (_("Writing to registers is not allowed (regno %d)"), > > > + regno); > > > > Here should be rather: > > gdb_assert (may_write_registers == 0); > > > > as target_store_registers() would not pass the call here otherwise. > > I took this from target_store_registers in target.c. But that is a different case. The case 'may_write_registers == 0' is always already caught by target_store_registers(). record_btrace_store_registers() gets called only by target_store_registers() which already verified the variable is not zero. Thanks, Jan