From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by sourceware.org (Postfix) with ESMTPS id 4F44E386EC15 for ; Thu, 17 Mar 2022 17:59:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4F44E386EC15 X-IronPort-AV: E=McAfee;i="6200,9189,10289"; a="254495351" X-IronPort-AV: E=Sophos;i="5.90,188,1643702400"; d="scan'208";a="254495351" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2022 10:58:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,188,1643702400"; d="scan'208";a="516860909" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga006.jf.intel.com with ESMTP; 17 Mar 2022 10:58:50 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 17 Mar 2022 10:58:50 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Thu, 17 Mar 2022 10:58:50 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.47) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Thu, 17 Mar 2022 10:58:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aGbAnMf96P8YlD7/3t1fjWT/1hFQENSaOJr2DHXjJRnCa/nonL6m+c6EZF9f9VQ5tB5qrRnfKBv3kIqSSLj75g9tslCalPz1EX0lRcwKJsfQs80G3Rj9vq028FpGFL8Iveod4xaY3NkR9F0ek2DN3m7VgjfpunbLUUZb9yTEBvApf5AtAHUBlkmL1hPVuqqP8k781RJ72mdpQ5kyk0WoKQi62YWy8syQSBfSD5VnXGS3NvdxdN+S5bKhZPR/+gLquyDVcPuiJyV6qZ7jX8mVSEIHgGDxi85hP3Xm9X+iBYAGYROv7C+vPM2/guZmR47mTxwrrUJF+POSXRs2/Pbp7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kl/iIe3nrg58egOYYRSgp0roJSqGcGnPm1eT6niulL4=; b=ErNamNYCHrAg2Nck55wzn+AdmfFFsBQ9Df8TYh3uQ3IRKsziEMB9RmA5x3T6TnNOAK57uEaS4gTbcPMTUFqRmCZg5IBX/wV+eX3UTHP80ew7Qzu3xVdxGXwbh8WaVurqcsjLn/xfdZxeHH7x8atMpL+GZYBUXXTwOTfzdfqmGTNgpLAK48tKNps6tY/EwyNoj9nBBcA1LtD/+qbWukCf/NuGC7fy6DhCY2Yevyeb8XYM/oPaprn+54KYKAnbX4BgNsTqHyCFwxm0bFzkXqq7ZFzBYWobBxvhRNZL6QC6AGa3X/yoB+MQh3yemMeC/IwaO9pf8jN2vWaZr92IUNJiqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM8PR11MB5749.namprd11.prod.outlook.com (2603:10b6:8:10::15) by DM6PR11MB4547.namprd11.prod.outlook.com (2603:10b6:5:2a1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.14; Thu, 17 Mar 2022 17:58:48 +0000 Received: from DM8PR11MB5749.namprd11.prod.outlook.com ([fe80::8072:5ca1:297a:f7f9]) by DM8PR11MB5749.namprd11.prod.outlook.com ([fe80::8072:5ca1:297a:f7f9%5]) with mapi id 15.20.5081.017; Thu, 17 Mar 2022 17:58:48 +0000 From: "Metzger, Markus T" To: "Hannula, Ari" CC: "gdb-patches@sourceware.org" , ravitheja.addepally Subject: RE: [PATCH 2/5] [func_call] New tests for a btrace crash. Thread-Topic: [PATCH 2/5] [func_call] New tests for a btrace crash. Thread-Index: AQHYHoWwa69+1K4mrUeQjRb2u6wbS6zD/0Dg Date: Thu, 17 Mar 2022 17:58:48 +0000 Message-ID: References: <20220210135243.3127629-1-ari.hannula@intel.com> <20220210135243.3127629-3-ari.hannula@intel.com> In-Reply-To: <20220210135243.3127629-3-ari.hannula@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.401.20 dlp-product: dlpe-windows x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c42122f9-9dcf-46c8-353e-08da083fc9a3 x-ms-traffictypediagnostic: DM6PR11MB4547:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XPPpPshkuDfgBrWL7PgyF0ZqMSZzPKMBNI/RHVf3xNTjdp+UBeMrpp1Mb+ZhnWjwILWEgYceb7DHn4WgAqsImiYdY+njUa28Mn3mPER9xwz2sqwiZ6pR6A9S/1VODQxjPcNtHYaxg92ftrWCdgRtyDNdyRwwK/Vd7BwS+efYGLdcq5gt38GBIzZAKRlhxmT52uEUXn/J9fQrEG0D8uwF/c3RKHkZBcX/t3UOxZKqHW4tXDEzPiBgC882R8T4ow0umNDf2ErgSpomua9ZlnCr1R44BQe3CMpEMpAx5DV/S6j5auibRgRmOeJBqtDorNR2rWEyY6bnp7vP6rICLLQQOftZLQBJjjNhKIDU53cZijTK7esBe7g7ae10CYeAHG7yfEcEdMIT17qI+ECGS5qv/brYRMjxDFPamaBd8/9GKO8V1ClWrAIOhUpLWLd0Qgs4YtGQaKgM6uRiB3A6OpwhdejgGZlxeYcGRR9INimRFKHMe181dqJJzNKDinDiNt+NXOsdgHnbBFePL2HHApaG3M2T0gTneB0q2FnmYuWoQWT+CeWzlSgz4bS7ITFPoTV9yuhbRcBLckWzHtIxBo99SHP7JQEbTinLkOW4y4KNP3FAAd09sRsFmfXMCjVrzW7BJx2mxSDIww9Husoix1g2r2c7rw1vmCW3laniVo1BoWcrILcBj3BKEKtiX9t7QMDF/+Dx7+ijgPR/2BZXrQlGV66k/c77v63IeOX7ABiLxRDSHeSlh9/zksiLOcQgYdqT0e1bJ/alSJdwuPp/s/kVi4oKt0ClliAL/S+G+Ecm1IuCTT0975bh9v2EMVl+MQOi x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5749.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(38100700002)(55016003)(316002)(122000001)(6636002)(71200400001)(508600001)(9686003)(54906003)(7696005)(6506007)(38070700005)(76116006)(4326008)(6862004)(64756008)(66446008)(66476007)(66556008)(66946007)(186003)(107886003)(82960400001)(26005)(2906002)(33656002)(8676002)(86362001)(84970400001)(8936002)(5660300002)(52536014)(2004002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?osnKOLNWIDM5TZAF8UIXEB5x24vgjxq0A1rOdZCFPlW8+vMG8bzLCPkHiMJ0?= =?us-ascii?Q?uIvcRVU8h4bM9FF45L35OghgXkMsjeZNVnsfDgarfXXaejJgqmIXxXtWQ3r8?= =?us-ascii?Q?tT46b1Tv/AG34reM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?= =?us-ascii?Q?8QT2DGiuPIbILkhN2FyLQIq1KMijZ6ImE7wXrCAbwGeY0QHSGQKNra1O02Yl?= =?us-ascii?Q?0GdJCp4+tCneBJeo4WV2JwDafy4QdsOPVuxYP4DSwPNwG6g1PwsTpPAnYp0t?= =?us-ascii?Q?NlmaYFDD7xHnHT6IxzGfN8rbP2qG6FIQ+ZQVK7IwOuzDzxkKgIb6OD3LVeng?= =?us-ascii?Q?1eQ+e5taDbh+17vmFBGPBEBawuvJBdeuGTDzIjJm4iMoyyEnYqH1d0YlXIJW?= =?us-ascii?Q?zUYpy6gDC1ioMyiDhjldgBZ4YXF/3RMlurFc6XNtaKG8CtPtpalIC5DC7C4y?= =?us-ascii?Q?YcnjE7QVIymhbJkh/KoPGweIUQVSOshUlwo8CKicywkk5Lk818XxqRZ4iCub?= =?us-ascii?Q?EliWGPnXEZEbx1p3/iIH2mJ2SuyO6z6Bd3ztFzy9bzjt+idp2xhbf93ro2ZX?= =?us-ascii?Q?XTdu0Cuw0/Kj86F555+mtQMeW9CItAQSJMU0KQ8zt8xV/L/MjK4HiQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR11MB5749.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c42122f9-9dcf-46c8-353e-08da083fc9a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Mar 2022 17:58:48.4131 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ziIxTiQQuz32TDs3jdVuvKdwr/oc3hBUqz2H86HRUtcP1fuNp0uP8tqI3vzP7VHiYY6o3qmOYKTt2KpvVNCfRC+ShoIGrhOpPspSuDZ6RXs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4547 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2022 17:59:20 -0000 Hello Ari, >During remote debugging when stoppin in the start-routine of a pthread, Typo: stoppin >GDB crashes when attempting to display function-call-history. > >gdb/testsuite/ChangeLog: >2015-04-27 ravitheja.addepally > > * gdb.btrace/server-multithreaded-function-call-history.c: New file. > * gdb.btrace/server-multithreaded-function-call-history.exp: New file. GDB is no longer using change logs. This patch is quite old. Is GDB still crashing? Is there a fix for the cr= ash in your patch series? We shouldn't introduce failing tests before the fix. This hurts bisecting. It would be better to fix an issue and add a regression test in the same pa= tch. >diff --git a/gdb/testsuite/gdb.btrace/server-multithreaded-function-call- >history.exp b/gdb/testsuite/gdb.btrace/server-multithreaded-function-call- >history.exp >new file mode 100644 >index 0000000000..3af51c4228 >--- /dev/null >+++ b/gdb/testsuite/gdb.btrace/server-multithreaded-function-call-history.= exp >@@ -0,0 +1,61 @@ >+# This testcase is part of GDB, the GNU debugger. >+ >+# Copyright 2005-2022 Free Software Foundation, Inc. >+ >+# This program is free software; you can redistribute it and/or modify >+# it under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# This program is distributed in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with this program. If not, see . Could you briefly describe what this test is doing in an initial comment? >+ >+load_lib gdbserver-support.exp >+ >+standard_testfile >+ >+if { [skip_gdbserver_tests] } { There should be an untested message here... >+ return 0 >+} >+ >+if { [skip_btrace_tests] } { ...and here. >+ return -1 Not sure it matters but why are there different return values for the different skip checks? >+} >+ >+set opts { debug } >+if [info exists DEBUG] { >+ lappend opts "additional_flags=3D-DDEBUG" >+} >+ >+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" e= xecutable >$opts] !=3D "" } { >+ return -1 >+} I think you should be able to use prepare_for_testing and pass pthreads as build option similar to debug. >+ >+gdb_exit >+gdb_start >+gdb_load $binfile >+ >+# Make sure we're disconnected, in case we're testing with an >+# extended-remote board, therefore already connected. >+gdb_test "disconnect" ".*" >+ >+gdbserver_run "" >+gdb_reinitialize_dir $srcdir/$subdir >+ >+gdb_breakpoint main >+gdb_test "continue" "Breakpoint.* main .*" "continue to main" >+ >+gdb_test_no_output "record btrace" >+ >+gdb_breakpoint thread_function >+gdb_test "continue" "Breakpoint.* thread_function .*" "continue to >thread_function one" How about gdb_continue_to_breakpoint? >+ >+# test passes if this does not crash >+gdb_test "record function-call-history" ".*" >+ >+gdb_test "continue" "Breakpoint.* thread_function .*" "continue to >thread_function two" Is this last continue still necessary? Regards, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva = Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928