intel / intel/compile-time-init-build

✨ Add high-level debug capabilities

Open
#540 0 comments 0 reactions 1 assignee Claimed by @lukevalenty View on GitHub
enhancement
Dominant language
C++
Stars
648
Forks
63
Avg merge
4h 25m
Merged PRs (30d)
17

Description

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

```c++
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

```c++
namespace dbg {
template
struct state;
}

dbg::state
> my_named_var{};

dbg::state,
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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.