GNU bug report logs -
#33548
25.1; GUD GDB doesn't decode file paths correctly
Previous Next
Reported by: ksqsf <i <at> ksqsf.moe>
Date: Thu, 29 Nov 2018 17:34:01 UTC
Severity: normal
Found in version 25.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33548 in the body.
You can then email your comments to 33548 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33548
; Package
emacs
.
(Thu, 29 Nov 2018 17:34:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
ksqsf <i <at> ksqsf.moe>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 29 Nov 2018 17:34:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Dear maintainers,
It seems that GDB MI doesn't decode file paths correctly, which can
result in some really weird unexpected behaviors.
For example, it attempts to find file
/home/ksqsf/我的坚果云/"/home/ksqsf/\346\210\221\347\232\204\345\235\232\346
\236\234\344\272\221/code.cpp"
I traced down to the source and found that gdb-get-source-file, gdb-
get-source-file-list, and gdb-get-location don't decode file paths
using a correct coding system. (In my case, UTF-8.) Instead, they
simply use 'read'.
Hope this can be fixed soon!
Regards,
_rika
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33548
; Package
emacs
.
(Thu, 29 Nov 2018 19:36:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 33548 <at> debbugs.gnu.org (full text, mbox):
> From: ksqsf <i <at> ksqsf.moe>
> Date: Fri, 30 Nov 2018 00:58:34 +0800
> Feedback-ID: bizesmtp:ksqsf.moe:qybgforeign:qybgforeign2
>
> It seems that GDB MI doesn't decode file paths correctly, which can
> result in some really weird unexpected behaviors.
>
> For example, it attempts to find file
> /home/ksqsf/我的坚果云/"/home/ksqsf/\346\210\221\347\232\204\345\235\232\346
> \236\234\344\272\221/code.cpp"
>
> I traced down to the source and found that gdb-get-source-file, gdb-
> get-source-file-list, and gdb-get-location don't decode file paths
> using a correct coding system. (In my case, UTF-8.) Instead, they
> simply use 'read'.
Does it help to set gdb-mi-decode-strings to utf-8?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33548
; Package
emacs
.
(Fri, 30 Nov 2018 02:04:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 33548 <at> debbugs.gnu.org (full text, mbox):
在 2018-11-29四的 21:35 +0200,Eli Zaretskii写道:
> Does it help to set gdb-mi-decode-strings to utf-8?
Yes! This fixes this problem for me. Thanks. This report can be closed
now. I think this variable deserves a mention in the doc anyway.
Actually it should be made default.
I noticed the warning, but can we do better? I mean, simply stops gdb
from escaping strings (does gdb even support this?), as _inconsistent_
escaping does nothing but introducing problems. LLDB seems to do better
job in this regard.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 30 Nov 2018 07:40:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
ksqsf <i <at> ksqsf.moe>
:
bug acknowledged by developer.
(Fri, 30 Nov 2018 07:40:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 33548-done <at> debbugs.gnu.org (full text, mbox):
> From: ksqsf <i <at> ksqsf.moe>
> Cc: 33548 <at> debbugs.gnu.org
> Date: Fri, 30 Nov 2018 10:03:19 +0800
> Feedback-ID: bizesmtp:ksqsf.moe:qybgforeign:qybgforeign4
>
> 在 2018-11-29四的 21:35 +0200,Eli Zaretskii写道:
> > Does it help to set gdb-mi-decode-strings to utf-8?
>
> Yes! This fixes this problem for me. Thanks. This report can be closed
> now.
Done.
> I think this variable deserves a mention in the doc anyway.
What documentation did you have in mind?
> Actually it should be made default.
No, I don't think so. It has some confusing side effects, and in most
cases is unnecessary.
> I noticed the warning, but can we do better? I mean, simply stops gdb
> from escaping strings (does gdb even support this?), as _inconsistent_
> escaping does nothing but introducing problems.
You can tell GDB to stop escaping in strings ("set print
sevenbit-strings", which is off by default), but GDB is under user
control, and the user is legitimately allowed to turn escaping on, we
cannot do anything about that. Plus, there are GDB settings to
control the encoding of text strings that GDB emits based on values of
the variables of the program being debugged.
> LLDB seems to do better job in this regard.
??? LLDB doesn't have a respectable implementation of the MI protocol
to begin with.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33548
; Package
emacs
.
(Fri, 30 Nov 2018 08:05:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 33548-done <at> debbugs.gnu.org (full text, mbox):
在 2018-11-30五的 09:39 +0200,Eli Zaretskii写道:
> What documentation did you have in mind?
"(emacs) Debuggers" or better "(emacs) GDB Graphical Interface". I did
check these sections but neither mentions encoding. (At least in Emacs
25.1. Though I missed it in the source file...)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33548
; Package
emacs
.
(Fri, 30 Nov 2018 08:48:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 33548-done <at> debbugs.gnu.org (full text, mbox):
> From: ksqsf <i <at> ksqsf.moe>
> Cc: 33548-done <at> debbugs.gnu.org
> Date: Fri, 30 Nov 2018 16:03:56 +0800
>
> 在 2018-11-30五的 09:39 +0200,Eli Zaretskii写道:
> > What documentation did you have in mind?
>
> "(emacs) Debuggers" or better "(emacs) GDB Graphical Interface".
I've put that in "Source Buffers" instead.
Thanks.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 28 Dec 2018 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.