From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22757 invoked by alias); 13 Mar 2012 23:20:59 -0000 Received: (qmail 22749 invoked by uid 22791); 13 Mar 2012 23:20:59 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from elasmtp-dupuy.atl.sa.earthlink.net (HELO elasmtp-dupuy.atl.sa.earthlink.net) (209.86.89.62) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Mar 2012 23:20:34 +0000 Received: from [68.96.200.16] (helo=macbook2.local) by elasmtp-dupuy.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1S7b18-0005DK-C4 for gdb-patches@sourceware.org; Tue, 13 Mar 2012 19:20:34 -0400 Message-ID: <4F5FD641.7080804@earthlink.net> Date: Tue, 13 Mar 2012 23:20:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH] dynamic printf References: <4F4DCDD5.2040807@earthlink.net> <83k435cxf3.fsf@gnu.org> In-Reply-To: <83k435cxf3.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da940474985016f2d5aa3e9c7a68c0275804c350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c 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: 2012-03/txt/msg00458.txt.bz2 On 2/29/12 10:22 AM, Eli Zaretskii wrote: >> Date: Tue, 28 Feb 2012 23:03:49 -0800 >> From: Stan Shebs >> >> This patch implements a "dynamic printf", which is basically a >> breakpoint with a printf;continue as its command list - but with >> additional features that make it more interesting. > Thanks. I cannot say I like the name, though: the "dynamic" part has > no mnemonic value at all. The idea is that it works like the "static" printf that has to be wired into the code, but can be added and removed on the fly - aka "dynamically". I'm not wedded to the terminology though, what else would one call it? >> + add_cmd ("agent-printf", class_maintenance, agent_printf_command, >> + _("Translate an expression into remote " >> + "agent bytecode for evaluation."), >> + &maintenancelist); > This new command seems to be undocumented. Yes, thanks for catching that! >> + add_setshow_enum_cmd ("dprintf-style", class_support, >> + dprintf_style_enums,&dprintf_style, _("\ >> +Set the style of usage for dynamic printf."), _("\ >> +Show the style of usage for dynamic printf."), _("\ >> +Choose the style of usage for dynamic printf.\n\ > How about listing the available styles with one line of description > for each one? Yes, I forgot that part too... >> +@item call >> +@kindex dprintf-style call >> +Handle the output by calling your program's @code{printf} function. >> +(This expects @code{printf} to have been linked into the program.) > And what happens if it isn't? > It should report an error. I had in mind to add an option to specify the formatting function, but the patch was starting to get complicated. Stan