From: Mike Frysinger Date: Mon, 12 Apr 2010 05:53:35 +0000 (+0000) Subject: Blackfin: kgdb: pass up the CC register instead of a 0 stub X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2db97bf6bafde4ec114d1837dd3fc4cea64b2ea;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Blackfin: kgdb: pass up the CC register instead of a 0 stub While the CC pseudo register can be deduced from the ASTAT register, make sure we set its value correctly instead of always stubbing it out as 0. GDB itself looks at this pseudo register instead of ASTAT, so we have to supply the right value. Signed-off-by: Mike Frysinger --- diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c index 2c501ceb1e5..ad1c0530848 100644 --- a/arch/blackfin/kernel/kgdb.c +++ b/arch/blackfin/kernel/kgdb.c @@ -66,7 +66,7 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) gdb_regs[BFIN_RETN] = regs->retn; gdb_regs[BFIN_RETE] = regs->rete; gdb_regs[BFIN_PC] = regs->pc; - gdb_regs[BFIN_CC] = 0; + gdb_regs[BFIN_CC] = (regs->astat >> 5) & 1; gdb_regs[BFIN_EXTRA1] = 0; gdb_regs[BFIN_EXTRA2] = 0; gdb_regs[BFIN_EXTRA3] = 0;