libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] alloca()


From: Johan Walles
Subject: Re: [libunwind] alloca()
Date: Thu, 11 Dec 2003 09:48:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

David Mosberger wrote:
On Wed, 10 Dec 2003 17:34:24 +0100, Johan Walles <address@hidden> said:

  Johan> We have a (dynamically generated) function that uses a
  Johan> dynamic amount of user stack.
>
  Johan> do we just say that r42 contains the unmodified
  Johan> usp (see below)?

It's the latter.  That is, for this code:

  Johan> 0x20000000627381d0: [MII]       alloc r40=ar.pfs,24,16,0
  Johan> 0x20000000627381d1:             mov r41=b0
  Johan> 0x20000000627381d2:             add r42=r12,r0

you'd use something along the lines of:

        _U_dyn_op_save_reg (op, _U_QP_TRUE, 2, UNW_REG_SP, UNW_REG_GR + 42);

So, this would mean that if I have stopped the program in a place where the stack pointer has been dynamically modified, I won't get a correct stack pointer if I ask libunwind about it?

Since the listed function is the only one of its kind this is hardly something that will keep me awake at night, I just want to know if I've understood the problem (and its solution) correctly.

  Cheers //Johan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]