-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Support ethdebug source locations under EOF #15994
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
base: develop
Are you sure you want to change the base?
Conversation
20d6a64
to
fb559fb
Compare
e6a1055
to
2a91773
Compare
d82b70c
to
0fd1232
Compare
0fd1232
to
cf6aa71
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.
lgtm
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 want to take a closer look at this, especially the Assembly.cpp
part, but for now just a few small annoyances I found while doing a quick initial pass.
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.
The output here is quite long and seems to have little to do with ethdebug itself (the ethdebug JSON gets stripped). Do we need it all? What's the point?
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 I just added it because there is the same test for non-eof. And looking at it now, I agree. There doesn't seem to be much value to keep it (or: them) around, especially with #16009 around the corner. I have removed this one.
test/cmdlineTests/standard_output_debuginfo_ethdebug_compatible_eof/input.json
Outdated
Show resolved
Hide resolved
3c02df0
to
f9a0985
Compare
42d5d8f
to
7eecf23
Compare
"C": { | ||
"evm": { | ||
"bytecode": { | ||
"ethdebug": null |
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.
ok, I thought those would get automatically removed.
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.
it's even better if they don't. if you request ethdebug output there should be an ethdebug output artifact there that indicates that there is no ethdebug output :)
regarding the |
7eecf23
to
e696889
Compare
e696889
to
667d2e3
Compare
schema::program::Instruction::Operation operation; | ||
operation.mnemonic = instructionInfo(static_cast<Instruction>(_linkerObject.bytecode[_start]), _assembly.evmVersion()).name; | ||
static size_t constexpr instructionSize = 1; | ||
if (_start + instructionSize < _end) |
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.
Might even make sense to replace this with an assert as this could end up with an empty operation, which is not desired?
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.
there is an assert that start < end
. which leaves start + 1== end
as possibility, ie, an op with no argument data - which is desired and possible I'd think
667d2e3
to
bcf1c34
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.
I only looked at the Assembly
changes so far, but they look good. We could merge that if you extract it into a separate PR.
@@ -4,7 +4,7 @@ Language Features: | |||
|
|||
|
|||
Compiler Features: | |||
|
|||
* ethdebug: Experimental support for instructions and source locations under EOF. |
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.
* ethdebug: Experimental support for instructions and source locations under EOF. | |
* ethdebug: Experimental support for instructions and source locations under EOF. |
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.
Uhh. Happy to fix this - but why? It's not like there's a blank line between bullet point list and headline anywhere else.
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.
Ah, my bad, should have been the other way around - an extra empty line below :)
but why?
Two empty lines between sections.
Maybe we should just change the convention to a single line? No one seems to be able to keep it straight or see it in the diff and it gets changed by PRs back and forth. I usually ignore it but I got annoyed enough seeing it again to suggest a correction :)
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.
Haha yeah, that explains it. Might've also been my pre-coffee confusion that I didn't realize you meant the blank line below. I am absolutely fine with changing it to one line in any case! :)
af84571
to
aad6fca
Compare
aad6fca
to
739761a
Compare
2f4f25b
to
0ca8800
Compare
The assembler stuff has been merged with #16052, which leaves this PR in a state in which it solely adds ethdebug features |
EthdebugSchema
header with the relevant part of the schema mapped to structs with correspondingto_json
methods and validations(-1, -1)
)assembleEOF
Fixes the unoptimized part of #15978.
Fixes #15998.