From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SCKYFkioX2hkXSMAWB0awg (envelope-from ) for ; Sat, 28 Jun 2025 04:31:04 -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=Pv11zqtf; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 579C61E11F; Sat, 28 Jun 2025 04:31:04 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-10.1 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,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 B98B81E11C for ; Sat, 28 Jun 2025 04:31:03 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A8603856DF0 for ; Sat, 28 Jun 2025 08:31:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A8603856DF0 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=Pv11zqtf Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by sourceware.org (Postfix) with ESMTPS id E0B1F385625E for ; Sat, 28 Jun 2025 08:28:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E0B1F385625E 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 E0B1F385625E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.19 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751099321; cv=none; b=EabEbLDRUspATz+0SKj0kKzBp4ypxcG5MqWrEg1+V/MO72pqwKvzJ9eruFUDechBPc6sSpV0mKCVdF6+M/6J1CE099Qrk6FLMNTYhTWg3uAB+stSLzFo680q5IemnGJDuzdwAdxlx/86Zl+aD6vyf30xEideNo2CXElMn+1EOyM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751099321; c=relaxed/simple; bh=zxb+/gfgApsow8o0SfmAvkMYjtzeutik6mkQD58LoFA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=nxOZi2BrLviB86hCHdDPkxV124uVI4aViH6t0ZEtbsKX+NwQBidNVjsFOuMEhm+hgPtt+CA3W6o2/KdvBPIF/q+4nnj3SPA/ZMgnqmyal1bFebR/196yMwVMOGZyBrFP3y2a4QVDQAwP18ctC6k0jl5FdO5CPNe8lOeCsgthGhs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0B1F385625E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1751099321; x=1782635321; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zxb+/gfgApsow8o0SfmAvkMYjtzeutik6mkQD58LoFA=; b=Pv11zqtfv3iDmRUd8Goll11V1qaqPMHQTISbTj1iJ2/it1E0rYZoTKxF 5+1vmaH0rr02PGrwR/VCxrH8sjpIC6lDZM4leVbVldBDZjGF7RHHsTXSz GRoyliYx6tq51MeZa50ymcNOkTax+nJvaop5xmxd7R8pEOgv/loY0i67+ rYnpA2oLwdwZ4X9tgg5wgqY0ADkaEqkwwWRKLt6DiAJCbBuECbsj2Z+K1 saGnljOJ03kipHL3GFWluTLLqf+KfeuCc0U6P5jFqY12VJpuPtjBb16j5 4fJNIm5jNlQ7VHRz4ownkplWpQuh2cwf0M2IhBaawfCbslGp8XJgHmPtK w==; X-CSE-ConnectionGUID: JXILzLtLTDuVjU/rll6olA== X-CSE-MsgGUID: g4XYbahLS02zjenyhgPx+Q== X-IronPort-AV: E=McAfee;i="6800,10657,11477"; a="53271316" X-IronPort-AV: E=Sophos;i="6.16,272,1744095600"; d="scan'208";a="53271316" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2025 01:28:40 -0700 X-CSE-ConnectionGUID: ZWZcEZ/ISQO3FWcK4w2hDQ== X-CSE-MsgGUID: FrPBviRbRJOVAycQXdLIHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,272,1744095600"; d="scan'208";a="183917661" Received: from 0007e934a912.jf.intel.com (HELO localhost) ([10.165.58.208]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2025 01:28:40 -0700 From: Christina Schimpe To: gdb-patches@sourceware.org Cc: thiago.bauermann@linaro.org, luis.machado@arm.com Subject: [PATCH v5 01/12] gdb, testsuite: Extend core_find procedure to save program output. Date: Sat, 28 Jun 2025 01:27:59 -0700 Message-ID: <20250628082810.332526-2-christina.schimpe@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250628082810.332526-1-christina.schimpe@intel.com> References: <20250628082810.332526-1-christina.schimpe@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Thiago Jung Bauermann The change comes from ARM's GCS series: [PATCH v3 5/9] GDB, gdbserver: aarch64-linux: Initial Guarded Control Stack support. We need it for testing coredmp files, too. So include it in this patch series. Abridged-by: Christina Schimpe --- This is the patch mentioned above: https://sourceware.org/pipermail/gdb-patches/2025-June/218892.html Minus everything except for the change in gdb.exp's corefind procedure. --- gdb/testsuite/lib/gdb.exp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3f1cd55d727..bb17c4e91a5 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -9352,7 +9352,13 @@ proc remove_core {pid {test ""}} { } } -proc core_find {binfile {deletefiles {}} {arg ""}} { +# Runs ${binfile} expecting it to crash and generate a core file. +# If DELETEFILES is provided, remove these files after running the program. +# If ARG is provided, pass it as a command line argument to the program. +# If OUTPUT_FILE is provided, save the program output to it. +# Returns the name of the core dump, or empty string if not found. + +proc core_find {binfile {deletefiles {}} {arg ""} {output_file "/dev/null"}} { global objdir subdir set destcore "$binfile.core" @@ -9374,7 +9380,7 @@ proc core_find {binfile {deletefiles {}} {arg ""}} { set found 0 set coredir [standard_output_file coredir.[getpid]] file mkdir $coredir - catch "system \"(cd ${coredir}; ulimit -c unlimited; ${binfile} ${arg}; true) >/dev/null 2>&1\"" + catch "system \"(cd ${coredir}; ulimit -c unlimited; ${binfile} ${arg}; true) >${output_file} 2>&1\"" # remote_exec host "${binfile}" set binfile_basename [file tail $binfile] foreach i [list \ -- 2.43.0