Namespaces

Records

Functions

  • template <size_t N, typename T>
    auto AnyValueSpan (T * regs)

    This is used to materialize a fixed-size span pointing into the struct.

    Defined at line 101 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

  • template <size_t N, size_t... M, typename T>
    RegisterRange auto ScatterRange (std::span<T, N> first, std::span<T, M>... rest)

    This assembles a range from noncontiguous elements.

    Defined at line 107 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

  • template <auto&&... regs>
    RegisterRange auto ScatterRange (AnyValue<uint64_t> auto &&... regs)

    Defined at line 117 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

  • template <auto&& regs>
    RegisterRange auto ArgumentRegisters (AnyValue<zx_arm64_thread_state_general_regs_t> auto && regs)

    ArgumentRegisters() yields a range of the registers used to pass arguments.

    Defined at line 123 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

  • template <auto&& regs>
    RegisterRange auto ReturnValueRegisters (AnyValue<zx_arm64_thread_state_general_regs_t> auto && regs)

    ReturnValueRegisters() yields a range of the registers used to return values

    from functions.

    Defined at line 130 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

  • template <auto&& regs>
    RegisterRange auto TemporaryRegisters (AnyValue<zx_arm64_thread_state_general_regs_t> auto && regs)

    TemporaryRegisters() returns a range of the call-clobbered (callee-saves)

    registers that are not also argument registers.

    Defined at line 137 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

  • template <auto&& regs>
    RegisterRange auto CallSavedRegisters (AnyValue<zx_arm64_thread_state_general_regs_t> auto && regs)

    CallSavedRegisters() returns a range of the generic call-saved

    (caller-saves) registers.

    Defined at line 144 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

  • template <auto&& regs>
    SpecialRegisterRange auto SpecialRegisters (AnyValue<zx_arm64_thread_state_general_regs_t> auto && regs)

    Defined at line 149 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

  • uint64_t FaultAddress (const zx_exception_report_t & report)

    Defined at line 247 of file ../../src/lib/captive-thread/include/lib/captive-thread/captive-thread.h

  • void PrintTo (const CaptiveThread & , std::ostream * os)

    Defined at line 562 of file ../../src/lib/captive-thread/captive-thread.cc

Concepts

template <typename T, class Regs> AnyValue std::same_as<Regs, std::decay_t<T> >

Each SomethingRegisters() function below takes an argument that can be a

given zx_..._regs_t type, but of any value category: passed by value

(rvalue); passed by const (lvalue) reference; passed by mutable (lvalue)

reference. This concept is used in those declarations to use a single

template function rather than multiple nearly-identical overloads.

Defined at line 28 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

template <typename T, typename R = uint64_t> RegisterRange std::ranges::bidirectional_range<T> && std::same_as<const R &, RangeConstReferenceType<T> > && std::is_const_v<T> == std::is_const_v<std::ranges::range_reference_t<T> >

The functions below all return a RegisterRange. This is a range of the

individual registers in some order. Each element of the range is a

reference into the argument zx_..._regs_t object. It's possible to pass a

temporary (rvalue) into these functions, and they will return a range of

references into that object. So in these cases, the range must not be used

past the lifetime of the argument object. Usually the range objects are

used in contexts where the temporary lifetime is extended to the end of the

full expression.

Defined at line 45 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

template <typename T> SpecialRegisterRange RegisterRange<T> && requires (T regs) { { regs.pc() } -> std::common_reference_with<const uint64_t &&>; { regs.sp() } -> std::common_reference_with<const uint64_t &&>; { regs.fp() } -> std::common_reference_with<const uint64_t &&>; { regs.tp() } -> std::common_reference_with<const uint64_t &&>; { regs.ra() } -> std::convertible_to<std::optional<uint64_t>>; { regs.scsp() } -> std::convertible_to<std::optional<uint64_t>>; }

The SpecialRegisters() functions return a RegisterRange that gives the

special registers in this order. But the range object also supports these

named accessors. Not all machines have an ra() or scsp() register, so those

accessors report std::nullopt instead (and are not included in the range).

Defined at line 54 of file ../../src/lib/captive-thread/include/lib/captive-thread/registers.h

template <typename T> RegistersType OnRegisterTypes<IsRegistersType>::value<T>

Defined at line 60 of file ../../src/lib/captive-thread/include/lib/captive-thread/captive-thread.h