From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aFvDI+tWkWSDyggAWB0awg (envelope-from ) for ; Tue, 20 Jun 2023 03:36:11 -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=UXLIeH9G; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 849D41E0BB; Tue, 20 Jun 2023 03:36:11 -0400 (EDT) Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 723C11E00F for ; Tue, 20 Jun 2023 03:36:09 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BCEEE3857C48 for ; Tue, 20 Jun 2023 07:36:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCEEE3857C48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1687246568; bh=jeL92NWr8Uo/+Mm/rMw7CQU3fQAPEeVe2E+EUqzEPzA=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=UXLIeH9GGx3IJOrKS9QIQ8uiy9zH192ef4XY6VNkeCENkE3gBsuvX2NYGgGhaKDx+ 4/k+D/rLFTSJX+tZ5bbvayksKYw6WuEvwXqbAk0Mr/dwUbrF14FPS0fiXbBpwJmRwF VgEfDK7oFNGSbVi9P7SqrLxdYTbttY/p94TbnmPY= 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 3751E3858D1E for ; Tue, 20 Jun 2023 07:35:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3751E3858D1E Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-529-6cqBmf9MOPeu6zz07Jpi_A-1; Tue, 20 Jun 2023 03:35:47 -0400 X-MC-Unique: 6cqBmf9MOPeu6zz07Jpi_A-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f9b0f64149so9014745e9.0 for ; Tue, 20 Jun 2023 00:35:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687246546; x=1689838546; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jeL92NWr8Uo/+Mm/rMw7CQU3fQAPEeVe2E+EUqzEPzA=; b=lrZ0J1ESOa/YhFg0Fn2OhMrZnCX5LDMPb/FUE7A4GNE4eMOBc5yV4EbY47hsuDF3c6 2E4SZwbtZxAGpJkBFtq8kobVziAIUGzAGVNBsCy8bOaiAVFX+RJFLuY7gJ2DDvLvZbYi Q7AoEPmWDDTF2sGPHXUDPv7uT1g3sbJRZ6BeQb+uueoVhr7uz6x7cy+oUvELCrbqeGKx X0UjPRlIastay6aw23AM0c2RORJ6WMb37lGLbYtoFNgNpcRVH+U++Alr0+j0zwFPjdhj eHCZyrTgGQ6jyU4vjoA45f4FXdessBtmWJrTQreXU8WD9phQ7xuk06TWWzsajhsKpAER 4ACg== X-Gm-Message-State: AC+VfDy/GD9MSVQxUHAzCQjqiN106yfpvhSUmz1SIhKECnNlQrm3LxSE rRbFZkJeVeniCexZZNG3c6FX5c0OVi2TMU3IbSM8b/lqBuRpu6x07+DEzu6wVSqtbmuxeFI1Wgo 3wU8V1U6WAI1g3poHefecbaV4IyrbhA== X-Received: by 2002:a1c:7203:0:b0:3f6:774:fdc with SMTP id n3-20020a1c7203000000b003f607740fdcmr10468081wmc.18.1687246546323; Tue, 20 Jun 2023 00:35:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6qNoP9BQWjE1ouRotQGcgz+1Wwx4ZXIwAFk44F+QlZyzQEYaiUN787YsHlJGXKgd508myMDQ== X-Received: by 2002:a1c:7203:0:b0:3f6:774:fdc with SMTP id n3-20020a1c7203000000b003f607740fdcmr10468069wmc.18.1687246546033; Tue, 20 Jun 2023 00:35:46 -0700 (PDT) Received: from [192.168.0.129] (ip-94-112-225-44.bb.vodafone.cz. [94.112.225.44]) by smtp.gmail.com with ESMTPSA id y10-20020a5d4aca000000b0030ae6432504sm1334772wrs.38.2023.06.20.00.35.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jun 2023 00:35:45 -0700 (PDT) Message-ID: <50177562-7c96-ec44-5452-b5d3c5ae6a0e@redhat.com> Date: Tue, 20 Jun 2023 09:35:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] [patch] gdbserver assert error on arm platform To: "Yan, Zhiyong" , "gdb-patches@sourceware.org" Cc: "tom@tromey.com" References: <20230511062001.2745878-1-zhiyong.yan@windriver.com> In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, 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: Bruno Larsen via Gdb-patches Reply-To: Bruno Larsen Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi Zhiyong, Kevin has posted a review back in may 11th: https://inbox.sourceware.org/gdb-patches/20230511140407.0a0977fb@f37-zws-nv/ -- Cheers, Bruno On 19/06/2023 03:50, Yan, Zhiyong wrote: > Hi, > Did this patch get a chance of review ? > > Thanks! > Zhiyong > > > > -----Original Message----- > From: zhiyong.yan@windriver.com > Sent: Thursday, May 11, 2023 2:20 PM > To: gdb-patches@sourceware.org > Cc: tom@tromey.com; Yan, Zhiyong > Subject: [PATCH] [patch] gdbserver assert error on arm platform > > From: Zhiyong Yan > > Bugzilla 30387 has given the steps of producing this issue on arm platform. > Gdb should not assume pending threads always generate “a non-gdbserver trap event”, a “Signal 17” event could happen. > Now that resume_stopped_resumed_lwps() -> may_hw_step() assumes that the break point must already exist, resume_one_thread() should ensure the software breaking point is installed although the thread is pending. > > LINK: https://sourceware.org/bugzilla/show_bug.cgi?id=30387 > > Signed-off-by: Zhiyong Yan zhiyong.yan@windriver.com > --- > gdbserver/linux-low.cc | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index e6a39202a98..543daf66376 100644 > --- a/gdbserver/linux-low.cc > +++ b/gdbserver/linux-low.cc > @@ -4670,8 +4670,16 @@ linux_process_target::resume_one_thread (thread_info *thread, > > proceed_one_lwp (thread, NULL); > } > - else > - threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); > + else{ > + threads_debug_printf ("leaving LWP %ld stopped", lwpid_of (thread)); > + if(thread->last_resume_kind == resume_step){ > + /* > + * If resume_step is required by GDB, install single-step breakpoint. > + */ > + if (supports_software_single_step()) > + install_software_single_step_breakpoints (lwp); > + } > + } > > thread->last_status.set_ignore (); > lwp->resume = NULL; > -- > 2.25.1 >