public inbox for openrisc@lists.librecores.org
 help / color / mirror / Atom feed
* [OpenRISC] trap exception handling in linux kernel
@ 2019-01-06 18:07 Vad Rulezz
  2019-03-03 15:29 ` Stafford Horne
  0 siblings, 1 reply; 5+ messages in thread
From: Vad Rulezz @ 2019-01-06 18:07 UTC (permalink / raw)
  To: openrisc

Hello

In arch/openrisc/kernel/traps.c we have a function:

asmlinkage void do_trap(struct pt_regs *regs, unsigned long address)
{
	force_sig_fault(SIGTRAP, TRAP_TRACE, (void __user *)address, current);

	regs->pc += 4;
}

Is there a reason for regs->pc increment?

I think typically debuggers wants to resume program execution from the same address which caused a trap (after disabling a breakpoint, and it's a sw breakpoint after replacing an instruction at this address).



Vad Rulezz

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-04  1:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-06 18:07 [OpenRISC] trap exception handling in linux kernel Vad Rulezz
2019-03-03 15:29 ` Stafford Horne
2019-03-03 19:37   ` Vad Rulezz
2019-03-03 23:10     ` Stafford Horne
2019-03-04  1:15       ` Vad Rulezz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox