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

support dynamic aot debug #3788

Merged
merged 7 commits into from
Sep 18, 2024
Merged

support dynamic aot debug #3788

merged 7 commits into from
Sep 18, 2024

Conversation

LevelCA
Copy link
Contributor

@LevelCA LevelCA commented Sep 11, 2024

No description provided.

@LevelCA
Copy link
Contributor Author

LevelCA commented Sep 12, 2024

@yamt hi. you can see this PR, thank you for your attention.

Signed-off-by: zhangliangyu3 <zhangliangyu3@xiaomi.com>
./wamrc --opt-level=0 --format=object --target=thumbv7 --target-abi=gnueabihf --cpu=cortex-a7 --cpu-features=-neon -o test test.wasm
```

#### 3. Start emulator and nuttx
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should support natvie iwasm or other platform, add lease the native iwasm guide.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be highly appreciated if a document and an example are provided for native iwasm. For example, in Ubuntu/MacOS, compile a simple C app to wasm and then to the AOT file, and then demonstrate how to set the break point at a line of C source and view or dump the call stack.

core/config.h Show resolved Hide resolved

- build test.wasm to test.aot

Compile and generate the test.aot file using wamrc without WAMR_BUILD_DEBUG_AOT.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why is this step needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(⊙o⊙)…
because the WAMR_BUILD_DEBUG_AOT macro wasn't enabled when compiling iwasm. If you enable it now, it might cause issues when running test.aot with iwasm.

sizeof(error_buf))) {
printf("set aot module name failed in dynamic aot debug mode, %s\n",
error_buf);
goto fail2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be goto fail3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

product-mini/platforms/nuttx/CMakeLists.txt Show resolved Hide resolved
test-tools/dynamic-aot-debug/README.md Show resolved Hide resolved
./wamrc --opt-level=0 --format=object --target=thumbv7 --target-abi=gnueabihf --cpu=cortex-a7 --cpu-features=-neon -o test test.wasm
```

#### 3. Start emulator and nuttx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be highly appreciated if a document and an example are provided for native iwasm. For example, in Ubuntu/MacOS, compile a simple C app to wasm and then to the AOT file, and then demonstrate how to set the break point at a line of C source and view or dump the call stack.

test-tools/dynamic-aot-debug/README.md Show resolved Hide resolved

#### 2.1 Build wamrc Compiler

Ensure that wamrc is built with the WAMR_BUILD_DEBUG_AOT flag enabled. You can find the wamrc compiler [here](https://github.com/bytecodealliance/wasm-micro-runtime/tree/main/wamr-compiler)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about changing the last sentence to Please refer to the first two steps in [doc/source_debugging_aot.md](../../doc/source_debugging_aot.md).?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenyongh wenyongh merged commit 51a7109 into bytecodealliance:main Sep 18, 2024
383 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants