Skip to content

Conversation

@LevelCA
Copy link
Contributor

@LevelCA LevelCA commented Sep 11, 2024

No description provided.

@LevelCA LevelCA force-pushed the main branch 2 times, most recently from d772680 to ef489b7 Compare September 11, 2024 15:38
@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 <[email protected]>
./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
Collaborator

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.


- build test.wasm to test.aot

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

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
Collaborator

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

./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.

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.


#### 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
Collaborator

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
Collaborator

@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

@LevelCA LevelCA force-pushed the main branch 7 times, most recently from c6f96bd to 3539b26 Compare September 18, 2024 02:38
@wenyongh wenyongh merged commit 51a7109 into bytecodealliance:main Sep 18, 2024
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