From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 668A73858C66 for ; Wed, 26 Jul 2023 03:58:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 668A73858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690343921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PWCzkIf3j441f9kdU+PMCE07FYNWNcbGMx1zlzJG5+s=; b=DIoGDzlqCglgSd+xRMoISjQDt5RvqG4jLpTnTkvxpxbKQisfeZfuD9JbehQT6w/LhEXmXi 4L9LCVcxPv5imXLsDlZXd95eaJBk0IKrMy3sxPNldNAJQf+LdyfyeCF0RZGJ417035uEOo kCPIkErJ/8Gq4jWUxkBYBIBtv8nOPnQ= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-573-a7GfpT7TNFObnTT6CNBFhw-1; Tue, 25 Jul 2023 23:58:37 -0400 X-MC-Unique: a7GfpT7TNFObnTT6CNBFhw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 58FA7380673F; Wed, 26 Jul 2023 03:58:37 +0000 (UTC) Received: from f37-zws-nv (unknown [10.22.32.87]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E96FFF7830; Wed, 26 Jul 2023 03:58:35 +0000 (UTC) Date: Tue, 25 Jul 2023 20:58:34 -0700 From: Kevin Buettner To: "Yan, Zhiyong" Cc: gdb-patches@sourceware.org, "luis.machado@arm.com" , "tom@tromey.com" Subject: Re: [PATCH] gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step Message-ID: <20230725205516.69d373d7@f37-zws-nv> In-Reply-To: References: <20230712032540.3110113-1-zhiyong.yan@windriver.com> <20230721134940.1ee4be68@f37-zws-nv> <20230724203650.43ddd754@f37-zws-nv> <20230724233207.59d9bca1@f37-zws-nv> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Zhiyong, I've finally been able to reproduce the bug on a Raspberry Pi. On a different SD card, I installed 32-bit Ubunutu server 20.04.5 LTS. It seems to have both a 32-bit (arm) kernel + 32-bit userland. I.e... kev@rpi4-3:~/Downloads/bz30387$ uname -m armv7l kev@rpi4-3:~/Downloads/bz30387$ file ./osm ./osm: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=81e7e2b5dfba0fe35f1f1a6af2ee558efbdafa7f, for GNU/Linux 3.2.0, with debug_info, not stripped (Compare the above output to that your reported on your Pi; on your Pi, uname -m reported aarch64 and the 'file' command showed 64-bit aarch64 binaries.) The internal error appears to be the same as that described in your bug report as well as on the gdb-patches list: /mesquite2/sourceware-git/rpi-arm-master/bld/../../worktree-master/gdbserver/linux-low.cc:2448: A problem internal to GDBserver has been detected. maybe_hw_step: Assertion `has_single_step_breakpoints (thread)' failed. Now that I've reproduced it, I want to retest gdb.threads/*.exp to see if any of those tests show the same failure. If not, I'll try to adapt your test case into one suitable for the gdb test suite. I have an alternate patch in mind, which I'll try out too. If it works out, I'll ask you to test it on your hardware... Kevin