Context: profile, registers, frames, locals

Run and project data; core registers, call stack, locals and arguments.

since 0.1.0-rc.1since 0.3.0

Methods

EntrySignatureAvailable sinceAPI 3
profileprofile: Profile0.1.0-rc.1¹unchanged
registersregisters(*names, frame=None) -> dict0.3.0unchanged
framesframes(limit=16) -> dict0.3.0unchanged
locals, argumentslocals(frame=None) -> dict; arguments(frame=None) -> dict0.3.0unchanged

¹ Base form; the 0.3.0 extensions are described in the card.

API 3 changes (0.5.0)

Unchanged, no await.

Recommended

Project parameters through profile.get with a default; arguments in the stopped frame.

count = t.profile.get("user.measurement.count", 10)
core = t.registers("pc", "sp")
t.record("core", core)
t.check("top frame", t.frames(limit=8)["frames"][0]["function"], "app_step")
t.reach("app_step")
t.check("mode argument", t.arguments()["values"]["mode"], t.evaluate("APP_MODE_BLINK"))

Avoid

Hard-coded numbers instead of profile parameters; an index chain fails when a section is missing.

count = t.profile["user"]["measurement"]["count"]   # fails without the section
t.check("delay", t.read("app_delay"), 100)            # expectation not taken from the profile

The fragments show refused or discouraged patterns, not a working recipe.

Fragments for a scenario body; firmware symbols are illustrative.

← Journal and SKIPAll groupsReset and GDB commands →