[EXT] Re: Context switch during stepping causes weird behavior

Adrian Oltean adrian.oltean@nxp.com
Thu Oct 13 06:41:15 GMT 2022


Hi Luis,

Thank you for clarifying this. I concluded that displaced stepping is off
based on the description I found in the GDB user guide. Maybe it's worth
updating the docs as well.

Adrian 

> -----Original Message----- 
> 
> On 10/12/22 07:46, Adrian Oltean via Gdb wrote:
> > Thanks guys. Looks like displaced stepping is off by default when GDB
> > is running in all-stop mode - my case. So I'll have to look for other
> > ways to work around the behavior I described.
> 
> That is a bit misleading. It used to be the case it was only used for non-stop
> mode, but nowadays it is supported if the underlying target supports it.
> 
> I don't think Arm (As in arm-none-elf, I'm assuming this is the case here) supports
> it, but when debugging linux-hosted Arm binaries, then it is supported.
> 
> See gdb/infrun.c:gdbarch_supports_displaced_stepping.
> >
> > Adrian
> >
> >> Caution: EXT Email
> >>
> >> On 10/5/22 09:53, John Baldwin wrote:
> >>
> >>> I don't know off the top of my head if there is a knob to disable
> >>> displaced stepping.
> >> FYI:
> >>
> >> (gdb) apropos displaced
> >> set debug displaced -- Set displaced stepping debugging.
> >> set displaced-stepping -- Set debugger's willingness to use displaced stepping.
> >> show debug displaced -- Show displaced stepping debugging.
> >> show displaced-stepping -- Show debugger's willingness to use
> >> displaced stepping.
> >>
> >> Keith
> >



More information about the Gdb mailing list