Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add high-level debug capabilities #540

Open
lukevalenty opened this issue May 2, 2024 · 0 comments
Open

✨ Add high-level debug capabilities #540

lukevalenty opened this issue May 2, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@lukevalenty
Copy link
Contributor

lukevalenty commented May 2, 2024

There is a desire for high-level debug features in embedded systems beyond the logging provided by cib. These debug features are focused on application logic and not low-level C++ or machine code debug.

Command handler with command declaration API

Declare commands:

  • name
  • summary
  • arguments
    • name
    • summary
    • type
    • default
  • response
    • type
constexpr auto my_cmd =
    dbg::command(
        "my_cmd"_sc,
        "Example for how to define a simple command."_sc,
        dbg::args(
            dbg::arg("arg1"_sc, "Just an optional arg."_sc, int, 0)
        ),
        void,
        [](auto args){
            auto arg1 = args.get("arg1"_f);
        }
    );

Built in commands for message handlers

  1. Spoof message. Automatically generate commands to spoof all the message types that message handlers have callbacks for.

Utilities for declaring and decoding high-level state information

namespace dbg {
    template<typename T, typename... Policies>
    struct state;
}

dbg::state<int, 
    dbg::name<"my_named_var"_sc>
> my_named_var{};

dbg::state<int, 
    dbg::name<"my_traced_var"_sc>,
    dbg::trace_changes
> my_traced_var{};

Python module for interacting with live target or snapshot with nice user interface

Extract command declarations and provide both an API and interactive UI to send and receive commands from a live target.

Interfaces:

  • Command interface
  • Memory interface
  • Trace/log interface

Python module will need support for how to represent the values of types with an extensible interface for adding more:

  1. Integral
  2. Enums
  3. stdx::bitset (including representation of set of enums)
  4. std::array
  5. stdx::intrusive_list
  6. msg::message
  7. Generic struct (recursively decode members)
@lukevalenty lukevalenty added the enhancement New feature or request label May 2, 2024
@lukevalenty lukevalenty self-assigned this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant