Skip to content

Commit

Permalink
run-lldb-tests: Skip the separate strip step when using PDB files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mstorsjo committed Jan 30, 2024
1 parent 1d276f5 commit 021af31
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions run-lldb-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand All @@ -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
Expand Down

0 comments on commit 021af31

Please sign in to comment.