emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44173: closed (28.0.50; gdb-mi mangles strings with octal escapes)


From: GNU bug Tracking System
Subject: bug#44173: closed (28.0.50; gdb-mi mangles strings with octal escapes)
Date: Fri, 06 Nov 2020 13:04:02 +0000

Your message dated Fri, 6 Nov 2020 14:01:06 +0100
with message-id <5C6EC06A-F571-421B-AEF6-08E5A8B89973@acm.org>
and subject line Re: bug#44173: 28.0.50; gdb-mi mangles strings with octal 
escapes
has caused the debbugs.gnu.org bug report #44173,
regarding 28.0.50; gdb-mi mangles strings with octal escapes
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
44173: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44173
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 28.0.50; gdb-mi mangles strings with octal escapes Date: Fri, 23 Oct 2020 13:50:24 +0200
When GDB sends a string containing octally-escaped characters, it will be 
something like

 "abc\377def"

which is first massaged into JSON and then parsed as such, but since JSON 
doesn't recognise octal escapes, the result is

 "abc377def"

which is wrong. This assumes gdb-mi-decode-strings is nil, which it is by 
default; otherwise the octal escapes are decoded by a fragile preprocessing 
stage (gdb-mi-decode) which itself has known problems as noted in a comment.

Frankly, this business with going via JSON after several ad-hoc text-based 
transforms isn't very principled.

While the bug could be 'solved' by adding yet another regexp hack to 
gdb-mi-decode or gdb-mi-jsonify-buffer, I suggest we write a GDB/MI parser in 
Lisp directly, ditching the gdb-mi-decode preprocessing and JSON form entirely, 
solving this and related bugs once and for all. Many transforms can then be 
done on the S-expression result after parsing, which should be more efficient 
and less error-prone.




--- End Message ---
--- Begin Message --- Subject: Re: bug#44173: 28.0.50; gdb-mi mangles strings with octal escapes Date: Fri, 6 Nov 2020 14:01:06 +0100
31 okt. 2020 kl. 14.57 skrev Mattias EngdegÄrd <mattiase@acm.org>:

> The attached patch changes the default value of gdb-mi-decode-strings from 
> nil to t.

This patch has now been pushed since it did not appear controversial. Changes 
are of course still possible.
With that, the bug is closed.



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]