Skip to content

Commit

Permalink
powerpc/kgdb: Bail out of KGDB when we've been triggered
Browse files Browse the repository at this point in the history
We need to skip a breakpoint exception when it occurs after
a breakpoint has already been removed.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Tiejun Chen authored and Benjamin Herrenschmidt committed Aug 24, 2012
1 parent 572b411 commit 949616c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions arch/powerpc/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,21 @@ static int computeSignal(unsigned int tt)
return SIGHUP; /* default for things we don't know about */
}

/**
*
* kgdb_skipexception - Bail out of KGDB when we've been triggered.
* @exception: Exception vector number
* @regs: Current &struct pt_regs.
*
* On some architectures we need to skip a breakpoint exception when
* it occurs after a breakpoint has been removed.
*
*/
int kgdb_skipexception(int exception, struct pt_regs *regs)
{
return kgdb_isremovedbreak(regs->nip);
}

static int kgdb_call_nmi_hook(struct pt_regs *regs)
{
kgdb_nmicallback(raw_smp_processor_id(), regs);
Expand Down

0 comments on commit 949616c

Please sign in to comment.