From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30751 invoked by alias); 19 Apr 2013 19:57:07 -0000 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 Received: (qmail 30742 invoked by uid 89); 19 Apr 2013 19:57:07 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 19 Apr 2013 19:57:06 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3JJuxju007954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Apr 2013 15:56:59 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3JJuusw023849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 19 Apr 2013 15:56:57 -0400 From: Tom Tromey To: Hui Zhu Cc: Pedro Alves , Eli Zaretskii , Hui Zhu , gdb-patches ml , Marc Khouzam Subject: Re: [PATCH] add -s option to make -break-insert support dprintf References: <515451EA.1000200@mentor.com> <83y5d7wpvq.fsf@gnu.org> <516454DA.9040109@redhat.com> <87ppxzhfqy.fsf@fleche.redhat.com> <516C2549.3060808@redhat.com> Date: Mon, 22 Apr 2013 00:18:00 -0000 In-Reply-To: (Hui Zhu's message of "Tue, 16 Apr 2013 09:49:13 +0800") Message-ID: <87vc7ithtj.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-04/txt/msg00635.txt.bz2 >>>>> "Hui" == Hui Zhu writes: Hui> The MI handle the argument is different with CLI. For example: Hui> Input -break-insert -s "1\n" to mi. The mi_cmd_break_insert will get: [...] This seems to mean that extra quoting is needed for the format string. Like you can't send just: -break-insert -s "\"1\n\"" It seems like you have to send: -break-insert -s "\"1\\n\"" But an alternative is to keep the MI interface simple and "MI-like" -- meaning using the quoting and argument parsing convention already defined by MI, one of its big benefits over the CLI -- and let gdb handle the requirements of the protocol and/or its own internals. That is, send: -break-insert -s "1\n" ... and gdb can rewrite that format string to whatever is needed. Tom