Browse Source

[GDB] Remove unused DR6 debug register variable

tags/v0.9.4
Stefan Hajnoczi 16 years ago
parent
commit
fe79edfc3d
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      src/arch/i386/core/gdbmach.c

+ 3
- 4
src/arch/i386/core/gdbmach.c View File

44
 
44
 
45
 static struct hwbp hwbps [ 4 ];
45
 static struct hwbp hwbps [ 4 ];
46
 static gdbreg_t dr7 = DR7_CLEAR;
46
 static gdbreg_t dr7 = DR7_CLEAR;
47
-static gdbreg_t dr6;
48
 
47
 
49
 static struct hwbp *gdbmach_find_hwbp ( int type, unsigned long addr, size_t len ) {
48
 static struct hwbp *gdbmach_find_hwbp ( int type, unsigned long addr, size_t len ) {
50
 	struct hwbp *available = NULL;
49
 	struct hwbp *available = NULL;
131
 }
130
 }
132
 
131
 
133
 static void gdbmach_disable_hwbps ( void ) {
132
 static void gdbmach_disable_hwbps ( void ) {
134
-	/* Store and clear breakpoint status register */
135
-	__asm__ __volatile__ ( "movl %%dr6, %0\n" "movl %1, %%dr6\n" : "=r" ( dr6 ) : "r" ( DR6_CLEAR ) );
136
-
137
 	/* Store and clear hardware breakpoints */
133
 	/* Store and clear hardware breakpoints */
138
 	__asm__ __volatile__ ( "movl %0, %%dr7\n" : : "r" ( DR7_CLEAR ) );
134
 	__asm__ __volatile__ ( "movl %0, %%dr7\n" : : "r" ( DR7_CLEAR ) );
139
 }
135
 }
140
 
136
 
141
 static void gdbmach_enable_hwbps ( void ) {
137
 static void gdbmach_enable_hwbps ( void ) {
138
+	/* Clear breakpoint status register */
139
+	__asm__ __volatile__ ( "movl %0, %%dr6\n" : : "r" ( DR6_CLEAR ) );
140
+
142
 	/* Restore hardware breakpoints */
141
 	/* Restore hardware breakpoints */
143
 	__asm__ __volatile__ ( "movl %0, %%dr7\n" : : "r" ( dr7 ) );
142
 	__asm__ __volatile__ ( "movl %0, %%dr7\n" : : "r" ( dr7 ) );
144
 }
143
 }

Loading…
Cancel
Save