This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 03/23] PR13858 - Can't do displaced stepping with no symbols


On 04/07/2015 01:49 PM, Pedro Alves wrote:
> Running break-interp.exp with the target always in non-stop mode trips
> on PR13858, as enabling non-stop also enables displaced stepping.
> 
> The problem is that when GDB doesn't know where the entry point is, it
> doesn't know where to put the displaced stepping scratch pad.  The
> test added by this commit exercises this.  Without the fix, we get:
> 
>  (gdb) PASS: gdb.base/step-over-no-symbols.exp: displaced=on: break *$pc
>  set displaced-stepping on
>  (gdb) PASS: gdb.base/step-over-no-symbols.exp: displaced=on: set displaced-stepping on
>  stepi
>  0x00000000004005be in ?? ()
>  Entry point address is not known.
>  (gdb) PASS: gdb.base/step-over-no-symbols.exp: displaced=on: stepi
>  p /x $pc
>  $2 = 0x4005be
>  (gdb) PASS: gdb.base/step-over-no-symbols.exp: displaced=on: get after PC
>  FAIL: gdb.base/step-over-no-symbols.exp: displaced=on: advanced
> 
> The fix is to fall back to stepping over the breakpoint in-line if we
> don't know where the entry point address is.
> 
> This is enough to fix all-stop + "set displaced on".  For non-stop,
> we'll need to teach core gdb to pause all threads to be able to start
> the in-line step-over (because then we need to remove the breakpoint
> from the target temporarily).

Hmm, actually not all targets get the entry point from symbols -- when
Cell debugging is enabled, PPC gets the entry point from AT_ENTRY from
the auxv...  We should probably make that the default on GNU/Linux.
I just tried that now on x86-64 and it worked fine.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]