From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.windriver.com", Issuer "Intel External Basic Issuing CA 3A" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A21E8B6EF7 for ; Thu, 29 Jul 2010 01:41:03 +1000 (EST) Message-ID: <4C5011A3.3020501@windriver.com> Date: Wed, 28 Jul 2010 06:16:51 -0500 From: Jason Wessel MIME-Version: 1.0 To: Michal Simek Subject: Re: [PATCH] powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE References: <1280308724-8402-1-git-send-email-monstr@monstr.eu> In-Reply-To: <1280308724-8402-1-git-send-email-monstr@monstr.eu> Content-Type: text/plain; charset=ISO-8859-1 Cc: KGDB Mailing List , linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 07/28/2010 04:18 AM, Michal Simek wrote: > kgdb_handle_breakpoint checks the first arch_kgdb_breakpoint > which is not known by gdb that's why is necessary jump over > it. The jump lenght is equal to BREAK_INSTR_SIZE that's > why is cleaner to use defined macro instead of hardcoded > non-described offset. > > Seems fine to me. I'll add this to the kgdb merge queue for 2.6.36. Jason. > Signed-off-by: Michal Simek > CC: Jason Wessel > CC: Benjamin Herrenschmidt > CC: linuxppc-dev@ozlabs.org > --- > arch/powerpc/kernel/kgdb.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c > index 82a7b22..7f61a3a 100644 > --- a/arch/powerpc/kernel/kgdb.c > +++ b/arch/powerpc/kernel/kgdb.c > @@ -129,7 +129,7 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs) > return 0; > > if (*(u32 *) (regs->nip) == *(u32 *) (&arch_kgdb_ops.gdb_bpt_instr)) > - regs->nip += 4; > + regs->nip += BREAK_INSTR_SIZE; > > return 1; > } >