From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0UdCD2n4LWkbBw0AWB0awg (envelope-from ) for ; Mon, 01 Dec 2025 15:19:53 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=aX+gIiLE; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 39DAC1E0B3; Mon, 01 Dec 2025 15:19:53 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C59C61E048 for ; Mon, 01 Dec 2025 15:19:52 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 592EC48FD84C for ; Mon, 1 Dec 2025 20:19:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 592EC48FD84C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1764620392; bh=3slCl1heaYTEfnrILHOfk/BhzUujJP4pROMCNFCkmvY=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=aX+gIiLExizioy4cG/m+vooCotErtWMEooxcYfnqj6rTJDFuL1HEnZf7z5uvN1wHL QzNb9IPMRuNWpjEceuX4SwtmoOunEWVNfmbX9z8hDo7qKlBIbaxO08lmpa6BxQnoBR JCbHXtdVQzAJYrBVdOvzXrvl5xeiHZmur84t1oRg= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 89D734BCA400 for ; Mon, 1 Dec 2025 20:19:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 89D734BCA400 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 89D734BCA400 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764620358; cv=none; b=mbQYj/HOO8XBqIJsK50TsvuVG84y6bGlrL7M7pfv4zmSVvbnULCXgIKzgJltrHm8IGXrosry80owti0aFI5i9c1t8BRR41nDhLHeMxsvJEbUg/RNhBui51kRTD2yz3TmO4en6bEjBVRZqlp3VZEJQ8HwbQl60xtYfA+m8PlbWV4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764620358; c=relaxed/simple; bh=6Q+AVfxWYi2eyqBdVEUHAW03P+IXw3BUyndbivxEiwU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=tkFtEw/0+70H334DsIXV5ms/IHqMK7wO7c699oZJcCZJ/QwIi/edg/SwI3J5defco06IzF9f4BzwOpkb7Ti36wy/ej5JnD00xjiWNKuAstL7QQw8uFCRW0/b2n92Fxc5bJcvHRPFoYg7hnfZvBaNjvopkrx8aDOG9Npd5Gl6J10= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 89D734BCA400 Received: by simark.ca (Postfix) id 0A4011E048; Mon, 01 Dec 2025 15:19:17 -0500 (EST) Message-ID: <3188e560-bf2b-4b31-9347-9ed870fb3eb3@simark.ca> Date: Mon, 1 Dec 2025 15:19:17 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: GDB 16.3: is it possible to cross-debug an x64 core from ARM? To: psmith@gnu.org, gdb@sourceware.org References: <2f8e6564c0110db9be7ed9b5ab78ee5c9349ca0a.camel@gnu.org> Content-Language: en-US In-Reply-To: <2f8e6564c0110db9be7ed9b5ab78ee5c9349ca0a.camel@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb Reply-To: Simon Marchi Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On 2025-12-01 10:36, Paul Smith via Gdb wrote: > If I build an x86_64 GDB binary that has support for debugging ARM core > files, it works fine. The build is invoked (on x86_64) like: > > $ ../gdb-6.3/configure ... --enable-targets=aarch64-linux-gnu > ... > $ make -j$(nproc) > > There's no problem and the resulting GDB works both for native x86_64 > cores and ARM cores. > > But, if I try to build an aarch64 GDB (on an ARM system) that has > support for debugging x86_64 core files, the build fails like this: > > $ ../gdb-6.3/configure ... --enable-targets=x86_64-linux-gnu > ... > $ make -j$(nprocs) > ... > make[2]: *** No rule to make target '../sim/aarch64/libsim.a', needed by 'gdb'. Stop. > > If I use the same configure arguments but omitting --enable-targets > then I get a correctly built GDB that will work on ARM. > > Comparing sim/config.log from the ARM build without --enable-targets > (which works) versus the failing one, shows nothing too interesting; I > get the same messages etc. The only consequential difference is that > in the working version (no extra enabled targets) I see: > > SIM_ENABLE_ARCH_aarch64_FALSE='#' > SIM_ENABLE_ARCH_aarch64_TRUE='' > > while in the failing version (with x86_64 enabled target) I see: > > SIM_ENABLE_ARCH_aarch64_FALSE='' > SIM_ENABLE_ARCH_aarch64_TRUE='#' > > Which could have been guessed from the error message I suppose :). > > > Anyone have any further advice? I guess the next step would be to run > configure with sh -x and see if I can deduce where it gets confused > (assuming this is a supported configuration). I don't know why using `--enable-targets=...` makes the sim configure script decide not to build the simulator for aarch64. `--enable-targets` enables a target on top of the default one (in this case aarch64). So if the simulator is built and linked when not using `--enable-targets=...`, then I think it would make sense to do the same when using `--enable-targets...`. If your goal is to get something working right now, you can try --disable-sim, or use --target=x86_64-linux-gnu, which will produce a GDB that runs on aarch64 but only knows about debugging x86_64 targets and cores. Simon