diff mbox

[qom-next,03/12] target-i386: use global prev_debug_excp_handler instead of local one

Message ID 1338329426-28118-4-git-send-email-imammedo@redhat.com
State New
Headers show

Commit Message

Igor Mammedov May 29, 2012, 10:10 p.m. UTC
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 target-i386/helper.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

Comments

Andreas Färber May 30, 2012, 12:01 p.m. UTC | #1
Am 30.05.2012 00:10, schrieb Igor Mammedov:
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  target-i386/helper.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/target-i386/helper.c b/target-i386/helper.c
> index 2cc8097..da6f850 100644
> --- a/target-i386/helper.c
> +++ b/target-i386/helper.c
> @@ -941,8 +941,6 @@ int check_hw_breakpoints(CPUX86State *env, int force_dr6_update)
>      return hit_enabled;
>  }
>  
> -static CPUDebugExcpHandler *prev_debug_excp_handler;
> -
>  static void breakpoint_handler(CPUX86State *env)
>  {
>      CPUBreakpoint *bp;
> @@ -1166,8 +1164,7 @@ X86CPU *cpu_x86_init(const char *cpu_model)
>          inited = 1;
>          optimize_flags_init();
>  #ifndef CONFIG_USER_ONLY
> -        prev_debug_excp_handler =
> -            cpu_set_debug_excp_handler(breakpoint_handler);

Ditto.

Andreas

> +        cpu_set_debug_excp_handler(breakpoint_handler);
>  #endif
>      }
>      if (cpu_x86_register(cpu, cpu_model) < 0) {
diff mbox

Patch

diff --git a/target-i386/helper.c b/target-i386/helper.c
index 2cc8097..da6f850 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -941,8 +941,6 @@  int check_hw_breakpoints(CPUX86State *env, int force_dr6_update)
     return hit_enabled;
 }
 
-static CPUDebugExcpHandler *prev_debug_excp_handler;
-
 static void breakpoint_handler(CPUX86State *env)
 {
     CPUBreakpoint *bp;
@@ -1166,8 +1164,7 @@  X86CPU *cpu_x86_init(const char *cpu_model)
         inited = 1;
         optimize_flags_init();
 #ifndef CONFIG_USER_ONLY
-        prev_debug_excp_handler =
-            cpu_set_debug_excp_handler(breakpoint_handler);
+        cpu_set_debug_excp_handler(breakpoint_handler);
 #endif
     }
     if (cpu_x86_register(cpu, cpu_model) < 0) {