On Mon, Jun 02, 2014 at 10:24:32AM +0100, Ramana Radhakrishnan wrote:
> On Mon, Jun 2, 2014 at 8:56 AM, Jakub Jelinek <ja...@redhat.com> wrote:
> > On Mon, Jun 02, 2014 at 10:22:11AM +0400, Yury Gribov wrote:
> >> Looks like now function does not return anything for ARM case? I'd
> >> say we should replace this pc = ... with return like all other
> >> cases, the code is just asking for trouble.
> >
> > But it should be
> >   return (pc & ~(uptr)1) - 1;
> 
> Why the  -1 ? No ARM or Thumb instruction is 1 byte long. Instructions
> are 4 bytes long if in ARM state and could be 2 or 4 bytes if Thumb
> state.

Well, that is what the code did before this patch.
The -1 just points to the middle of previous instruction, so that supposedly
it can be looked up in debug info etc.
Now, if all insns are at least 2 bytes long, perhaps you could subtract 2.

        Jakub

Reply via email to