From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4790 invoked by alias); 6 Jan 2011 06:43:54 -0000 Received: (qmail 4782 invoked by uid 22791); 6 Jan 2011 06:43:53 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Jan 2011 06:43:49 +0000 Received: by wyj26 with SMTP id 26so16833168wyj.0 for ; Wed, 05 Jan 2011 22:43:47 -0800 (PST) Received: by 10.216.172.212 with SMTP id t62mr23124357wel.60.1294296222852; Wed, 05 Jan 2011 22:43:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.182.206 with HTTP; Wed, 5 Jan 2011 22:43:22 -0800 (PST) In-Reply-To: <4D24D9DD.8090104@codesourcery.com> References: <4D24D9DD.8090104@codesourcery.com> From: Hui Zhu Date: Thu, 06 Jan 2011 06:43:00 -0000 Message-ID: Subject: Re: [PATCH] tracepoint: add new trace command "printf"[0] gdb To: Stan Shebs Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-01/txt/msg00116.txt.bz2 On Thu, Jan 6, 2011 at 04:51, Stan Shebs wrote: > On 1/3/11 10:18 PM, Doug Evans wrote: >> >> [for reference sake] >> To me this is a subset of a bigger feature set that is missing: >> partitioning of the things that can be accomplished by gdbserver from >> the setup that is needed (IOW separate the heavy lifting of parsing >> debug info and translating a user query into, for example, an agent >> expression (the gdb side) from the processing of that query when the >> breakpoint(/tracepoint) is hit (the gdbserver side). >> Plus it might be useful to not require a gdb/gdbserver connection to >> get things started, e.g., convey the tracepoint info (and anything >> else) to gdbserver from a local source. >> [I'm using "query" loosely here. =A0I'm using "gdbserver" loosely too: >> anything that looks like gdbserver to gdb will do.] > > I'm actually working on a contract proposal to do a bunch of work in this > area. > > One of the specific ideas is to introduce a "dynamic printf" that works > somewhat like what I think Hui Zhu was wanting; it stops the program at a > location, runs the printf in gdbserver, and then continues. > > Another one of the ideas is to use agent expressions to do target-side > conditional breakpoints. =A0This is especially compelling for many-core > targets, where we don't want 100 threads on 100 cores to be trying to get > GDB to do 100 conditional expression evaluations all at once. > > I didn't specifically propose to go beyond that, into general partitioning > of command lists between host and target, although it's a very interesting > direction. =A0The idea gets me to thinking about whether we should keep t= he > command list form, or raise it to the level of a real language, or maybe > support several - Mentor's EDGE debugger for instance uses a C syntax for > its "codelets" ( > http://www.mentor.com/embedded-software/resources/overview/codelets-15b9e= aed-8e4b-43a2-aad5-c189cd7f2d68 > ) even though they run on the host, and whether the language is C or Pyth= on, > it seems useful to be able to inject real code bits into the target syste= m. > > Anyway, if we get the contract (fingers crossed!) then I expect we'll be > putting up some proposals for discussion within the next couple of months. > > I'll comment on the patch in a different message. > > Stan > > That will be great! Thanks Stan. Hui