---
name: "function::ustack"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::ustack"
---

# function::ustack(3stap)

Return address at given depth of user stack backtrace

## NAME

function::ustack - Return address at given depth of user stack backtrace

## SYNOPSIS

```
    ustack:long(n:long)
```

## ARGUMENTS

*n*

number of levels to descend in the stack.

## DESCRIPTION

Performs a simple (user space) backtrace, and returns the element at the specified position. The results of the backtrace itself are cached, so that the backtrace computation is performed at most once no matter how many times **ustack** is called, or in what order.

## SEE ALSO0

[*tapset::ucontext-symbols*(3stap)](/tapset::ucontext-symbols/3stap.md)
