libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] Explicitly exporting CFA


From: Andrew Cagney
Subject: Re: [Libunwind-devel] Explicitly exporting CFA
Date: Tue, 08 Jan 2008 15:30:08 -0500
User-agent: Thunderbird 2.0.0.9 (X11/20071115)

Arun Sharma wrote:
On Jan 8, 2008 6:59 AM, Andrew Cagney <address@hidden <mailto:address@hidden>> wrote:

    1.98c worth:

    - the "CFA" value is from the frame inner to cursor
    can I suggest a name like UNW_REG_INNER_CFA?


Is there an ambiguity that the longer name helps resolve?
Consider:

  foo() -- inner
  bar()
  main() - outer

and:

  bar_cursor = foo_cursor
  step(&bar_cursor)

so that bar's inner is foo; then foo's CFA can only be obtained by:

  bar_cursor.get(UNW_REG_INNER_CFA)

and not:

  foo_cursor.get(UNW_REG_CFA)

This is because foo's CFA is only computed when stepping the cursor to bar (and the computed value is saved in bar).

Andrew



    - can it be assigned a negative constant value so that it can't polute
    the ISA register number space
    when extending the x86 register numbers I had to leave a gap in the
    middle to ensure "binary" number compatibility, giving these libunwind
"registers" constant -ve values would help avoid that in the future

This sounds like a good thing to do.

But because we have other libunwind registers (eg: UNW_TDEP_IP) whose values change when new ISA registers are added, this should be a separate patch.

 -Arun





reply via email to

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