diff mbox

[1/4] target-i386: drop usage of prev_debug_excp_handler

Message ID 1340632507-29692-2-git-send-email-imammedo@redhat.com
State New
Headers show

Commit Message

Igor Mammedov June 25, 2012, 1:55 p.m. UTC
Chains of exception handlers are currently unused feature, drop it
for now so as not to expose prev_debug_excp_handler at global
scope when moving tcg initialization into target-i386/cpu.c

Later we probably could re-invent better interface for this.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 target-i386/helper.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Andreas Färber Aug. 9, 2012, 3:15 p.m. UTC | #1
Am 25.06.2012 15:55, schrieb Igor Mammedov:
> Chains of exception handlers are currently unused feature, drop it
> for now so as not to expose prev_debug_excp_handler at global
> scope when moving tcg initialization into target-i386/cpu.c
> 
> Later we probably could re-invent better interface for this.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>

FWIW,

Reviewed-by: Andreas Färber <afaerber@suse.de>

/-F

> ---
>  target-i386/helper.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/target-i386/helper.c b/target-i386/helper.c
> index 2cc8097..b9384f6 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;
> @@ -965,8 +963,6 @@ static void breakpoint_handler(CPUX86State *env)
>                  break;
>              }
>      }
> -    if (prev_debug_excp_handler)
> -        prev_debug_excp_handler(env);
>  }
>  
>  typedef struct MCEInjectionParams {
> @@ -1166,8 +1162,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) {
>
diff mbox

Patch

diff --git a/target-i386/helper.c b/target-i386/helper.c
index 2cc8097..b9384f6 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;
@@ -965,8 +963,6 @@  static void breakpoint_handler(CPUX86State *env)
                 break;
             }
     }
-    if (prev_debug_excp_handler)
-        prev_debug_excp_handler(env);
 }
 
 typedef struct MCEInjectionParams {
@@ -1166,8 +1162,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) {