Apply clang-format for more src files and update spec test script (#775)

Apply clang-format for core/iwasm/include, core/iwasm/common and
core/iwasm/aot files.

Update spec cases test script:
- Checkout latest commit of https://github.com/WebAssembly/spec
- Checkout main branch but not master of https://github.com/WebAssembly/threads
- Update wabt to latest version

And update source debugging document.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2021-10-08 17:47:11 +08:00
committed by GitHub
parent 6415e1b006
commit 52b6c73d9c
37 changed files with 2835 additions and 2875 deletions

View File

@ -114,12 +114,13 @@ get_text_section(void *buf, uint64_t *offset, uint64_t *size)
if (sh_table) {
read_section_header_table64(eh, sh_table);
sh_str = get_section64(eh, sh_table[eh->e_shstrndx]);
for (i= 0; i < eh->e_shnum; i++) {
for (i = 0; i < eh->e_shnum; i++) {
if (!strcmp(sh_str + sh_table[i]->sh_name, ".text")) {
*offset = sh_table[i]->sh_offset;
*size = sh_table[i]->sh_size;
sh_table[i]->sh_addr = (Elf64_Addr)(uintptr_t)
((char *)buf + sh_table[i]->sh_offset);
sh_table[i]->sh_addr =
(Elf64_Addr)(uintptr_t)((char *)buf
+ sh_table[i]->sh_offset);
ret = true;
break;
}
@ -134,12 +135,13 @@ get_text_section(void *buf, uint64_t *offset, uint64_t *size)
if (sh_table) {
read_section_header_table(eh, sh_table);
sh_str = get_section(eh, sh_table[eh->e_shstrndx]);
for (i= 0; i < eh->e_shnum; i++) {
for (i = 0; i < eh->e_shnum; i++) {
if (!strcmp(sh_str + sh_table[i]->sh_name, ".text")) {
*offset = sh_table[i]->sh_offset;
*size = sh_table[i]->sh_size;
sh_table[i]->sh_addr = (Elf32_Addr)(uintptr_t)
((char *)buf + sh_table[i]->sh_offset);
sh_table[i]->sh_addr =
(Elf32_Addr)(uintptr_t)((char *)buf
+ sh_table[i]->sh_offset);
ret = true;
break;
}