This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: backtrace() from a pthread on ARM


On Tue, May 12, 2009 at 4:29 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Matt Fischer <mattfischer84@gmail.com> writes:
>
>> Is there some sort of hackery that could be done to the existing code
>> that would get us around this specific problem, in the specific case
>> of -mapcs-frame and no -fomit-frame-pointer?
>
> I think clone should mark the frame in the child process as outermost
> similar to what _start does.
>
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
>

On a lot of the architectures (including m68k), it looks like it does.
 Problem is that since ARM has actively moved away from requiring a
frame pointer in their ABI, as Daniel mentioned, you can't be sure at
the time of the clone() call whether you should be modifying r11 at
all.

I don't suppose there's some ugly way that glibc could communicate to
ARM's version of clone.S whether or not the library itself was
compiled with frame pointers, is there?  It seems like if there were
some sort of #define, then it could contain a conditional instruction
to zero out the frame pointer the same as the other arches do.  Is
that possible/a good idea?

--Matt


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