From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12574 invoked by alias); 28 Apr 2016 10:55:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 12541 invoked by uid 89); 28 Apr 2016 10:55:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pa0-f47.google.com Received: from mail-pa0-f47.google.com (HELO mail-pa0-f47.google.com) (209.85.220.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 28 Apr 2016 10:54:56 +0000 Received: by mail-pa0-f47.google.com with SMTP id iv1so30857695pac.2 for ; Thu, 28 Apr 2016 03:54:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=bZaocoMm6YG6u3T4UAYHVyBrb3STAEqCvwPEKEREOR8=; b=mmKb/ZbOXWxtdaS4zMzANCpA9Ij5fDw7sc02FqcyTOjgyfguwkTctuN5A7lt66oNlZ wWrtHowrv62ET1VZVoEZTwc9Y6ZVxbzxOBcs7msB8qGxeNX8hpAP5NMdPmZawfEQ0ne4 Nb64EPEaCDz9RwjhkNgA3aZCcAFbEdvMEKUQsH/kIjiwitkClTD26fcDj4YhmGajL6LP umvb1yF8543tpMUQxYCU0fzyW41pM93OfFop1+7ByOOMY6jbVU9+OE7qS3s/JWQaVyOu l246q21W8saYs+IZd5xCzajjxh1yvVYiHGmn0x7VhVUuH0fR2vtFbIVFxXaXzpJLBmaz EL3Q== X-Gm-Message-State: AOPr4FXJkHq3lrXmg/KJ2xr32vQs59u552UitUFqtapzGrOFAJMpve8X2AAJ/eiPxg1HpQ== X-Received: by 10.66.141.103 with SMTP id rn7mr19218399pab.70.1461840894517; Thu, 28 Apr 2016 03:54:54 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id s197sm13970039pfs.62.2016.04.28.03.54.51 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 28 Apr 2016 03:54:53 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [RFC] Remove need_step_over from struct lwp_info References: <1461657497-12076-1-git-send-email-yao.qi@linaro.org> <89e60caa-7324-5bca-2cfa-ece25b46e7c3@redhat.com> Date: Thu, 28 Apr 2016 10:55:00 -0000 In-Reply-To: <89e60caa-7324-5bca-2cfa-ece25b46e7c3@redhat.com> (Pedro Alves's message of "Thu, 28 Apr 2016 11:10:21 +0100") Message-ID: <86shy6dmvb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00634.txt.bz2 Pedro Alves writes: > In any case, looks like this never worked upstream, so I'm super > fine with removing the field and cleaning this all up. OK, patch is pushed in. --=20 Yao (=E9=BD=90=E5=B0=A7) =46rom f166f943f30a91792e8754cbca9d7652fc400aae Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Thu, 28 Apr 2016 11:52:23 +0100 Subject: [PATCH] Remove need_step_over from struct lwp_info Hi, I happen to see that field need_step_over in struct lwp_info is only used to print a debug info. need_step_over is set in linux_wait_1 when breakpoint_here is true, however, we check breakpoint_here too in need_step_over_p and do the step over. I think we don't need field need_step_over, and check breakpoint_here directly in need_step_over_p. This field was added in this patch https://sourceware.org/ml/gdb-patches/2010-03/msg00605.html and the code wasn't changed much since then. This patch is to remove it. gdb/gdbserver: 2016-04-28 Yao Qi * linux-low.h (struct lwp_info) : Remove. * linux-low.c (linux_wait_1): Update. (need_step_over_p): Likewise. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index efa0774..8e1e2fc 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -3267,14 +3267,8 @@ linux_wait_1 (ptid_t ptid, =20 if (bp_explains_trap) { - /* If we stepped or ran into an internal breakpoint, we've - already handled it. So next time we resume (from this - PC), we should step over it. */ if (debug_threads) debug_printf ("Hit a gdbserver breakpoint.\n"); - - if (breakpoint_here (event_child->stop_pc)) - event_child->need_step_over =3D 1; } } else @@ -4540,12 +4534,6 @@ need_step_over_p (struct inferior_list_entry *entry,= void *dummy) return 0; } =20 - if (!lwp->need_step_over) - { - if (debug_threads) - debug_printf ("Need step over [LWP %ld]? No\n", lwpid_of (thread)); - } - if (lwp->status_pending_p) { if (debug_threads) @@ -4571,8 +4559,6 @@ need_step_over_p (struct inferior_list_entry *entry, = void *dummy) "Old stop_pc was 0x%s, PC is now 0x%s\n", lwpid_of (thread), paddress (lwp->stop_pc), paddress (pc)); - - lwp->need_step_over =3D 0; return 0; } =20 @@ -4622,8 +4608,6 @@ need_step_over_p (struct inferior_list_entry *entry, = void *dummy) that find_inferior stops looking. */ current_thread =3D saved_thread; =20 - /* If the step over is cancelled, this is set again. */ - lwp->need_step_over =3D 0; return 1; } } diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h index d4946c1..6e7ddbd 100644 --- a/gdb/gdbserver/linux-low.h +++ b/gdb/gdbserver/linux-low.h @@ -365,10 +365,6 @@ struct lwp_info a exit-jump-pad-quickly breakpoint. This is it. */ struct breakpoint *exit_jump_pad_bkpt; =20 - /* True if the LWP was seen stop at an internal breakpoint and needs - stepping over later when it is resumed. */ - int need_step_over; - #ifdef USE_THREAD_DB int thread_known; /* The thread handle, used for e.g. TLS access. Only valid if