From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#44173: 28.0.50; gdb-mi mangles strings with octal escapes Date: Sat, 24 Oct 2020 21:41:45 +0200 Message-ID: References: <2A87D378-9FB9-4FC7-951E-5BA9832051CF@acm.org> <837drhjglr.fsf@gnu.org> <834kmljd01.fsf@gnu.org> <2C183F78-8E7D-48AE-BCC2-1E32EC0A4E29@acm.org> <83zh4dhui0.fsf@gnu.org> <865DFE77-16F6-4F20-8238-76E6A09801C8@acm.org> <83mu0ciz3a.fsf@gnu.org> <9D6D4CDF-DCEE-4EED-B0E5-44A999CD4DFA@acm.org> <837drfh72d.fsf@gnu.org> <3191F82D-0C4C-4E56-B96D-798C22234E63@acm.org> <833623h39y.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35964"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44173@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 24 21:42:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kWPQX-0009HC-T8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Oct 2020 21:42:09 +0200 Original-Received: from localhost ([::1]:47566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWPQW-0003uM-T0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Oct 2020 15:42:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWPQQ-0003tw-Bv for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2020 15:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWPQQ-0006oa-2C for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2020 15:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWPQQ-0000Bc-04 for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2020 15:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Oct 2020 19:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44173 X-GNU-PR-Package: emacs Original-Received: via spool by 44173-submit@debbugs.gnu.org id=B44173.1603568518695 (code B ref 44173); Sat, 24 Oct 2020 19:42:01 +0000 Original-Received: (at 44173) by debbugs.gnu.org; 24 Oct 2020 19:41:58 +0000 Original-Received: from localhost ([127.0.0.1]:35154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPQM-0000B8-3P for submit@debbugs.gnu.org; Sat, 24 Oct 2020 15:41:58 -0400 Original-Received: from mail1452c50.megamailservers.eu ([91.136.14.52]:46474 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPQI-0000As-Va for 44173@debbugs.gnu.org; Sat, 24 Oct 2020 15:41:57 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1603568508; bh=6HQp65DI8H8WgXXcE5sYVt+DaGRLYrxhPSDHv9LSJ+Y=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=K/t929oZKqS55M5ekOxqJpN3t72aHuvYYis1TnED2N9EkXIDqrYZgcXTZYjc7s9OL qHOD5rqLCM4oEMgxXqUs81Fhh0AJGWAM5/JrR8kxKaHGUwpQZ74PEqKOTL4Dg/BwJb hxl3I9bs14cdgXQKDaeH9ZWjNko+3M5PjCvULThE= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 09OJfkDQ007877; Sat, 24 Oct 2020 19:41:47 +0000 In-Reply-To: <833623h39y.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A782F1C.5F94837C.0048:SCFSTAT76743386, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: -4.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=A5MSwJeG c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=7rUh4Dt9qm2lQ08n2l4A:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-Origin-Country: SE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191444 Archived-At: 24 okt. 2020 kl. 20.44 skrev Eli Zaretskii : > How do we know, at that level, whether a string is a file name or not? > And even if we succeed in knowing that about source file names of the > debuggee, we have no hope of knowing whether some string in the > debuggee is a file name or just a string. I think we can distinguish source file names by what field they occur in = (which is why I thought that doing it in the accessor might do), but you = are certainly right about strings in the program being debugged. > The rate of the convergence is severely exaggerated. And GDB can be > used to debug all kinds of targets, which is why it has settings for > the host and the target charsets. As long as GDB doesn't convert > everything to UTF-8, I don't see how gdb-mi.el could do that. I don't disagree. What we can do is to have defaults that cover the most = likely case and let users with less common setups change those. > See above: this still doesn't solve the problem of knowing the correct > encoding, even in specific fields of specific responses. That's true, and I don't have a good answer. Perhaps we somehow can get = GDB (or the OS, if it is the file system) to inform us. But as you = noted, even GDB doesn't know what encoding the debugged program uses. It = could very well be multiple encodings at once. A serious debugger interface would probably push this decision to the = data presentation layer and allow the user to specify how he wants to = view the contents of a particular string, in the same way that users = select radix for viewing integers. Not sure how this would be done in = gdb-mi. >> In the short term I suggest changing the default value of = gdb-mi-decode-strings to 't' as this gives the behaviour most commonly = expected by the user. However, it is not critical, and in any case = orthogonal to the issue at hand. What do you think? >=20 > I'm not at all sure this is what users want, since non-ASCII file > names in debugging are quite rare. But I don't mind changing the > default value. Let's do this separately then. It seems unlikely to cause trouble. >> Maybe, but I really dislike hiding bugs by being overly tolerant. >=20 > We could display a warning. But interrupting (and possibly ruining) a > debugging session because of our bug is very harsh: the user is > certainly not guilty. I definitely have some sympathy for that point of view, but then again, = warnings that don't impede the user's progress tend to go unfixed, so = being 'nice' to the user isn't necessarily in his or her best interest. But we could try (warn ...), which I suppose you were thinking about? = It's fairly visible.