From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 64068385800A; Sat, 11 Feb 2023 08:04:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64068385800A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676102697; bh=ZV9SzBsQnxnZdGFytpIlOuBBvVWLDYPvwA5Z+zjtM6k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MNM3Qh//AHveWx8WYtNRv7vm1pHhlPK2hU5LakfcDzdd+mmLv6XyL+1gzumlAzXFv paVGVsPWJMndtygwNuAvqgOJSQLlNY+409SN+NdluuGPrRCpZyJsvOlqH1BF6WbwcU pcWw3Mu+jpGfARy1buhg49/PpUuq3R04itbrpniw= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/30102] [gdb/tdep, amd64] Disable i386 unwinders Date: Sat, 11 Feb 2023 08:04:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D30102 --- Comment #4 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Daf0d0f34d8bf= 7482e598308b54e7ba0ae9b0c349 commit af0d0f34d8bf7482e598308b54e7ba0ae9b0c349 Author: Tom de Vries Date: Sat Feb 11 09:04:51 2023 +0100 [gdb/tdep] Don't use i386 unwinder for amd64 For i386 we have these unwinders: ... $ gdb -q -batch -ex "set arch i386" -ex "maint info frame-unwinders" The target architecture is set to "i386". dummy DUMMY_FRAME dwarf2 tailcall TAILCALL_FRAME inline INLINE_FRAME i386 epilogue NORMAL_FRAME dwarf2 NORMAL_FRAME dwarf2 signal SIGTRAMP_FRAME i386 stack tramp NORMAL_FRAME i386 sigtramp SIGTRAMP_FRAME i386 prologue NORMAL_FRAME ... and for amd64: ... $ gdb -q -batch -ex "set arch i386:x86-64" -ex "maint info frame-unwind= ers" The target architecture is set to "i386:x86-64". dummy DUMMY_FRAME dwarf2 tailcall TAILCALL_FRAME inline INLINE_FRAME python NORMAL_FRAME amd64 epilogue NORMAL_FRAME i386 epilogue NORMAL_FRAME dwarf2 NORMAL_FRAME dwarf2 signal SIGTRAMP_FRAME amd64 sigtramp SIGTRAMP_FRAME amd64 prologue NORMAL_FRAME i386 stack tramp NORMAL_FRAME i386 sigtramp SIGTRAMP_FRAME i386 prologue NORMAL_FRAME ... ISTM me there's no reason for the i386 unwinders to be there for amd64. Furthermore, there's a generic need to play around with enabling and disabling unwinders, see PR8434. Currently, that's only available for both the dwarf2 unwinders at once using "maint set dwarf unwinders on/off". If I manually disable the "amd64 epilogue" unwinder, the "i386 epilogue" unwinder becomes active and gives the wrong answer, while I'm actually interested in the result of the dwarf2 unwinder. Of course I can also manually disable the "i386 epilogue", but I take the fact that I have t= o do that as evidence that on amd64, the "i386 epilogue" is not only unnecessary, but in the way. Fix this by only adding the i386 unwinders if "info.bfd_arch_info->bits_per_word =3D=3D 32". Note that the x32 abi (x86_64/-mx32): - has the same unwinder list as amd64 (x86_64/-m64) before this commit, - has info.bfd_arch_info->bits_per_word =3D=3D 64, the same as amd64, a= nd consequently, - has the same unwinder list as amd64 after this commit. Tested on x86_64-linux, -m64 and -m32. Not tested with -mx32. Reviewed-By: John Baldwin PR tdep/30102 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30102 --=20 You are receiving this mail because: You are on the CC list for the bug.=