From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16768 invoked by alias); 12 Jun 2012 02:03:08 -0000 Received: (qmail 16758 invoked by uid 22791); 12 Jun 2012 02:03:05 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jun 2012 02:02:52 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SeGRX-0000de-CL from Yao_Qi@mentor.com for gdb@sourceware.org; Mon, 11 Jun 2012 19:02:51 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 11 Jun 2012 19:02:17 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Mon, 11 Jun 2012 19:02:50 -0700 Message-ID: <4FD6A346.4010108@codesourcery.com> Date: Tue, 12 Jun 2012 02:03:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Hui Zhu CC: "gdb@sourceware.org" Subject: Re: What about add new commands "maintenance agent-breakpoint id expression" and "maintenance agent-eval-breakpoint id expression" References: <4FD68A1A.2040600@mentor.com> In-Reply-To: <4FD68A1A.2040600@mentor.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 X-SW-Source: 2012-06/txt/msg00056.txt.bz2 On 06/12/2012 08:15 AM, Hui Zhu wrote: > Hi guys, > > The "maintenance agent" and "maintenance agent-eval" are for translate > an expression into remote agent bytecode. > Both of them got address info from frame. But when we use tracepoint or > breakpoint with agent code, this address is from tracepoint or breakpoint. Agent expression evaluation makes sense in the context of "current scope" or "current frame". We can't switch to a frame at any arbitrary address, because the frame maybe does not exist. Any examples that "maint agent" doesn't meet your needs in breakpoint/tracepoint? It works in the following simple case, (gdb) b main if (unsigned int) main > 1 (gdb) maintenance agent-eval (unsigned int) main > 1 0 const64 134513662 9 zero_ext 32 11 const8 1 13 zero_ext 32 15 swap 16 less_unsigned 17 end -- Yao (齐尧)