From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20370 invoked by alias); 28 Apr 2014 18:36:18 -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 20354 invoked by uid 89); 28 Apr 2014 18:36:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg21.ericsson.net Received: from usevmg21.ericsson.net (HELO usevmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 28 Apr 2014 18:36:16 +0000 Received: from EUSAAHC002.ericsson.se (Unknown_Domain [147.117.188.78]) by usevmg21.ericsson.net (Symantec Mail Security) with SMTP id 6D.76.02831.F9E4E535; Mon, 28 Apr 2014 14:50:39 +0200 (CEST) Received: from EUSAAMB103.ericsson.se ([147.117.188.120]) by EUSAAHC002.ericsson.se ([147.117.188.78]) with mapi id 14.03.0174.001; Mon, 28 Apr 2014 14:36:13 -0400 From: Marc Khouzam To: Simon Marchi , "'gdb-patches@sourceware.org'" Subject: RE: [PATCH] PR mi/15806: Fix quoting of async events Date: Mon, 28 Apr 2014 18:36:00 -0000 Message-ID: References: <1398568091-21253-1-git-send-email-simon.marchi@ericsson.com> In-Reply-To: <1398568091-21253-1-git-send-email-simon.marchi@ericsson.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00592.txt.bz2 > -----Original Message----- > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] On Behalf Of Simon Marchi > Sent: Saturday, April 26, 2014 11:08 PM > To: gdb-patches@sourceware.org > Cc: Simon Marchi > Subject: [PATCH] PR mi/15806: Fix quoting of async events >=20 > The quoting in whatever goes in the event_channel of MI is little bit bro= ken. >=20 > Link for the lazy: > https://sourceware.org/bugzilla/show_bug.cgi?id=3D15806 >=20 > Here is an example of a =3Dlibrary-loaded event with an ill-named directo= ry, > /tmp/how"are\you (the problem is present with every directory on > Windows since it uses backslashes as a path separator). The result will b= e the > following: >=20 > =3Dlibrary-loaded,id=3D"/tmp/how"are\\you/libexpat.so.1",... >=20 > The " between 'how' and 'are' should be escaped. >=20 > Another bad behavior is double escaping in =3Dbreakpoint-created, for > example: >=20 > =3Dbreakpoint- > created,bkpt=3D{...,fullname=3D"/tmp/how\\"are\\\\you/test.c",...} Another impact of this bug is that a frontend cannot properly obtain the string used in a dprintf that was created from the console. If a=20 user manually creates a dprintf, the frontend would use=20 =3Dbreakpoint-created to show this new dprintf. With this bug it becomes problematic to extract the printf string to be used. I am not familiar with the intricacies of MI output escaping but I can=20 confirm that the patch proposed by Simon fixes the issue I am seeing with Eclipse and dprintf. I don't know if it is too late for the maintenance release, but in case=20 it is not, let me add my vote to have it included in 7.7.1. Thanks Marc