yowl opened PR #7858 from yowl:dwarf-att-string
to bytecodealliance:main
:
This PR (my first here), adds cloning for DWARF
String
attributes, copying howBlock
was done. This allowswasmtime -D debug-info
to work with programs compiled with emscripten:emcc 1.c -o 1.wasm -g -gdwarf-5 -sWASM_BIGINT=1 -sSTANDALONE_WASM=1
And consequently that they can be debugged in lldb:
![image](https://github.com/bytecodealliance/wasmtime/assets/2720041/e149ab81-d9ff-4c50-9b75-8f93e239703c)
yowl requested pchickey for a review on PR #7858.
yowl requested wasmtime-core-reviewers for a review on PR #7858.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
I think you can use
into_owned()
instead ofto_vec()
.
yowl created PR review comment:
Thanks, shall I change
AttributeValue::Block(d) => write::AttributeValue::Block(d.to_slice()?.to_vec()),
as well?
yowl submitted PR review.
yowl updated PR #7858.
yowl submitted PR review.
yowl created PR review comment:
I went ahead and changed
Block
, I have limited experience ofCow
and slicing, but it seemed logical being as how similarBlock
is toString
alexcrichton submitted PR review:
I won't really pretend to know what's going on here but I don't think many of us know much about the native dwarf transform this is doing. That being said it seems not obviously wrong at least and the same as everything else in this area.
Ideally we'd have tests for changes like this but we don't have many preexisting tests here yet so I think it's ok to land this as-is and we can look to improve testing later.
alexcrichton merged PR #7858.
Last updated: Dec 23 2024 at 12:05 UTC