Skip to content

Commit

Permalink
Update debugging notes
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Oct 8, 2023
1 parent b576489 commit bf62cdd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
8 changes: 2 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,11 @@ for arg in SIMD WASM_BIGINT JXL AVIF SVG MODULES BINDINGS; do
done

# Handy for debugging
#export CFLAGS="-O0 -gsource-map -pthread"
#export CXXFLAGS="$CFLAGS"
#export LDFLAGS="-L$TARGET/lib -O0 -gsource-map"
#COMMON_FLAGS="-Og -gsource-map -pthread"
#export EMCC_DEBUG=1

# Handy for catching bugs
#export CFLAGS="-Os -gsource-map -fsanitize=address -pthread"
#export CXXFLAGS="$CFLAGS"
#export LDFLAGS="-L$TARGET/lib -Os -gsource-map -fsanitize=address -sINITIAL_MEMORY=64MB"
#COMMON_FLAGS="-Os -gsource-map -fsanitize=address -pthread"

# Specify location where source maps are published (browser specific)
#export LDFLAGS+=" --source-map-base http://localhost:3000/lib/"
Expand Down
19 changes: 10 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,16 @@ set(MAIN_COMPILE_OPTIONS
)

# Handy for debugging
# --threadprofiler \
# -sSAFE_HEAP \
# -sSTACK_OVERFLOW_CHECK=2 \
# -sDISABLE_EXCEPTION_CATCHING=0 \
# -sASSERTIONS=2 \
# -sPTHREADS_DEBUG \
# -sLIBRARY_DEBUG \
# -sSYSCALL_DEBUG \
# -sDYLINK_DEBUG \
# --threadprofiler
# -sSAFE_HEAP
# -sASSERTIONS=2
# -sCHECK_NULL_WRITES=0
# -sPTHREADS_DEBUG
# -sDYLINK_DEBUG
# -sLIBRARY_DEBUG
# -sEXCEPTION_DEBUG
# -sSYSCALL_DEBUG
# -sDYLINK_DEBUG

# note 1: `ALLOW_MEMORY_GROWTH` may run non-wasm code slowly. See: https://github.com/WebAssembly/design/issues/1271.
# note 2: Browsers appear to limit the maximum initial memory size to 1GB, set `INITIAL_MEMORY` accordingly.
Expand Down

0 comments on commit bf62cdd

Please sign in to comment.