Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755177Ab1E3JwA (ORCPT ); Mon, 30 May 2011 05:52:00 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:38621 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753317Ab1E3Jv7 (ORCPT ); Mon, 30 May 2011 05:51:59 -0400 Message-ID: <4DE3688A.4040600@mvista.com> Date: Mon, 30 May 2011 13:51:06 +0400 From: Sergei Shtylyov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Mike Frysinger CC: kgdb-bugreport@lists.sourceforge.net, Jason Wessel , Andrew Morton , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Kgdb-bugreport] [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed References: <20110527151135.cd6f758a.sfr@canb.auug.org.au> <1306591465-9622-1-git-send-email-vapier@gentoo.org> In-Reply-To: <1306591465-9622-1-git-send-email-vapier@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1397 Lines: 42 Hello. On 28-05-2011 18:04, Mike Frysinger wrote: > The new instruction_pointer_set helper is defined for people who have > converted to asm-generic/ptrace.h, so don't use it generally unless > the arch needs it (in which case it has been converted). This should > fix building of kgdb tests for arches not yet converted. > Signed-off-by: Mike Frysinger > --- > drivers/misc/kgdbts.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c > index b0c5631..8cebec5 100644 > --- a/drivers/misc/kgdbts.c > +++ b/drivers/misc/kgdbts.c > @@ -304,7 +304,10 @@ static int check_and_rewind_pc(char *put_str, char *arg) > return 1; > } > /* Readjust the instruction pointer if needed */ > - instruction_pointer_set(&kgdbts_regs, ip + offset); > + ip += offset; Since '?p' is local, incrementing it is pointless here unless you have GDB_ADJUSTS_BREAK_OFFSET defined. Why not keep instruction_pointer_set() call as is? > +#ifdef GDB_ADJUSTS_BREAK_OFFSET > + instruction_pointer_set(&kgdbts_regs, ip); > +#endif > return 0; > } > WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/