-
Notifications
You must be signed in to change notification settings - Fork 108
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
write: add LineConvert
#745
base: master
Are you sure you want to change the base?
Conversation
This allow reuse of the implementation of `LineProgram::from` as part of a more complex transformation. Operation of `LineProgram::from` is mostly unchanged. The one difference is that it now uses the string form chosen by `LineString::new` instead of copying the form of the input.
Nice! Will take a look later today! |
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.
Overall, LGTM. Thanks a ton for digging into this stuff!
I have to admit that it has been a while since I was deep in DWARF, so I'm not 100% up-to-date with all the details. My biggest piece of feedback is simply that of a downstream user: I think these APIs could benefit from a bit more documentation explaining what they are, why you'd use them, and how.
I also quickly scanned over the changes in Wasmtime and Walrus, and things also look good there, definitely an improvement!
Thanks for the review. I've expanded the doc and added some examples. I'll let this stew for a bit. I probably need to add some more edge case testing, and I need to figure out if we should be supporting |
We now automatically start sequences if needed. This better matches how the underlying DWARF instructions operate, and simplifies use of `LineConvert` since we no longer need to check if a sequence has started. This also means that `LineConvert::read_row` will work as expected if there are multiple `DW_LNE_set_address` in a sequence. `LineConvert::read_sequence` still does not support this.
LineConvert::new already retrieves the compilation name from the program.
This allow reuse of the implementation of
LineProgram::from
as part of a more complex transformation.Operation of
LineProgram::from
is mostly unchanged. The one difference is that it now uses the string form chosen byLineString::new
instead of copying the form of the input.