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 v3 15/17] PPC64: Fix gdb.arch/ppc64-atomic-inst.exp with displaced stepping


Pedro Alves <palves@redhat.com> writes:

> The ppc64 displaced step code can't handle atomic sequences.  Fallback
> to stepping over the breakpoint in-line if we detect one.

Probably arm atom sequences instructions can't be executed out-of-line
either, I'll write a test for this.

>
> gdb/ChangeLog:
> 2015-04-17  Pedro Alves  <palves@redhat.com>
>
> 	* infrun.c (displaced_step_prepare): Return -1 if
> 	gdbarch_displaced_step_copy_insn returns NULL.
> 	(resume): When displaced stepping doesn't work, try software
> 	single-stepping.

This chunk isn't shown in the patch below, has been committed already?

> diff --git a/gdb/infrun.c b/gdb/infrun.c
> index be186a7..a89eefc 100644
> --- a/gdb/infrun.c
> +++ b/gdb/infrun.c
> @@ -1797,9 +1797,14 @@ displaced_step_prepare_throw (ptid_t ptid)
>  
>    closure = gdbarch_displaced_step_copy_insn (gdbarch,
>  					      original, copy, regcache);
> -
> -  /* We don't support the fully-simulated case at present.  */
> -  gdb_assert (closure);
> +  if (closure == NULL)
> +    {
> +      /* The architecture doesn't know how or want to displaced step
> +	 this instruction or instruction sequence.  Fallback to
> +	 stepping over the breakpoint in-line.  */
> +      do_cleanups (old_cleanups);
> +      return -1;
> +    }
>  
>    /* Save the information we need to fix things up if the step
>       succeeds.  */

We need to update the comments to displaced_step_prepare_throw about
return value -1.

-- 
Yao (éå)


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