From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C5E63858D26; Fri, 7 Jun 2024 21:32:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C5E63858D26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1717795924; bh=DM3qVU5jXD4qoKjQV72Bmjk/u+laXyBl0kNUPvdW444=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fqQKDjB0pY0pZ+bkyhM7hbLKYPy9VawLBTHrjbnenUd1+ysmGtlrLnM6OUKtme4Cs g5JdNfJOzgZN5uqXLyQvCz90J3dCfLlvuAc9//xsFJbXYnAdONa6fA6FnKfaiUt2ey L1ck0VRgMWss7o9YIGelfSj+TEoRsYWdEhIhj9Kc= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/31853] GDB's use of iconv does not work with macOS Sonoma Date: Fri, 07 Jun 2024 21:32:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31853 --- Comment #5 from Tom Tromey --- (In reply to Ciaran Woodward from comment #4) > > * ... but does use UTF-32 as its wchar_t encoding >=20 > I am not sure about this, nor how to check it really. > I can see the wchar_t type is 4-bytes in size, but maybe > that is different for very-old versions of macOS. Yeah, it's maybe not easy to check definitively. Some searching seems to indicate that macOS does use this though. > From my understanding, this is all fine because GDB is only using > this as an intermediate encoding, not expecting the host or target > to necessarily understand it natively. There are spots that use the wchar_t, for example in valprint.c. This is done essentially to access iswprint, I think. > > Also, will the approach taken in your patch also work on > > older versions of the OS? >=20 > I have tested on all of the 'currently supported' versions > of macOS and it seems to work, but I really don't understand > the platform well enough to guarantee it will work for every > possible past version. I was thinking maybe we could have this check the version, but I suppose it's better not to, so that gdb could be built on an older macOS and still work on a newer one... ? If that's so then I tend to think your patch is fine. --=20 You are receiving this mail because: You are on the CC list for the bug.=