forked from bytecodealliance/wasm-micro-runtime
-
Couldn't load subscription status.
- Fork 0
Dev/source debug vscode #6
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
Merged
wustwn
merged 127 commits into
wustwn:vscode-extension
from
bytecodealliance:dev/source_debug_vscode
Jan 8, 2022
Merged
Dev/source debug vscode #6
wustwn
merged 127 commits into
wustwn:vscode-extension
from
bytecodealliance:dev/source_debug_vscode
Jan 8, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make aot intrinsic flags easier to read and understand Signed-off-by: Huang Qi <[email protected]>
Add missing aot relocation symbols from libgcc for thumb platform Signed-off-by: Huang Qi <[email protected]>
Remove bound-strict flag from -fno-sanitize list in Linux Debug build with clang as clang-11 doesn't have bounds-strict
And enable building Windows CI with multi cores
Change __syscall_slong_t to __SYSCALL_SLONG_TYPE, and use it when macro __SYSCALL_SLONG_TYPE is defined.
The feature is disabled by default, to enable it, please use `cmake -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1` to build iwasm.
Signed-off-by: Huang Qi <[email protected]> Change-Id: If1e813f5f8ead2c0d9b640f8ea4e87e2155db534
Apply aot intrinsics to riscv
Before calling import function of sub module inst in multi-module mode, we should copy the arguments to output area by using the func inst of sub module inst but not func inst of current module inst.
The WASM C API now requires the use of vector types in certain apis. Switching WAMR to use the new call signatures improves "drop in" compilation compatibility between WAMR and other implementations from a C-api embedding program's perspective. * wasm_func_callback_t type has been updated to use wasm_val_vec_t * wasm_func_callback_with_env_t type has been updated to use wasm_val_vec_t * wasm_func_call() has been updated to use wasm_val_vec_t * wasm_instance_new() has been updated to use wasm_extern_vec_t* * wasm_instance_new_with_args() has been updated to use wasm_extern_vec_t* * wasm_runtime_invoke_c_api_native() has been updated to support vector types in native callbacks without modifying the contract with the interpreter code. * All users of the modified functions (including samples/wasm-c-api/src/*.c) have been appropriately updated.
Implement the latest SIMD opcodes and update LLVM 13.0, update the llvm build scripts, update the sample workloads‘ build scripts, and build customized wasi-sdk to build some workloads. Also refine the CI rules. Signed-off-by: Wenyong Huang <[email protected]>
Fix document issues: add ARC to supported targets, fix how to build wamrc for MacOS. Fix spec case test script issue: the latest wabt has enabled simd by default, no need to add "--enable-simd" option for test script. Fix simd LLVM IR compilation issue: using index calculated by opcode to access array element should not be out of array boundary, add bh_assert() for it. Signed-off-by: Wenyong Huang <[email protected]>
Implement source debugging feature for classic interpreter and AOT: - use `cmake -DWAMR_BUILD_DEBUG_INTERP=1` to enable interpreter debugging - use `cmake -DWAMR_BUILD_DEBUG_AOT=1` to enable AOT debugging See doc/source_debugging.md for more details.
Customize clang-format coding styles for C source files based on Mozilla template.
To check whether the C source codes are well formatted:
``` bash
$ cd ${wamr-root}
$ clang-format --Werror --dry-run --style=file path/to/file
```
To format the C source codes in place
``` bash
$ cd ${wamr_root}
$ clang-format -i --style=file path/to/file
```
Signed-off-by: Wenyong Huang <[email protected]>
Change function arguments to (void) instead of () to avoid compilation warnings when compiling with '-Wstrict-prototypes' flag.
And update source debugging document.
Refine some codes in wasm loader Add -Wshadow to gcc compile flags and fix some variable shadowed issues Fix function parameter/return types not checked issue Fix fast-interp loader reserve_block_ret() not handle V128 return type issue Fix mini loader load_table_segment_section() failed issue Add detailed comments for argc argument in wasm_runtime_call_wasm()
Add "mipsel" (mips little endian) to wamrc supported target list
Fix the signature invalid issue in libc-builtin, modify signature of strncasecmp native function from "($$i)" to "($$i)i".
Use the previous resolved binary type info (obj_data->target_info.bin_type) to check the endian and bit-width but not the raw binary info, the latter is not suitable for the check for Win32 object file type. And fix the symbol comparison issue in resolve_target_sym(), as in Win32, the symbol name of a function added by LLVMAddFunction() is prefixed by '_', which leads to invalid result returned by strcmp().
Update spec test cases to commit 2460ad02b51fb5ed5824f44de287a8638b19a5f8, and modify wamr test suite script as the SIMD cases have been added into spec main repo by default, no need to clone SIMD repo again when testing SIMD.
Fix bug that code guideline reports error when there is '_' in new file's name. And add unit test cases, which can be run with `pyhton3 -m unitest <filename>`.
Lookup float/double constants from exec_env->native_symbol table but not construct them with LLVMBuildConst if XIP mode is enabled, these constants are introduced by f32/f64.const opcodes and some float/double conversion opcodes, and make wamrc generate some relocations in text section of AOT XIP file. This patch eliminates such relocations when "--enable-indirect-mode" is added to wamrc.
This PR introduces an implementation of the WAMR platform APIs for ESP-IDF and enables support for Espressif microcontrollers, and adds the documentation around how to build WAMR for ESP-IDF. This PR is related to the following issues at WAMR: closes #883, #628, #449 and #668 as well as [#4735](espressif/esp-idf#4735) at the esp-idf repo. It implements most functions required by [platform_api_vmcore.h](https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/core/shared/platform/include/platform_api_vmcore.h). The PR works in interpreter mode on Esp32c3 and Esp32. For the AOT mode, currently errors occur on both platforms with `Guru Meditation Error`. It seems that the AOT code isn't run with shared memory as os_mmap() allocates memory with malloc() API, it is to be fixed in the future.
Don't use constant float table on arm and riscv as LLVM doesn't generate .LPCI/.rodata like relocations on them, the float/double constants are encoded into instructions directly, so no need to lookup them from constant table. Signed-off-by: Huang Qi <[email protected]>
Use `PRIxxx` related macros to format the output strings so as to clear compile warnings, e.g. PRIu32, PRId32, PRIX32, PRIX64 and so on. And add the related macro definitions in platform_common.h if they are not defined, as some compilers might not support them.
And fix read_leb byte count check issue in aot_compiler.c
- use platform independent data types in debug-engine library - add os_socket APIs and provide windows and posix implementation - avoid using platform related header files in non-platform layer - use format specifiers macros for sprintf and sscanf - change thread handle type from uint64 to korp_tid - add lock when sending socket packet to avoid thread racing
And fix compilation error of when build wamrc, fix compilation warnings
Fix ocall_poll incorrectly defined issue in which poll_fds should be defined as [in, out] Fix is_xip_file incorrectly check issue
Fix the sensor framework timer issue reported by #884 when setting `ms_to_next_check`, and unify the type of time related args/vars to uint32 to avoid potential type conversion issues, and fix the compile warnings. And update the sensor sample by creating two sensors to confirm that the fix works correctly.
Update the Zephyr document to provide more detailed instructions, and add info about espressif toolchain too. Add ESP32C3 (RISC-V) and Particle Argon boards support to the zephyr platform sample. More boards are possible, but the script doesn't scale well and is to be improved in future. Add Dockerfile to kickstart a Zephyr development environment as it can be rather confusing for new users.
Refer to https://github.com/WebAssembly/WASI/blob/main/design/application-abi.md to check the WASI ABI compatibility: - Command (main module) may export _start function with signature "()" - Reactor (sub module) may export _initialize function with signature "()" - _start and _initialize can not be exported at the same time - Reactor cannot export _start function - Command and Reactor must export memory And - Rename module->is_wasi_module to module->import_wasi_api - Refactor wasm_loader_find_export() - Remove MULTI_MODULE related codes from mini_loader - Update multi-module samples - Fix a "use-after-free" issue. Since we reuse the memory instance of sub module, just to protect it from freeing an imported memory instance
And fix os_thread_signal_init issue on windows platform
Previously, "linux" was hardcoded in the root CMakeLists.txt, so it was impossible to build on anything but Linux, even when specifying WAMR_BUILD_PLATFORM. Signed-off-by: Piotr Sikora <[email protected]>
Add extern "C" in libc-builtin-sysroot pthread.h to fix mulit-thread wasm app compiling error with C++ compiler
Various fixes and beautifications coordinated with @1c3t3a, fixes 2 of the 3 all remaining issues from #892: - enable to os_mmap executable memory - fix os_malloc/os_realloc/os_free issues - implement os_thread_get_stack_boundary - add build scripts to include with esp-idf to use wamr as an ESP-IDF component - update sample and document
Remove hardcoded stack size in thread_manager.c Signed-off-by: Huang Qi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.