qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] target-i386: drop usage of prev_debug_excp_


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH 1/5] target-i386: drop usage of prev_debug_excp_handler
Date: Wed, 20 Jun 2012 15:28:53 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2012-06-20 14:59, Igor Mammedov wrote:
> Chain of exception handlers are currently unused feature, drop it
> for now to avoid moving prev_debug_excp_handler variable 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 <address@hidden>
> ---
>  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) {
> 

That's inconsistent. Let's remove this for all targets and drop the
return value of cpu_set_debug_excp_handler.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux





reply via email to

[Prev in Thread] Current Thread [Next in Thread]