Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 08/15] Rename maint_show_dr to debug_hw_points
Date: Tue, 17 Jun 2014 14:53:00 -0000	[thread overview]
Message-ID: <1403014378-4349-9-git-send-email-gbenson@redhat.com> (raw)
In-Reply-To: <1403014378-4349-1-git-send-email-gbenson@redhat.com>

This commit renames maint_show_dr to debug_hw_points in i386-nat.c.

gdb/
2014-06-17  Gary Benson  <gbenson@redhat.com>

	* 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\
-- 
1.7.1


  parent reply	other threads:[~2014-06-17 14:53 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 14:13 [PATCH 00/15] Refactor shared code in i386-{nat,low}.[ch] Gary Benson
2014-06-17 14:13 ` [PATCH 03/15] Remove unused macro Gary Benson
2014-06-17 15:35   ` Pedro Alves
2014-06-17 14:13 ` [PATCH 01/15] Whitespace changes Gary Benson
2014-06-17 15:23   ` Pedro Alves
2014-06-17 14:13 ` [PATCH 04/15] Comment changes Gary Benson
2014-06-17 15:45   ` Pedro Alves
2014-06-17 16:10     ` Gary Benson
2014-06-17 17:11       ` Pedro Alves
2014-06-17 14:40 ` [PATCH 06/15] Merge printing code Gary Benson
2014-06-17 16:01   ` Pedro Alves
2014-06-17 14:40 ` [PATCH 14/15] Create nat/i386-dregs.c Gary Benson
2014-06-17 16:56   ` Pedro Alves
2014-06-18 13:43     ` Gary Benson
2014-06-17 14:44 ` [PATCH 09/15] Merge i386_update_inferior_debug_regs Gary Benson
2014-06-17 16:06   ` Pedro Alves
2014-06-17 14:44 ` [PATCH 12/15] Create nat/i386-dregs.h Gary Benson
2014-06-17 16:48   ` Pedro Alves
2014-06-18 11:14     ` Gary Benson
2014-06-17 14:48 ` [PATCH 07/15] Merge error handling Gary Benson
2014-06-17 16:02   ` Pedro Alves
2014-06-17 14:48 ` [PATCH 11/15] Rename functions and make nonstatic as necessary Gary Benson
2014-06-17 16:13   ` Pedro Alves
2014-06-18 10:25   ` Siva Chandra
2014-06-18 13:30     ` Gary Benson
2014-06-18 13:55       ` Pedro Alves
2014-06-18 14:03         ` Siva Chandra
2014-06-18 14:09         ` Gary Benson
2014-06-18 14:18           ` Pedro Alves
2014-06-17 14:53 ` [PATCH 02/15] Remove unnecessary prototypes Gary Benson
2014-06-17 15:26   ` Pedro Alves
2014-06-17 14:53 ` [PATCH 10/15] Abstract i386_dr_low access Gary Benson
2014-06-17 16:10   ` Pedro Alves
2014-06-17 14:53 ` [PATCH 05/15] Add a const Gary Benson
2014-06-17 15:46   ` Pedro Alves
2014-06-17 14:53 ` Gary Benson [this message]
2014-06-17 16:03   ` [PATCH 08/15] Rename maint_show_dr to debug_hw_points Pedro Alves
2014-06-17 14:58 ` [PATCH 13/15] Move macros from i386-{nat,low}.c to i386-{nat,low}.h Gary Benson
2014-06-17 16:54   ` Pedro Alves
2014-06-18 11:33     ` Gary Benson
2014-06-18 11:50       ` Pedro Alves
2014-06-17 14:58 ` [PATCH 15/15] Buildsystem changes Gary Benson
2014-06-17 16:41   ` Pedro Alves
2014-06-17 17:00 ` [PATCH 00/15] Refactor shared code in i386-{nat,low}.[ch] Pedro Alves
2014-06-18 10:49   ` Gary Benson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403014378-4349-9-git-send-email-gbenson@redhat.com \
    --to=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox