Skip to content

cymbol ¤

Add, load, show, edit, or delete custom structures.

For the compilation of the structures zig is being used under the hood, unless gcc-config-path is specified.

You are advised to configure the 'cymbol-editor' config parameter to the path of your favorite text editor. Otherwise cymbol expands $EDITOR and $VISUAL environment variables to find the path to the default text editor.

Functions:

Attributes:

P module-attribute ¤

P = ParamSpec('P')

T module-attribute ¤

T = TypeVar('T')

cymbol_editor module-attribute ¤

cymbol_editor = add_param(
    "cymbol-editor",
    "",
    "path to the editor for editing custom structures",
    param_class=PARAM_OPTIONAL_FILENAME,
)

parser module-attribute ¤

parser = ArgumentParser(
    description="\nAdd custom C structures to the debugger.\n\nUnless you specify `gcc-compiler-path`, zig is used under to hood to compile the C files to\nwhichever target architecture you are currently debugging.\n"
)

subparsers module-attribute ¤

subparsers = add_subparsers(dest='subcommand', help='Available subcommands')

add_parser module-attribute ¤

add_parser = add_parser(
    "add",
    help="Add a custom structure and load it into the debugger",
    description="Add a custom structure and load it into the debugger.",
)

remove_parser module-attribute ¤

remove_parser = add_parser(
    "remove",
    help="Remove a custom structure and unload it from the debugger",
    description="Remove a custom structure and unload it from the debugger.",
)

edit_parser module-attribute ¤

edit_parser = add_parser(
    "edit",
    help="Edit a custom structure and reload it",
    description="Edit a custom structure and reload it.",
)

load_parser module-attribute ¤

load_parser = add_parser(
    "load",
    help="Load a previously added structure into the debugger",
    description="Load a previously added custom structure into the debugger.",
)

show_parser module-attribute ¤

show_parser = add_parser(
    "show",
    help="Show a structure's definition",
    description="Show a structure's definition.",
)

file_parser module-attribute ¤

file_parser = add_parser(
    "file",
    help="Add and load a structure from a header file",
    description="Add and load a structure from a header file.",
)

show_all_parser module-attribute ¤

show_all_parser = add_parser(
    "show-all",
    help="Show the names of all stored structures",
    description="Show the names of all stored (i.e. previusly added) structures.",
)

get_editor ¤

get_editor() -> str

run_editor_on_file ¤

run_editor_on_file(filepath: Path) -> bool

add ¤

add(name: str, force: bool) -> None

add_from_header ¤

add_from_header(
    header_file: str, name: str | None, force: bool, quiet: bool
) -> None

load ¤

load(name: str) -> None

edit ¤

edit(name: str) -> None

remove ¤

remove(name: str) -> None

show ¤

show(name: str) -> None

show_all ¤

show_all() -> None

cymbol ¤

cymbol(
    subcommand: str,
    name: str = "",
    path: str = "",
    force: bool = False,
    quiet: bool = False,
) -> None