From patchwork Fri Jul 25 15:22:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 2176 Received: (qmail 2296 invoked by alias); 25 Jul 2014 15:22:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 2285 invoked by uid 89); 25 Jul 2014 15:22:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 25 Jul 2014 15:22:36 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6PFMY7C015069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 25 Jul 2014 11:22:34 -0400 Received: from barimba.redhat.com (ovpn-113-99.phx2.redhat.com [10.3.113.99]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6PFMXCx021536; Fri, 25 Jul 2014 11:22:33 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] properly parenthesize two macros Date: Fri, 25 Jul 2014 09:22:27 -0600 Message-Id: <1406301747-25855-1-git-send-email-tromey@redhat.com> I happened to notice that a couple of macros in target.h weren't properly using parens and as a result had a strange definition. This patch adds the parens and then fixes the macros to be written as must have been intended. Tested by rebuilding. I'm pushing this as obvious. 2014-07-25 Tom Tromey * target.h (target_stopped_data_address) (target_watchpoint_addr_within_range): Use "->", not ".". Fix parentheses. --- gdb/ChangeLog | 6 ++++++ gdb/target.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/target.h b/gdb/target.h index bcf97d9..29a1f01 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1822,12 +1822,12 @@ extern int target_ranged_break_num_registers (void); target_stopped_by_watchpoint, in such case place it to *ADDR_P. Only the INFERIOR_PTID task is being queried. */ #define target_stopped_data_address(target, addr_p) \ - (*target.to_stopped_data_address) (target, addr_p) + (*(target)->to_stopped_data_address) (target, addr_p) /* Return non-zero if ADDR is within the range of a watchpoint spanning LENGTH bytes beginning at START. */ #define target_watchpoint_addr_within_range(target, addr, start, length) \ - (*target.to_watchpoint_addr_within_range) (target, addr, start, length) + (*(target)->to_watchpoint_addr_within_range) (target, addr, start, length) /* Return non-zero if the target is capable of using hardware to evaluate the condition expression. In this case, if the condition is false when