From patchwork Wed Aug 27 13:49:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Taylor X-Patchwork-Id: 2553 Received: (qmail 28009 invoked by alias); 27 Aug 2014 13:50:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 27999 invoked by uid 89); 27 Aug 2014 13:50:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailuogwhop.emc.com Received: from mailuogwhop.emc.com (HELO mailuogwhop.emc.com) (168.159.213.141) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 27 Aug 2014 13:50:22 +0000 Received: from maildlpprd03.lss.emc.com (maildlpprd03.lss.emc.com [10.253.24.35]) by mailuogwprd04.lss.emc.com (Sentrion-MTA-4.3.0/Sentrion-MTA-4.3.0) with ESMTP id s7RDoIQf017701 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Aug 2014 09:50:18 -0400 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com s7RDoIQf017701 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com s7RDoIQf017701 Received: from mailhub.lss.emc.com (mailhubhoprd06.lss.emc.com [10.254.222.130]) by maildlpprd03.lss.emc.com (RSA Interceptor); Wed, 27 Aug 2014 09:49:53 -0400 Received: from usendtaylorx2l.lss.emc.com (usendtaylorx2l.lss.emc.com [10.243.10.188]) by mailhub.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id s7RDo0A8008071; Wed, 27 Aug 2014 09:50:00 -0400 Received: by usendtaylorx2l.lss.emc.com (Postfix, from userid 26043) id 94A015D2F0C; Wed, 27 Aug 2014 09:49:59 -0400 (EDT) Received: from usendtaylorx2l (localhost [127.0.0.1]) by usendtaylorx2l.lss.emc.com (Postfix) with ESMTP id 929305D2F01; Wed, 27 Aug 2014 09:49:59 -0400 (EDT) To: Eli Zaretskii cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH] reserve proposed new bytecodes In-reply-to: <83tx4yk5tf.fsf@gnu.org> References: <524.1409090060@usendtaylorx2l> <83tx4yk5tf.fsf@gnu.org> Comments: In-reply-to Eli Zaretskii message dated "Tue, 26 Aug 2014 22:46:36 -0400." Date: Wed, 27 Aug 2014 09:49:59 -0400 Message-ID: <22053.1409147399@usendtaylorx2l> From: David Taylor X-EMM-MHVC: 1 X-RSA-Classifications: public X-Sentrion-Hostname: mailuogwprd04.lss.emc.com X-IsSubscribed: yes Eli Zaretskii wrote: > > From: David Taylor > > Date: Tue, 26 Aug 2014 17:54:20 -0400 > > > > +@item @code{setmem8} (0x35): @var{addr} @var{value} @result{} > > +@itemx @code{setmem16} (0x36): @var{addr} @var{value} @result{} > > +@itemx @code{setmem32} (0x37): @var{addr} @var{value} @result{} > > +@itemx @code{setmem64} (0x38): @var{addr} @var{value} @result{} > > I asked you to put "(nothing)" after @result{}. > > > +@item @code{setreg} (0x39) @var{regnum}: @var{value} @result{} > > Likewise here. You're right. Sorry. Here's a revised version with the 5 requested insertions of (nothing) in agentexpr.texi. The pdf, info, and html targets all succeeded; visually the modified parts of gdb.pdf looked correct. Entry for gdb/ChangeLog: 2014-08-26 David Taylor * common/ax.def: Add DEFOP entries for proposed bytecodes setmem8, setmem16, setmem32, setmem64, and setreg. Entry for gdb/doc/ChangeLog: 2014-08-26 David Taylor * agentexpr.texi (Bytecode Descriptions): Add decsriptions of propmosed bytecodes setmem8, setmem16, setmem32, setmem64, and setreg. The actual diff (against GDB 7.8, but these two files don't change very often): Index: gdb/common/ax.def =================================================================== RCS file: /home/cvsroot/GDB/gdb/common/ax.def,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ax.def --- gdb/common/ax.def 18 Feb 2014 15:36:03 -0000 1.1.1.2 +++ gdb/common/ax.def 26 Aug 2014 19:22:12 -0000 @@ -95,3 +95,9 @@ DEFOP (rot, 0, 0, 3, 3, 0x33) /* Both the argument and consumed numbers are dynamic for this one. */ DEFOP (printf, 0, 0, 0, 0, 0x34) +/* The following five operands are not yet implemented. */ +DEFOP (setmem8, 0, 8, 2, 0, 0x35) +DEFOP (setmem16, 0, 16, 2, 0, 0x36) +DEFOP (setmem32, 0, 32, 2, 0, 0x37) +DEFOP (setmem64, 0, 64, 2, 0, 0x38) +DEFOP (setreg, 2, 0, 1, 0, 0x39) Index: gdb/doc/agentexpr.texi =================================================================== RCS file: /home/cvsroot/GDB/gdb/doc/agentexpr.texi,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 agentexpr.texi --- gdb/doc/agentexpr.texi 18 Feb 2014 15:36:03 -0000 1.1.1.2 +++ gdb/doc/agentexpr.texi 27 Aug 2014 13:45:00 -0000 @@ -516,6 +516,28 @@ range of memory, then the next-to-top of the stack is the lvalue's address, and the top of the stack is the lvalue's size, in bytes. +@item @code{setmem8} (0x35): @var{addr} @var{value} @result{} (nothing) +@itemx @code{setmem16} (0x36): @var{addr} @var{value} @result{} (nothing) +@itemx @code{setmem32} (0x37): @var{addr} @var{value} @result{} (nothing) +@itemx @code{setmem64} (0x38): @var{addr} @var{value} @result{} (nothing) +Pop an address @var{addr} and value @var{value} from the stack. For +bytecode @code{setmem}@var{n}, set an @var{n}-bit value at @var{addr}, +using the @var{n}-bit least significant bits of @var{value} and natural +target endianness. + +If attempting to write memory at @var{addr} would cause a processor +exception of some sort, terminate with an error. + +Not implemented yet. + +@item @code{setreg} (0x39) @var{regnum}: @var{value} @result{} (nothing) +Pop @var{value} from the stack. Set register @var{regnum} to @var{value}. + +If the register is read-only or if attempting to write @var{value} to it +would cause a processor exception of some sort, terminate with an error. + +Not implemented yet. + @end table