From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 253ED385783D; Mon, 7 Dec 2020 14:17:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 253ED385783D From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug c++/27006] Segmentation fault when using gdb command 'call' Date: Mon, 07 Dec 2020 14:17:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: simark at simark dot ca 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 14:17:00 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27006 --- Comment #4 from Simon Marchi --- Hi Stanislav, Ok, this is mostly related to this patch series that was merged earlier this year: https://sourceware.org/pipermail/gdb-patches/2020-March/166678.html Before, there wasn't any distinction between a cygwin binary and a pure Win= dows binary compiled with mingw. That was problematic, because the "long" type = size is different on the two, and GDB needs to know which one it is. The decision of choosing the windows vs cygwin osabi happens here (assuming= you are on x86-64): https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dblob;f=3Dgdb/amd64-win= dows-tdep.c;h=3Da6563cc9e1203fbd83090a6c0f38d9de18f9153c;hb=3DHEAD#l1355 We check if the binary is linked with the cygwin dll, using this function h= ere: https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dblob;f=3Dgdb/windows-t= dep.c;h=3Da7cab7bc6570e6b2ad1edf0bd64475f5ae958d9d;hb=3DHEAD#l995 So, if you load a non-cygwin binary in GDB, it's probably expected that it = is recognized as "Windows" and not "Cygwin". When you debug using your simulator, do you use the remote target ("target remote ..." or "target extended-remote ...")? If so, I think it's possible= for the remote target to tell which osabi to use. Simon --=20 You are receiving this mail because: You are on the CC list for the bug.=