Skip to content

Commit

Permalink
Added test for S_SEPCODE entries
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-Aldorasi-Imprivata committed Jan 14, 2022
1 parent ab7dcd4 commit 4b53f1e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,24 @@ jobs:
curl -Lo cvdump.exe https://raw.githubusercontent.com/microsoft/microsoft-pdb/HEAD/cvdump/cvdump.exe &&
./cvdump.exe world.pdb >world.cvdump &&
grep '^S_PUB32: .*, Flags: 00000000, main$' world.cvdump
- name: verify split functions
shell: bash
run: |
set -x &&
cat >split.c <<-\EOF &&
__attribute__((cold,noinline)) void cold() { volatile int i=0; }
__attribute__((dllexport)) void split_func(int i)
{
if (i)
cold();
}
EOF
gcc -g -O2 -shared -o split-dwarf.dll split.c &&
bin/${{env.BUILD_CONFIGURATION}}*/cv2pdb.exe split-dwarf.dll split-cv.dll &&
ls -l split-dwarf* split-cv* &&
curl -Lo cvdump.exe https://raw.githubusercontent.com/microsoft/microsoft-pdb/HEAD/cvdump/cvdump.exe &&
./cvdump.exe split-cv.pdb > split-cv.dump &&
awk '$2 == "S_GPROC32:" && $NF == "split_func" { scope=gensub(/,/,"",1,$3); } $2 == "S_SEPCODE:" { getline; if ($4 == scope) found=1; } END {exit !found; }' split-cv.dump

0 comments on commit 4b53f1e

Please sign in to comment.