From patchwork Tue Jun 17 14:12:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 1528 Received: (qmail 16462 invoked by alias); 17 Jun 2014 14:53:05 -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 16398 invoked by uid 89); 17 Jun 2014 14:53:05 -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, 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 ESMTP; Tue, 17 Jun 2014 14:53:04 +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 s5HED6Ht021058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 17 Jun 2014 10:13:07 -0400 Received: from blade.nx (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5HED6Xh018294 for ; Tue, 17 Jun 2014 10:13:06 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id C0B5C262483 for ; Tue, 17 Jun 2014 15:13:04 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [PATCH 08/15] Rename maint_show_dr to debug_hw_points Date: Tue, 17 Jun 2014 15:12:51 +0100 Message-Id: <1403014378-4349-9-git-send-email-gbenson@redhat.com> In-Reply-To: <1403014378-4349-1-git-send-email-gbenson@redhat.com> References: <1403014378-4349-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes This commit renames maint_show_dr to debug_hw_points in i386-nat.c. gdb/ 2014-06-17 Gary Benson * i386-nat.c (maint_show_dr): Renamed to debug_hw_points. All uses updated. --- gdb/ChangeLog | 5 +++++ gdb/i386-nat.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c index 91d868d..6520549 100644 --- a/gdb/i386-nat.c +++ b/gdb/i386-nat.c @@ -37,6 +37,9 @@ The functions below implement debug registers sharing by reference counts, and allow to watch regions up to 16 bytes long. */ +/* Whether or not to print the mirrored debug registers. */ +static int debug_hw_points; + /* Function used for printing mirrored debug registers. */ #define debug_printf(fmt, args...) \ fprintf_unfiltered (gdb_stdlog, fmt, ##args); @@ -256,9 +259,6 @@ i386_forget_process (pid_t pid) } } -/* Whether or not to print the mirrored debug registers. */ -static int maint_show_dr; - /* Types of operations supported by i386_handle_nonaligned_watchpoint. */ typedef enum { WP_INSERT, WP_REMOVE, WP_COUNT } i386_wp_op_t; @@ -588,7 +588,7 @@ i386_insert_watchpoint (struct target_ops *self, if (retval == 0) i386_update_inferior_debug_regs (&local_state); - if (maint_show_dr) + if (debug_hw_points) i386_show_dr (state, "insert_watchpoint", addr, len, type); return retval; @@ -628,7 +628,7 @@ i386_remove_watchpoint (struct target_ops *self, if (retval == 0) i386_update_inferior_debug_regs (&local_state); - if (maint_show_dr) + if (debug_hw_points) i386_show_dr (state, "remove_watchpoint", addr, len, type); return retval; @@ -721,12 +721,12 @@ i386_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p) { addr = i386_dr_low.get_addr (i); rc = 1; - if (maint_show_dr) + if (debug_hw_points) i386_show_dr (state, "watchpoint_hit", addr, -1, hw_write); } } - if (maint_show_dr && addr == 0) + if (debug_hw_points && addr == 0) i386_show_dr (state, "stopped_data_addr", 0, 0, hw_write); if (rc) @@ -763,7 +763,7 @@ i386_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch, if (retval == 0) i386_update_inferior_debug_regs (&local_state); - if (maint_show_dr) + if (debug_hw_points) i386_show_dr (state, "insert_hwbp", addr, 1, hw_execute); return retval; @@ -789,7 +789,7 @@ i386_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch, if (retval == 0) i386_update_inferior_debug_regs (&local_state); - if (maint_show_dr) + if (debug_hw_points) i386_show_dr (state, "remove_hwbp", addr, 1, hw_execute); return retval; @@ -825,7 +825,7 @@ add_show_debug_regs_command (void) /* A maintenance command to enable printing the internal DRi mirror variables. */ add_setshow_boolean_cmd ("show-debug-regs", class_maintenance, - &maint_show_dr, _("\ + &debug_hw_points, _("\ Set whether to show variables that mirror the x86 debug registers."), _("\ Show whether to show variables that mirror the x86 debug registers."), _("\ Use \"on\" to enable, \"off\" to disable.\n\