From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6977 invoked by alias); 25 Aug 2014 14:03:18 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 6940 invoked by uid 89); 25 Aug 2014 14:03:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 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; Mon, 25 Aug 2014 14:03:15 +0000 Received: from maildlpprd05.lss.emc.com (maildlpprd05.lss.emc.com [10.253.24.37]) by mailuogwprd04.lss.emc.com (Sentrion-MTA-4.3.0/Sentrion-MTA-4.3.0) with ESMTP id s7PE38VN019989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Aug 2014 10:03:11 -0400 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com s7PE38VN019989 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com s7PE38VN019989 Received: from mailhub.lss.emc.com (mailhubhoprd01.lss.emc.com [10.254.221.251]) by maildlpprd05.lss.emc.com (RSA Interceptor); Mon, 25 Aug 2014 10:03:05 -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 s7PE35Uu009987; Mon, 25 Aug 2014 10:03:05 -0400 Received: by usendtaylorx2l.lss.emc.com (Postfix, from userid 26043) id CBF045D1554; Mon, 25 Aug 2014 10:03:03 -0400 (EDT) Received: from usendtaylorx2l (localhost [127.0.0.1]) by usendtaylorx2l.lss.emc.com (Postfix) with ESMTP id 4A7625D04E9; Mon, 25 Aug 2014 10:03:03 -0400 (EDT) To: Eli Zaretskii cc: "gdb@sourceware.org" Subject: Re: possible gdb agent expression extension In-reply-to: <83fvgnmzk7.fsf@gnu.org> References: <20426.1406558341@usendtaylorx2l> <12648.1408745258@usendtaylorx2l> <83fvgnmzk7.fsf@gnu.org> Comments: In-reply-to Eli Zaretskii message dated "Sat, 23 Aug 2014 03:32:08 -0400." Date: Mon, 25 Aug 2014 14:03:00 -0000 Message-ID: <7594.1408975383@usendtaylorx2l> From: David Taylor X-EMM-MHVC: 1 X-RSA-Classifications: DLM_1, public X-Sentrion-Hostname: mailuogwprd04.lss.emc.com X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00118.txt.bz2 Eli Zaretskii wrote: > > Date: Fri, 22 Aug 2014 18:07:38 -0400 > > From: David Taylor For some strange reason I did not receive the copy sent directly to me but did receive the copy sent to the list. Bizarre. > > Hopefully the markup is correct: > > I cannot comment on the markup's idea because I don't really > understand what you are trying to say using that markup. I think the > larger context is missing. I was trying to make more concrete the proposal that was previously made on July 28th and was included in the message for reference. While I tried to get the markup right, I didn't run texinfo so I figured I probably botched something somewhere. > That @result{} at the end, with nothing after it, does look strange: > what "result" does this give? I was largely copying snippets I found nearby in the agentexpr.texi file. They are of the form: : ==> > > @item @code{setmem8} (0x??): @var{addr} @var{value} @result{} > > @item @code{setmem16} (0x??): @var{addr} @var{value} @result{} > > @item @code{setmem32} (0x??): @var{addr} @var{value} @result{} > > @item @code{setmem64} (0x??): @var{addr} @var{value} @result{} > > If this is part of a @table, you will be much better off using "@table > @code", so that 0x?? etc. will be rendered in the appropriate > typeface. (Btw, what does "0x??" signify?) The 0x?? signifies the as yet to be determined opcode for the operation. In agentexpr.texi the existing descriptions of the operations all had the hex value of the opcode in parentheses right after the @item @code{operation name} chunk so I tried to follow it in my message. I found it hard to read (so I figured others would have a hard time reading it as well), especially the example you quoted below, so I tried to also give a version that had less texinfo markup and yet hopefully preserved the meaning that I was trying to convey. > > Pop an address @var{addr} and a value @{value} from the stack. For > > bytecode @code{setmem}@var{n}, set the @var{n}-bit value at @var{addr} > > to the least significant @var{n}-bits of @var{value}. Ignoring > > architecture pointer alignment issues, it is as if the operation > > > > *@code{uint}@var{n}@code{_t}@var{addr} = @code{uint}@var{n}@code{_t}@var{value} > > You cannot stick a code portion in the middle of text just like that, > you should use @smallexample (and then drop the @code parts, as they > are automatically used for text inside @smallexample). Basically, I want to be able to do something like: set variable = value in an agent expression and have it work. The rest is details to be worked out. I'd like to nail down some of the details. I'm not concerned with floating point values at the moment, just integers of various sizes and flavors. A variable can be in a register or in memory, So, I need a set register operation and one or more set memory operations. We haven't starting implementing this for our new gdb stub, but failing fires or other higher priority items arising, I expect we will implement it before the end of the year. So, I want to nail down . what are the operations? . what are their respective byte codes? . what is the syntax of each of them? . what are their semantics? . how can GDB determine whether a given remote target supports these operations? Once product ships with a stub containing them it will be hard to change them. And I *REALLY* want to remain compatible with standard GDB. My goal, when the dust settles, is to have some variant of this functionality in the standard GDB and gdbserver and the same variant in our new GDB stub. The people who implemented our old stub and did the bulk of the local changes to GDB have all left. Contributing back to the community was never a priority for them. I and my boss feel differently. Hope this helps clarify things. If questions remain, ask away. Thanks. David