From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Shdi5-00029w-FX for qemu-devel@nongnu.org; Thu, 21 Jun 2012 05:29:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Shdhz-0006lp-77 for qemu-devel@nongnu.org; Thu, 21 Jun 2012 05:29:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Shdhy-0006lc-V9 for qemu-devel@nongnu.org; Thu, 21 Jun 2012 05:29:47 -0400 Message-ID: <4FE2E97A.2040406@redhat.com> Date: Thu, 21 Jun 2012 11:29:30 +0200 From: Igor Mammedov MIME-Version: 1.0 References: <1340197164-9574-1-git-send-email-imammedo@redhat.com> <1340197164-9574-2-git-send-email-imammedo@redhat.com> <4FE1D015.2060803@siemens.com> In-Reply-To: <4FE1D015.2060803@siemens.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/5] target-i386: drop usage of prev_debug_excp_handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: "peter.maydell@linaro.org" , "aliguori@us.ibm.com" , "ehabkost@redhat.com" , "mtosatti@redhat.com" , "mdroth@linux.vnet.ibm.com" , "qemu-devel@nongnu.org" , "blauwirbel@gmail.com" , "avi@redhat.com" , "pbonzini@redhat.com" , "afaerber@suse.de" On 06/20/2012 03:28 PM, Jan Kiszka wrote: > 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 >> --- >> 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 > Thanks, I'll fix it. -- ----- Igor