From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31867 invoked by alias); 5 Aug 2003 19:52:39 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31845 invoked from network); 5 Aug 2003 19:52:38 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 5 Aug 2003 19:52:38 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 97FE42B7F; Tue, 5 Aug 2003 15:52:33 -0400 (EDT) Message-ID: <3F300B01.8050803@redhat.com> Date: Tue, 05 Aug 2003 19:52:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Snyder Cc: gdb@sources.redhat.com Subject: Re: set prompt-escape-character References: <3F2F2A72.9020304@redhat.com> <3F3004B9.2040003@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-08/txt/msg00070.txt.bz2 > Andrew Cagney wrote: > > More -Wformat-nonliteral suprizes. In trying to understand the "top.c" warnings from: > > /* FIXME: how to protect GDB from crashing > from bad user-supplied format string? */ > sprintf (outp, fmt[0] == 0 ? default_fmt : fmt, > tmp); > > I discovered a new feature: > > (top-gdb) set prompt-escape-char 0x25 > (top-gdb) set prompt PC=0x%0x%$pc > PC=0x1802f68 > > Perhaps it could be change do use the printf code vis: > set prompt "0x%x ", $pc > > Anyway, Michael, was there any doco on this? I can't find anything. > > No, I think I was hoping no one would use it. ;-) > This was something that a customer forced us to add, back in the > "bad old days" when there wasn't much review over gdb. I really really tried to talk them out of it, honest. Stan Shebs was always threatening to delete the undocumented commands ;-) Perhaps this should be silently dropped. Andrew