Skip to content

register commands require a frame unconditionally #49285

@lf-

Description

@lf-
Bugzilla Link 49941
Version unspecified
OS Linux
CC @JDevlieghere,@jimingham

Extended Description

I've been trying out lldb as a replacement for gdb for working on my operating system, which I develop on qemu with a gdbstub. Part of this involves debugging code that is run before the initialization of the stack, in early startup code and exception handlers.

Here is an example thing that can go wrong:

(lldb) register write t0 123
error: invalid frame

The register read command is also affected by this issue. It appears that the cause of it is that a bunch of the commands in CommandObjectRegister.cpp are defined as eCommandRequiresFrame when they should handle there not being a frame present with slightly degraded functionality. It's not that they don't require a frame at all though: ExecutionContext::GetRegisterContext needs a frame to work, but it should be skipped if one is unavailable, which it is not currently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillalldb

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions