linux-mips
[Top] [All Lists]

Re: Single stepping in mips

To: "Krishnakumar. R" <krishnakumar@naturesoft.net>
Subject: Re: Single stepping in mips
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 4 Jun 2003 07:53:19 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <200306041107.55492.krishnakumar@naturesoft.net>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200306040918.01943.krishnakumar@naturesoft.net> <20030604051818.GA2365@linux-mips.org> <200306041107.55492.krishnakumar@naturesoft.net>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.1i
On Wed, Jun 04, 2003 at 11:07:55AM +0530, Krishnakumar. R wrote:

> we will get a break point exception as soon as the break
> in addr1 is executed (correct me if I have wrongly understood !! )
> 
> But the need is to raise an exception after instr1 (at addr1) is executed.
> One solution is using a break at instr2 (at addr2).
> But suppose instr1 is a jmp then there is no point
> in keeping a break at addr2.
> (inorder to raise an exception after instr1 is executed).

You understood correctly.  Now jumps and even more so the conditional
branches are sort of the ugly part of the whole thing.  The easiest
method is probably inserting a branch at the jump's destination address
or in case of a branch at the branch target and the instruction following
it's delay slot.  So that's a lot of inserting and removing of
breakpoints ...

  Ralf

<Prev in Thread] Current Thread [Next in Thread>