Returns an array describing the thread’s call stack, innermost first. Each entry is a table with func, and currentline when a line is known.
Every function on this page is reachable both as debug.<name> and as a plain global of the same name, so debug.getupvalues(f) and getupvalues(f) are the same call.

Parameters

thread
The thread to walk. Defaults to the current one.

Returns

table
An array of { func, currentline? } tables.

Behavior

  • Athena’s own frames are skipped, so the stack reads as the script sees it rather than exposing the executor’s dispatch layers.
  • It stops at 200 frames.
  • currentline is absent when the frame has no line information, for example a C function.

Example

  • getinfo: describe a single level in more detail.