-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Enable ethdebug debug info and output selection. #15289
Conversation
ccbe426
to
71bf655
Compare
ec729b3
to
ee2bc12
Compare
ee2bc12
to
9772d20
Compare
09fd459
to
53e12ef
Compare
4b5c548
to
a262eef
Compare
a262eef
to
c4cb445
Compare
b8851f6
to
1edf1f4
Compare
1edf1f4
to
bf1527c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing deal-breaking I think. A couple of suggestions and questions. I would be wary when/how much debug data is collected, in particular that we don't collect it by default and just don't output it in the end - that could pose a big performance drain.
liblangutil/DebugInfoSelection.h
Outdated
@@ -42,7 +42,9 @@ struct DebugInfoSelection | |||
static DebugInfoSelection const All(bool _value = true) noexcept; | |||
static DebugInfoSelection const None() noexcept { return All(false); } | |||
static DebugInfoSelection const Only(bool DebugInfoSelection::* _member) noexcept; | |||
static DebugInfoSelection const Default() noexcept { return All(); } | |||
static DebugInfoSelection const Default() noexcept { return ExceptExperimental(); } | |||
static DebugInfoSelection const Except(std::vector<bool DebugInfoSelection::*> const& _members) noexcept; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is fine but I was a bit confused about the naming Except
and ExceptExperimental
. I would have imagined to call something like All{}.exceptExperimental()
. Or, to make it more clear for ... people like me, you could name it AllExceptExperimental
. Or something. Minor point in any case, feel free to ignore
[](const Json& result) | ||
{ | ||
return result["contracts"]["fileA"]["contractA"]["evm"]["deployedBytecode"].contains("ethdebug") && | ||
result["contracts"]["fileB"]["contractB"]["evm"]["bytecode"].contains("ethdebug") ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping
bf1527c
to
df4a941
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few whitespaces :D
lgtm otherwise
e4ab7ac
to
7e14812
Compare
82df2ba
to
0b702ac
Compare
0b702ac
to
23d9607
Compare
23d9607
to
7ea985d
Compare
debug-info
was set toethdebug
ir
,irOptimized
and/orethdebug
was selected as output.standard_debug_info_in_yul_ethdebug_output_ir_optimized
,standard_debug_info_in_yul_ethdebug_output_no_ir
strict-assembly
e.g.solc --strict-assembly <yul> --debug-info ethdebug
debug-info
ethdebug
is excluded from the help on clidebug-info
ethdebug
is excluded fromall
on cli and wildcard selection*
in standard-jsonethdebug
was selected as outputdebug-info
was selected, it implicitly setdebug-info
toethdebug
.solc <contract> --ethdebug
via-ir
was not specified, it will error with a message stating thatethdebug
can only be selected as output, ifvia-ir
was defined.solc <contract> --ethdebug
only works with--via-ir
debug-info
was selected and did not containethdebug
, an error will be generated stating thatethdebug
need to be set indebug-info
solc <contract> --ethdebug --debug-info location
strict-assembly
will always work e.g.solc --strict-assembly <yul> --ethdebug
ethdebug
is not shown in cli helpethdebug
output selection is excluded from wildcard selection*
in standard-jsonUPDATE
After some discussion with @gnidan and @ekpyron it turned out that we need something slightly different:
ethdebug
output will now be enabled withevm.bytecode.ethdebug
(deploytime part) andevm.deployedBytecode.ethdebug
(runtime part)evm.bytecode
andevm.deployedBytecode
behave like a wildcard, so the ethdebug stuff is excluded here.--bin
and--bin-runtime
ethdebug selection will now work similar with--ethdebug
and--ethdebug-runtime
UPDATE 01/2025