From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway31.websitewelcome.com (gateway31.websitewelcome.com [192.185.144.80]) by sourceware.org (Postfix) with ESMTPS id 331E03857C79 for ; Tue, 21 Jul 2020 01:49:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 331E03857C79 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway31.websitewelcome.com (Postfix) with ESMTP id D06E948206B for ; Mon, 20 Jul 2020 20:49:18 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id xhPCjBSkgwgQAxhPCjGFhy; Mon, 20 Jul 2020 20:49:18 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NeSQOM+p2s4yUKz3Fs3q1c4Mug1fXBpqMMZqaAeUNSA=; b=WlEIXnXu/ISf7XaqrVxMrAYmYQ wE10yLbKF8eSN9BIyIZvxA99aCMjVDBzkpUnfxyOXFaBfZIpNdmcqquOw3qcicMsDi1L4sp+ZONU6 RI6NbeYzfSFOKvZqnw7oSaBb0; Received: from 174-16-104-48.hlrn.qwest.net ([174.16.104.48]:39580 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jxhPC-002QKw-5G; Mon, 20 Jul 2020 19:49:18 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 8/8] Turn target_have_steppable_watchpoint into function-like macro Date: Mon, 20 Jul 2020 19:49:14 -0600 Message-Id: <20200721014914.29937-9-tom@tromey.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200721014914.29937-1-tom@tromey.com> References: <20200721014914.29937-1-tom@tromey.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.104.48 X-Source-L: No X-Exim-ID: 1jxhPC-002QKw-5G X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-104-48.hlrn.qwest.net (bapiya.Home) [174.16.104.48]:39580 X-Source-Auth: tom+tromey.com X-Email-Count: 9 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3034.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_ABUSEAT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Tue, 21 Jul 2020 01:49:20 -0000 This changes the object-like macro target_have_steppable_watchpoint into a function-like macro. 2020-07-20 Tom Tromey * infrun.c (displaced_step_fixup, thread_still_needs_step_over) (handle_signal_stop): Update. * procfs.c (procfs_target::insert_watchpoint): Update. * target.h (target_have_steppable_watchpoint): Now a function-like macro. --- gdb/ChangeLog | 8 ++++++++ gdb/infrun.c | 6 +++--- gdb/procfs.c | 2 +- gdb/target.h | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index ff9b34f12fd..cbc92568459 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1887,7 +1887,7 @@ displaced_step_fixup (thread_info *event_thread, enum gdb_signal signal) if (signal == GDB_SIGNAL_TRAP && !(target_stopped_by_watchpoint () && (gdbarch_have_nonsteppable_watchpoint (displaced->step_gdbarch) - || target_have_steppable_watchpoint))) + || target_have_steppable_watchpoint ()))) { /* Fix up the resulting state. */ gdbarch_displaced_step_fixup (displaced->step_gdbarch, @@ -2842,7 +2842,7 @@ thread_still_needs_step_over (struct thread_info *tp) what |= STEP_OVER_BREAKPOINT; if (tp->stepping_over_watchpoint - && !target_have_steppable_watchpoint) + && !target_have_steppable_watchpoint ()) what |= STEP_OVER_WATCHPOINT; return what; @@ -6092,7 +6092,7 @@ handle_signal_stop (struct execution_control_state *ecs) /* If necessary, step over this watchpoint. We'll be back to display it in a moment. */ if (stopped_by_watchpoint - && (target_have_steppable_watchpoint + && (target_have_steppable_watchpoint () || gdbarch_have_nonsteppable_watchpoint (gdbarch))) { /* At this point, we are stopped at an instruction which has diff --git a/gdb/procfs.c b/gdb/procfs.c index d3085a20fce..21de548bf41 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -3087,7 +3087,7 @@ procfs_target::insert_watchpoint (CORE_ADDR addr, int len, enum target_hw_bp_type type, struct expression *cond) { - if (!target_have_steppable_watchpoint + if (!target_have_steppable_watchpoint () && !gdbarch_have_nonsteppable_watchpoint (target_gdbarch ())) /* When a hardware watchpoint fires off the PC will be left at the instruction following the one which caused the diff --git a/gdb/target.h b/gdb/target.h index 14c0aa366b8..bc48e5a4678 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1987,7 +1987,7 @@ extern gdb::byte_vector target_thread_info_to_thread_handle /* Non-zero if we have steppable watchpoints */ -#define target_have_steppable_watchpoint \ +#define target_have_steppable_watchpoint() \ (current_top_target ()->have_steppable_watchpoint ()) /* Provide defaults for hardware watchpoint functions. */ -- 2.17.2