bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: manually inserted software breakpoints in MIPS


From: Andrew Cagney
Subject: Re: manually inserted software breakpoints in MIPS
Date: Thu, 10 May 2001 01:54:25 -0400
User-agent: Mozilla/5.0 (X11; U; NetBSD 1.5V macppc; en-US; 0.8.1) Gecko/20010502

Hi,

I tried to insert software breakpoints manually to my code in MIPS so that
I could stop GDB every time the program takes a branch I it should not
take.  Instructions "teq $0,$0" and "break 0" do the trick and the GDB
breaks on the instructions as if there were true breakpoints inserted
from the GDB interface.  However, I would like the GDB continue execution
by the continue command.  Currently it just keeps looping in the
breakpoint instruction until I force it to jump over.

The very same feature works fine on i386 if I insert "int 3"
instructions.

It works on the x86 through good luck rather than good management.
When the x86 stops, it leaves PC on the _next_ instruction (the one after the breakpoint) while for the MIPS it leaves the PC on the current instruction. Consequently, when you resume on the x86 that breakpoint is magically skipped.

If the behavour were to be changed it would be to fix the x86.

enjoy,
        Andrew





reply via email to

[Prev in Thread] Current Thread [Next in Thread]