File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 echo "=== M2: xpkg dylib + rpath ==="
9494 $C -o ut_m2 obj/ut.o obj/boost.ut.m.o -L"$pkgroot/lib" -lc++ -lc++abi -Wl,-rpath,"$pkgroot/lib" 2>&1 | tail -5 || true
9595 runit ut_m2 "M2(xpkg dylib+rpath)"
96- echo "=== K init_offsets symbolization ==="
97- offs=$(otool -s __TEXT __init_offsets ut_k 2>/dev/null | awk 'NR>2 {for(i=1;i<=NF;i++) if ($i ~ /^[0-9a-f]{8}$/) print $i}')
98- printf 'settings set target.disable-aslr true\nrun\n' > /tmp/y.lldb
99- for off in $offs; do addr=$((16#$off)); printf 'image lookup -a 0x%x\n' $((0x100000000 + addr)) >> /tmp/y.lldb; done
100- lldb -b -s /tmp/y.lldb -- ./ut_k 2>&1 | grep -E "image lookup -a|Summary:|Function:" | head -80 || true
96+ echo "=== K backtrace + guard disasm ==="
97+ printf 'settings set target.disable-aslr true\nrun\nbt\nregister read pc x0 x1\n' > /tmp/z.lldb
98+ lldb -b -s /tmp/z.lldb -- ./ut_k 2>&1 | tail -45 || true
99+ echo "=== K guard init disasm (0x100020534 = first guarded.cppm init) ==="
100+ printf 'settings set target.disable-aslr true\nrun\ndisassemble -s 0x100020534 -c 25\n' > /tmp/w.lldb
101+ lldb -b -s /tmp/w.lldb -- ./ut_k 2>&1 | tail -40 || true
102+ echo "=== O runtime init order ==="
103+ DYLD_PRINT_INITIALIZERS=1 ./ut_o 2>&1 | grep -v "^dyld\[" | head -8 || true
104+ DYLD_PRINT_INITIALIZERS=1 ./ut_o 2>&1 | grep "^dyld\[" | head -40 || true
105+ echo "=== O abort backtrace ==="
106+ printf 'settings set target.disable-aslr true\nrun\nbt all\n' > /tmp/v.lldb
107+ lldb -b -s /tmp/v.lldb -- ./ut_o 2>&1 | tail -50 || true
You can’t perform that action at this time.
0 commit comments