public inbox for openrisc@lists.librecores.org
 help / color / mirror / Atom feed
From: Vad Rulezz <vad@vr5.epicgamer.org>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] trap exception handling in linux kernel
Date: Sun, 06 Jan 2019 21:07:07 +0300	[thread overview]
Message-ID: <5C3243CB.9010606@vr5.epicgamer.org> (raw)

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

             reply	other threads:[~2019-01-06 18:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-06 18:07 Vad Rulezz [this message]
2019-03-03 15:29 ` [OpenRISC] trap exception handling in linux kernel Stafford Horne
2019-03-03 19:37   ` Vad Rulezz
2019-03-03 23:10     ` Stafford Horne
2019-03-04  1:15       ` Vad Rulezz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5C3243CB.9010606@vr5.epicgamer.org \
    --to=vad@vr5.epicgamer.org \
    --cc=openrisc@lists.librecores.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox