From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 45D0B38708D2; Wed, 12 Jun 2024 10:21:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45D0B38708D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1718187670; bh=onbBmJ1rvmcnxiEMZhvkxe/z0rW7aPgp0km0whgn8ks=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fZV6gx+ZdeU8V6ZT9Ny37OGzrbcJbTn4qWjD/lPwJ1J25KkU1SZqFTZm77o9+6h9p CdPMdvovpbY1sOZaFakmen5fpfvGGw2s/h7lwC7Aige3vr/NbHVBS8A6asW0FlySGa Le2jtsirXyrMWZCE33GLFI7LWSovRvCEKdHRhkRE= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/31853] GDB's use of iconv does not work with macOS Sonoma Date: Wed, 12 Jun 2024 10:21:09 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 16.1 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 #9 from Sourceware Commits --- The gdb-15-branch branch has been updated by Ciaran Woodward : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df41400ee71f8= cfa40b4fb784cbba231394b9c698 commit f41400ee71f8cfa40b4fb784cbba231394b9c698 Author: Ciaran Woodward Date: Mon Jun 10 16:52:37 2024 +0100 Fix printing strings on macOS Sonoma On macOS sonoma, printing a string would only print the first character. For instance, if there was a 'const char *s =3D "foobar"', then the 'print s' command would print '$1 =3D "f"' rather than the expected '$1 =3D "foobar"'. It seems that this is due to Apple silently replacing the version of libiconv they ship with the OS to one which silently fails to handle the 'outbytesleft' parameter correctly when using 'wchar_t' as a target encoding. This specifically causes issues when using iterating through a string as wchar_iterator does. This bug is visible even if you build for an old version of macOS, but then run on Sonoma. Therefore this fix in the code applies generally to macOS, and not specific to building on Sonoma. Building for an older version and expecting forwards compatibility is a common situation on macOS. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31853 Approved-By: Tom Tromey (cherry picked from commit bb2981798f54e6eb30e46fb11cda2ca49561ffd3) --=20 You are receiving this mail because: You are on the CC list for the bug.=