From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MSKpNih1fGo3kyAAWB0awg (envelope-from ) for ; Wed, 12 Aug 2026 09:29:12 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=HN7F1xy2; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D90751E167; Wed, 12 Aug 2026 09:29:12 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 222891E09E for ; Wed, 12 Aug 2026 09:29:12 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AABD94BB3B80 for ; Wed, 12 Aug 2026 13:29:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AABD94BB3B80 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=HN7F1xy2 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by sourceware.org (Postfix) with ESMTPS id 5CEDE4BB3B97 for ; Wed, 12 Aug 2026 13:28:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5CEDE4BB3B97 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5CEDE4BB3B97 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786541324; cv=none; b=NptL3ZSRXHFNlWythMH7tcGLs+IhlPpBrQTHRJMvyEgOSLVg9jQ5kJBQmeWorLcz5HdYKr/blYYtScngWbvjIxzuOSXn920xZWU05JLGXGMboFNaPatBGTMxPjNxouzhWBrLDpyNNz3GE7JfvDwW4Yw7+87bHKoFLkYH2JsSCC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786541324; c=relaxed/simple; bh=cN3xTMsLnau2MhUHvSkJuatVD2XNmlCK56i2Lzl72jk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JhIKgBa/d+iJSvdT23u2mqjGNoPs/75A3TD7ozOZN7Ya4S3A2tWWZAOEVcv0rZRTjNukj4p+xn8EsCCwv74/XRAWpQJs4n56uIPdWqyCVgVQemKyWiS14YPT+mJHM9UmtWKYwcCvgtGApGtr6CtNw9b6bWQgAslWPJDo53Py2Ho= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=HN7F1xy2 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CEDE4BB3B97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1786541324; x=1818077324; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cN3xTMsLnau2MhUHvSkJuatVD2XNmlCK56i2Lzl72jk=; b=HN7F1xy2v2FAWt+uK9BOQIBUSqQkC42NN92vqImUs0+WAIP7h5SOUv/0 OBhlt+j9ZXncb2ibk1PlLs+/GWpGF4E7Vg3CayE+IHCh/zhaRZRfImCFT 2pJvEkl7V1JSzsnbKXiAUW4X7kCYn57QU0963zfTiy/I8IF8kxR1yrC25 zOBzrXUU2looFv9JPJItyBpasgqHflXMgxB8IpzXFXlmr8JfjMMnpsvpF rrdgrEzT/pkCqePoofLZzUls9HaCKyxaU1rVTS1a+Gst+2EoHC4YqTgAU 3Kko5kbvtvgtETkteZZdNAJDEX/5n8NyaYg7+btGtCFh5eeGXFT/86H5p Q==; X-CSE-ConnectionGUID: fb/tMmLHRBSnWb/wdh3aKA== X-CSE-MsgGUID: kX0qP2tWTcCtQ64eKXqlyw== X-IronPort-AV: E=McAfee;i="6800,10657,11872"; a="98457682" X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="98457682" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2026 06:28:44 -0700 X-CSE-ConnectionGUID: wL/YGC1TSRyp+x3+074Hlg== X-CSE-MsgGUID: FIpXcXnNSci+Y8tJOFnCKA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="267509957" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2026 06:28:43 -0700 From: Markus Metzger To: gdb-patches@sourceware.org Cc: Tankut Baris Aktemur Subject: [PATCH v4 11/44] gdb: revise the pid_to_exec_file target op Date: Wed, 12 Aug 2026 15:27:31 +0200 Message-ID: <20260812132805.380163-12-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260812132805.380163-1-markus.t.metzger@intel.com> References: <20260812132805.380163-1-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org From: Tankut Baris Aktemur Some targets, such as Intel GT, do not have the notion of an exec file. These targets may leave the pid_to_exec_file target op unimplemented, but from GDB's point of view, this means the exec file could not be determined, and GDB issues a warning. Extend the meaning of the pid_to_exec_file target op, so that if the exec file path is empty, it means that the target does not have exec files at all. This way, GDB can omit checking the exec file while also not issuing the warning. --- gdb/exec.c | 6 ++++++ gdb/target.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gdb/exec.c b/gdb/exec.c index f4c82519449..2a0626d6161 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -337,6 +337,12 @@ exec_file_locate_attach (int pid, int defer_bp_reset, int from_tty) return; } + if (*exec_file_target == '\0') + { + /* The target does not have the notion of an exec file. */ + return; + } + scoped_normalized_path path_storage (&exec_file_target); gdb::unique_xmalloc_ptr exec_file_host diff --git a/gdb/target.h b/gdb/target.h index 6d1c21f29f6..fd25afb12dc 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -2025,6 +2025,9 @@ extern gdb::array_view target_thread_info_to_thread_handle If the executable file cannot be determined, NULL is returned. + If the target does not have the notion of executable files, + an empty string is returned. + Else, a pointer to a character string containing the pathname is returned. This string should be copied into a buffer by the client if the string will not be immediately used, or if -- 2.43.0 ________________________________________ Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 (89) 99143-0 www.intel.de Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman Chairperson of the Supervisory Board: Sonja Pierer Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.