From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QdBRAQyawGQcQy8AWB0awg (envelope-from ) for ; Tue, 25 Jul 2023 23:59:08 -0400 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=YBM0w5kU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EC7A11E0C0; Tue, 25 Jul 2023 23:59:07 -0400 (EDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C9EB21E092 for ; Tue, 25 Jul 2023 23:59:05 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7588B3857C55 for ; Wed, 26 Jul 2023 03:59:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7588B3857C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1690343943; bh=PWCzkIf3j441f9kdU+PMCE07FYNWNcbGMx1zlzJG5+s=; h=Date:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=YBM0w5kUb4uWgPq1i2qoothH6S+/0NxfV0xfr6J86SgRrcdgXGf2v+RxgcmS+GW8O FrTV0UdGcGW/olSfAUnAM5k/+QQNkai3pUZy5kh45Z168Ha0JtrfP0gLg2wJMi9VBh /b166vXnIwyLgwZZfbH0PsprEkp7Gk3LZxPmBW4U= 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 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 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 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: , From: Kevin Buettner via Gdb-patches Reply-To: Kevin Buettner Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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