GNU bug report logs - #44173
28.0.50; gdb-mi mangles strings with octal escapes

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Fri, 23 Oct 2020 11:51:02 UTC

Severity: normal

Found in version 28.0.50

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 44173 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 44173 <at> debbugs.gnu.org
Subject: Re: bug#44173: 28.0.50; gdb-mi mangles strings with octal escapes
Date: Fri, 23 Oct 2020 14:41:02 +0200
23 okt. 2020 kl. 14.01 skrev Eli Zaretskii <eliz <at> gnu.org>:

> I'm okay with writing a GDB/MI parser, but I'm not sure I understand
> how would that help to solve this particular conundrum.  AFAIR,
> there's a genuine ambiguity there regarding non-ASCII characters
> reported from GDB.

Would you mind explaining the ambiguity? Do you mean what coding system should be used for "\303\266" -- whether it should be interpreted as a string of those two bytes, the string "ö", the string "ö", or something else?
This bug is not about the encoding; it's about not interpreting the string as "303266".

>  Could you tell how will this be solved by a
> different parser?

Again, I'm not sure what you mean. The bug arises because we feed incorrectly translated data into a JSON parser. If we parse the string ourselves instead of going via JSON, that particular problem goes away.

> P.S. Btw: gdb-mi.el already has a BNF parser for GDB/MI.

It doesn't parse the lower parts of the grammar -- 'result', 'value' and so on. JSON is used for that.





This bug report was last modified 4 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.