Skip to content
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

AOT debugging setup doesn't work #3163

Open
g0djan opened this issue Feb 15, 2024 · 4 comments
Open

AOT debugging setup doesn't work #3163

g0djan opened this issue Feb 15, 2024 · 4 comments
Labels
bug Something isn't working source debugger

Comments

@g0djan
Copy link
Contributor

g0djan commented Feb 15, 2024

Hi, I followed https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/doc/source_debugging_aot.md
and built wamrc. But it fails with coredump(which isn't configured on this ec2) when I try to build AOT files

ubuntu@ip-172-31-42-211:~/wasm-micro-runtime$ ./wamr-compiler/build/wamrc --disable-simd --size-level=1 -o helloworld.aot helloworld/target/wasm32-wasi/debug/helloworld.wasm
Create AoT compiler with:
  target:        x86_64
  target cpu:    cascadelake
  target triple: x86_64-unknown-linux-gnu
  cpu features:
  opt level:     3
  size level:    1
  output format: AoT file
wamrc: /home/ubuntu/wasm-micro-runtime/core/deps/llvm/build/include/llvm/Support/Casting.h:109: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::DIType; From = llvm::Metadata]: Assertion `Val && "isa<> used on a null pointer"' failed.
Aborted (core dumped)

If I build wamrc without passing -DWAMR_BUILD_DEBUG_AOT=1 everything works

@yamt
Copy link
Collaborator

yamt commented Feb 29, 2024

is your helloworld.wasm in rust?

i saw a similar symptom with C++ module. #3187

@yamt
Copy link
Collaborator

yamt commented Feb 29, 2024

for rust modules, it seems that, in lldb_function_to_function_dbi, LLVMCountParams(func_ctx->func) is sometimes smaller than 1+variable_list.GetSize() for some reasons.
i don't know how it happens.

@g0djan
Copy link
Contributor Author

g0djan commented Mar 9, 2024

Yes it was Rust helloworld

@TianlongLiang
Copy link
Contributor

It's because of the same reason mentioned here, currently exploiting a solution. Will also update here if something new

wenyongh pushed a commit that referenced this issue Apr 3, 2024
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working source debugger
Projects
None yet
Development

No branches or pull requests

4 participants