This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Unable to step over (n and ni) on mipsel-linux...
Andrew Cagney wrote:
>>
>>Currently GDB examines the next instruction to see if it is a branch (or
>> jal or jalr..) to see where to place a temporary breakpoint for single
>>stepping.
>
>
>>Instead of stepping into a function and checking to see if we are in a
>>different frame (settting a breakpoint at the return address location),
>>why not set the breakpoint at the return location before making the
>>function call?
>
>
> That would mean examining every instruction to determine if it is a call
> - effectively s/w single step. GDB tries to do avoid doing that so that
> single-step is faster.
>
For my configuration, for some reason it is already doing this. Thus my
comment. If we are doing s/w single step, we would not have to examine
the stack frames.
Could there are some configuration problems?
>
>>By compiler dependant, do you mean the compiler GDB was built with, or
>>the one that compiled the target code?
>
>
> For you mipsel-linux-gcc (the one that compiled the target code).
This implies that if I write assembly language I cannot expect GDB's ni
instruction to work.
I am doing testing with at least three different compiler versions. GDB
5.3 seems to work well except for crashing when I don't use
-fno-var-tracking.
GDB 6.x seems to be a bit of a down-grade.
David Daney.