Running (gdb) set charset UTF-8 returns Undefined item: "UTF-8". this makes it impossible to debug some programs with UTF-encoded constants and also breaks KDevelop unittests [1]. Can anything be done with that? [1]: https://phabricator.kde.org/T9249
Sure. I'm digging into the issue. Apparently, the system libc iconv doesn't provide the support that gdb wants. Switching to the libconv in ports, will extend the support to 200 charset. I guess, I'll add an option (ON on default) to use extend the charset support. Nice finding.
A commit references this bug: Author: pizzamig Date: Fri Jul 27 14:05:08 UTC 2018 New revision: 475441 URL: https://svnweb.freebsd.org/changeset/ports/475441 Log: devel/gdb: add support to UTF-8 charset Introduced a new option, enabled on default, to use libiconv, that provide wchar_t support and allow to use UTF-8 charset in gdb PR: 230036 Reported by: Gleb Popov <arrowd@FreeBSD.org> Changes: head/devel/gdb/Makefile
thanks for reporting. set charset UTF-8 works now.
Hum, that changed nothing for me. gdb-8.1_4 Name : gdb Version : 8.1_4 Installed on : Fri Jul 27 19:32:58 2018 +03 Origin : devel/gdb Architecture : FreeBSD:12:amd64 Prefix : /usr/local Categories : devel Licenses : GPLv3 Maintainer : pizzamig@FreeBSD.org WWW : http://www.gnu.org/software/gdb/ Comment : GNU GDB of newer version than comes with the system Options : BUNDLED_READLINE: off DEBUG : off GDB_LINK : on GUILE : off KGDB : on PORT_ICONV : on PORT_READLINE : on PYTHON : on SYSTEM_ICONV : off TUI : off Shared Libs required: libexpat.so.1 libpython2.7.so.1 libreadline.so.7 libmpfr.so.6 Still no UTF-8 item.
A commit references this bug: Author: pizzamig Date: Sat Jul 28 10:18:33 UTC 2018 New revision: 475518 URL: https://svnweb.freebsd.org/changeset/ports/475518 Log: devel/gdb: Fix iconv support Fix iconv support. Bump portrevision. PR: 230036 Reported by: Gleb Popov <arrowd@FreeBSD.org> Changes: head/devel/gdb/Makefile
Sorry, my bad. I forgot to remove iconv from USES. It's fixed now.