[PATCH] Add PT_GNU_SFRAME segment
Carlos O'Donell
carlos@redhat.com
Tue Jan 24 14:57:38 GMT 2023
On 1/24/23 08:20, Florian Weimer via Gnu-gabi wrote:
> * Mark Wielaard:
>
>> Hi Indu,
>>
>> On Mon, 2023-01-23 at 11:56 -0800, Indu Bhagat via Gnu-gabi wrote:
>>> As I submit this patch, I am reminded of my ongoing unease with using the
>>> keyword "unwind information" with SFrame format. SFrame format, is the Simple
>>> Frame format, which represents the minimal necessary information for
>>> backtracing:
>>> - Canonical Frame Address (CFA)
>>> - Frame Pointer (FP)
>>> - Return Address (RA)
>>> As such, one can argue that there is a clear distinction between "backtrace"
>>> (=simple call trace) and "unwind"(=stack walk + recover state/regs).
>>>
>>> What do you think will the "correct" terminology here (if there is one) ?
>>> Simple Frame format is for backtracing only, but calling it a "backtrace
>>> format" also sounds off. May be "backtracing format" ? Simple Frame, SFrame,
>>> backtracing format...
>>>
>>> Thoughts?
>>
>> What about calling it a "call trace"?
>> Although technically it is a "return trace".
>
> “Stack trace” matches “SFrame”. That's Python, Java etc. terminology
> and seems appropriate here, too.
Agreed, good point. I'm fine with the use of the word "stack" in this context.
I looked at Java's documentation and they use the term "stack trace":
https://docs.oracle.com/en/java/javase/19/docs/specs/man/jstack.html
Likewise for Python the term is "stack traces":
https://docs.python.org/3/library/traceback.html?highlight=stack%20trace
That confirms the common usage in Java and Python.
That's enough for me to consider "stack traces" a good choice.
Note Ruby still calls it a "backtrace" in the context of exceptions:
https://docs.ruby-lang.org/en/master/Exception.html#method-i-backtrace
but I'd argue "stack trace" is a better choice there too.
--
Cheers,
Carlos.
More information about the Gnu-gabi
mailing list