@@ -42,7 +42,9 @@ struct DebugInfoSelection
42
42
static DebugInfoSelection const All (bool _value = true ) noexcept ;
43
43
static DebugInfoSelection const None () noexcept { return All (false ); }
44
44
static DebugInfoSelection const Only (bool DebugInfoSelection::* _member) noexcept ;
45
- static DebugInfoSelection const Default () noexcept { return All (); }
45
+ static DebugInfoSelection const Default () noexcept { return AllExceptExperimental (); }
46
+ static DebugInfoSelection const AllExcept (std::vector<bool DebugInfoSelection::*> const & _members) noexcept ;
47
+ static DebugInfoSelection const AllExceptExperimental () noexcept { return AllExcept ({&DebugInfoSelection::ethdebug}); }
46
48
47
49
static std::optional<DebugInfoSelection> fromString (std::string_view _input);
48
50
static std::optional<DebugInfoSelection> fromComponents (
@@ -72,13 +74,24 @@ struct DebugInfoSelection
72
74
{" location" , &DebugInfoSelection::location},
73
75
{" snippet" , &DebugInfoSelection::snippet},
74
76
{" ast-id" , &DebugInfoSelection::astID},
77
+ {" ethdebug" , &DebugInfoSelection::ethdebug},
75
78
};
76
79
return components;
77
80
}
78
81
82
+ std::vector<std::string> selectedNames () const
83
+ {
84
+ std::vector<std::string> result;
85
+ for (auto const & component: componentMap ())
86
+ if (this ->*(component.second ))
87
+ result.push_back (component.first );
88
+ return result;
89
+ }
90
+
79
91
bool location = false ; // /< Include source location. E.g. `@src 3:50:100`
80
92
bool snippet = false ; // /< Include source code snippet next to location. E.g. `@src 3:50:100 "contract C {..."`
81
93
bool astID = false ; // /< Include ID of the Solidity AST node. E.g. `@ast-id 15`
94
+ bool ethdebug = false ; // /< Include ethdebug related debug information.
82
95
};
83
96
84
97
std::ostream& operator <<(std::ostream& _stream, DebugInfoSelection const & _selection);
0 commit comments