From 021af31c8d0dba2e34a7a7dfc6eecbff7b4d46cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 18 Dec 2023 13:26:04 +0200 Subject: [PATCH] run-lldb-tests: Skip the separate strip step when using PDB files Since 7dcd8ef135147de1576c2863b963ec929a15e8cb in llvm-project (Dec 15th), LLD can strip out the bundled DWARF debug info directly when linking, while creating a PDB file, simplifying this test case. --- run-lldb-tests.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/run-lldb-tests.sh b/run-lldb-tests.sh index bf6d8346..a8f54caf 100755 --- a/run-lldb-tests.sh +++ b/run-lldb-tests.sh @@ -28,7 +28,6 @@ export PATH=$PREFIX/bin:$PATH # in msys2 bash and in bash in WSL. : ${CXX:=clang++.exe} : ${LLDB:=lldb.exe} -: ${STRIP:=strip.exe} : ${OBJCOPY:=objcopy.exe} TARGET=$(clang.exe --version | grep Target: | awk '{print $2}') @@ -44,12 +43,8 @@ mkdir -p $TEST_DIR # Build an executable with DWARF debug info $CXX hello-exception.cpp -o $TEST_DIR/hello-exception-dwarf.exe -g -# Build an executable with PDB debug info -$CXX hello-exception.cpp -o $TEST_DIR/hello-exception-pdb.exe -g -gcodeview -Wl,--pdb= -# Strip the executable that uses pdb; the crt startup files and mingw static -# library object files have dwarf debug info, so the binary has got a bit of -# both, and lldb would choose to use the dwarf parts unless we strip it. -$STRIP $TEST_DIR/hello-exception-pdb.exe +# Build an executable with PDB debug info. Strip out any bundled DWARF debug info. +$CXX hello-exception.cpp -o $TEST_DIR/hello-exception-pdb.exe -g -gcodeview -Wl,--pdb= -Wl,-s # Make a DWARF split debug info file with gnu debuglink. cp $TEST_DIR/hello-exception-dwarf.exe $TEST_DIR/hello-exception-split.exe