update radare2 config

This commit is contained in:
2026-03-17 20:40:57 +01:00
parent e23a3d5033
commit 35dec73236
2 changed files with 50 additions and 7 deletions

View File

@ -85,10 +85,53 @@ remove-db:
gdb module:
gdb --tui {{ BUILD_DIR }}-{{ module }}/system.elf
[doc("Launch radare2")]
# [doc("Launch radare2 at address and disassemble")]
# [group("debug")]
# r2 module addr="dbg.os_main":
# # -e asm.section=true
# # -e asm.bytes=true
# radare2 -AA \
# -c "f TARGET @ {{ addr }}; s {{ addr }}; pd-- 30" \
# -e asm.syntax=intel \
# -e asm.lines=false \
# -e asm.xrefs=true \
# -e asm.flags=true \
# -e asm.comments=true \
# -e asm.functions=true \
# -e asm.var=true \
# -e asm.cmt.right=true \
# -e asm.dwarf=true \
# -e asm.pseudo=false \
# -e asm.describe=false \
# -e bin.relocs.apply=true \
# {{ BUILD_DIR }}-{{ module }}/system.elf
[doc("Launch radare2 at address (interactive)")]
[group("debug")]
radare module addr="dbg.os_main":
radare2 -AA -c "s {{ addr }}; pdf" -e bin.relocs.apply=true {{ BUILD_DIR }}-{{ module }}/system.elf
r2i module addr="dbg.os_main":
# -e asm.section=true
# -e asm.bytes=true
radare2 -AA \
-c "s {{ addr }}" \
-e scr.color=3 \
-e scr.scrollbar=1 \
-e scr.responsive=true \
-e scr.interactive=true \
-e src.utf8=true \
-e src.utf8.curvy=true \
-e asm.syntax=intel \
-e asm.lines=true \
-e asm.xrefs=true \
-e asm.flags=true \
-e asm.comments=true \
-e asm.functions=true \
-e asm.var=true \
-e asm.cmt.right=true \
-e asm.dwarf=true \
-e asm.pseudo=false \
-e asm.describe=false \
-e bin.relocs.apply=true \
{{ BUILD_DIR }}-{{ module }}/system.elf
# =================================================================================================================== #
# Just do it

View File

@ -24,7 +24,7 @@ CROSS_CFLAGS_NOWASM := "\
-fomit-frame-pointer \
-ggdb \
"
CROSS_LDFLAGS_NOWASM := f"\
CROSS_LDFLAGS_NOWASM := "\
-Wl,--build-id=none \
-static \
-nostdlib \
@ -40,7 +40,7 @@ LINUX_CFLAGS_NOWASM := "\
-fdata-sections \
-ggdb \
"
LINUX_LDFLAGS_NOWASM := f"\
LINUX_LDFLAGS_NOWASM := "\
-Wl,--build-id=none \
-m32 \
-lm \
@ -104,7 +104,7 @@ build-c-module module target="fail":
# FAIL*
CROSS_CFLAGS := f"-I./targets/wasm-host {{CROSS_CFLAGS_NOWASM}} -O2"
CROSS_LDFLAGS := f"{{CROSS_LDFLAGS_NOWASM}} -L{{LIBIWASM_RELEASE}} -liwasm"
CROSS_LDFLAGS := f"-L{{LIBIWASM_RELEASE}} -liwasm {{CROSS_LDFLAGS_NOWASM}}"
CROSS_INCLUDES := f"\
-I{{WAMR_ROOT}}/core/iwasm/include \
-I{{WAMR_ROOT}}/core/shared/utils \
@ -114,7 +114,7 @@ CROSS_INCLUDES := f"\
# LINUX-POSIX
LINUX_CFLAGS := f"-I./targets/wasm-host {{ LINUX_CFLAGS_NOWASM }}"
LINUX_LDFLAGS := f"{{LINUX_LDFLAGS_NOWASM}} -Wl,-rpath,{{LIBIWASM_LINUX_DEBUG}} -L{{LIBIWASM_LINUX_DEBUG}} -liwasm"
LINUX_LDFLAGS := f"-Wl,-rpath,{{LIBIWASM_LINUX_DEBUG}} -L{{LIBIWASM_LINUX_DEBUG}} -liwasm {{LINUX_LDFLAGS_NOWASM}}"
LINUX_INCLUDES := f"\
-I{{WAMR_ROOT}}/core/iwasm/include \
-I{{WAMR_ROOT}}/core/shared/utils \