2017-06-20 01:21:45 +08:00
|
|
|
Test the linker line tables on roughly the following example:
|
|
|
|
|
|
|
|
==> foo.h <==
|
|
|
|
void bar(void);
|
|
|
|
inline void foo(void) {
|
|
|
|
bar();
|
|
|
|
}
|
|
|
|
==> pdb_lines_1.c <==
|
|
|
|
#include "foo.h"
|
|
|
|
int main(void) {
|
|
|
|
foo();
|
|
|
|
return 42;
|
|
|
|
}
|
|
|
|
==> pdb_lines_2.c <==
|
|
|
|
void bar(void) {
|
|
|
|
}
|
|
|
|
|
|
|
|
$ cl -c -Z7 pdb_lines*.c
|
|
|
|
|
|
|
|
RUN: yaml2obj %S/Inputs/pdb_lines_1.yaml -o %t.pdb_lines_1.obj
|
|
|
|
RUN: yaml2obj %S/Inputs/pdb_lines_2.yaml -o %t.pdb_lines_2.obj
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
RUN: rm -f %t.exe %t.pdb
|
2017-06-20 01:21:45 +08:00
|
|
|
RUN: lld-link -debug -entry:main -nodefaultlib -out:%t.exe -pdb:%t.pdb %t.pdb_lines_1.obj %t.pdb_lines_2.obj
|
|
|
|
RUN: llvm-pdbutil pdb2yaml -modules -module-files -subsections=lines,fc %t.pdb | FileCheck %s
|
|
|
|
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-LABEL: DbiStream:
|
Fix some differences between lld and MSVC generated PDBs.
A couple of things were different about our generated PDBs.
1) We were outputting the wrong Version on the PDB Stream.
The version we were setting was newer than what MSVC is setting.
It's not clear what the implications are, but we change LLD
to use PdbImplVC70, as MSVC does.
2) For the optional debug stream indices in the DBI Stream, we
were outputting 0 to mean "the stream is not present". MSVC
outputs uint16_t(-1), which is the "correct" way to specify
that a stream is not present. So we fix that as well.
3) We were setting the PDB Stream signature to 0. This is supposed
to be the result of calling time(nullptr). Although this leads
to non-deterministic builds, a better way to solve that is by
having a command line option explicitly for generating a
reproducible build, and have the default behavior of lld-link
match the default behavior of link.
To test this, I'm making use of the new and improved `pdb diff`
sub command. To make it suitable for writing tests against, I had
to modify the diff subcommand slightly to print less verbose output.
Previously it would always print | <column> | <value1> | <value2> |
which is quite verbose, and the values are fragile. All we really
want to know is "did we produce the same value as link?" So I added
command line options to print a single character representing the
result status (different, identical, equivalent), and another to
hide the value display. Note that just inspecting the diff output
used to write the test, you can see some things that are obviously
wrong. That is just reflective of the fact that this is the state
of affairs today, not that we're asserting that this is "correct".
We can use this as a starting point to discover differences, fix
them, and update the test.
Differential Revision: https://reviews.llvm.org/D35086
llvm-svn: 307422
2017-07-08 02:45:56 +08:00
|
|
|
CHECK-NEXT: VerHeader: V70
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: Age: 1
|
|
|
|
CHECK-NEXT: BuildNumber: 0
|
|
|
|
CHECK-NEXT: PdbDllVersion: 0
|
|
|
|
CHECK-NEXT: PdbDllRbld: 0
|
|
|
|
CHECK-NEXT: Flags: 0
|
|
|
|
CHECK-NEXT: MachineType: x86
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Modules:
|
2017-06-20 01:21:45 +08:00
|
|
|
|
2017-06-20 01:27:31 +08:00
|
|
|
CHECK-LABEL: - Module: {{.*}}pdb_lines_1.obj
|
|
|
|
CHECK-NEXT: ObjFile: {{.*}}pdb_lines_1.obj
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: SourceFiles:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - '{{.*}}pdb_lines_1.c'
|
|
|
|
CHECK-NEXT: - '{{.*}}foo.h'
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Subsections:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - !Lines
|
|
|
|
CHECK-NEXT: CodeSize: 19
|
|
|
|
CHECK-NEXT: Flags: [ ]
|
|
|
|
CHECK-NEXT: RelocOffset: 0
|
|
|
|
CHECK-NEXT: RelocSegment: 2
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Blocks:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - FileName: '{{.*}}pdb_lines_1.c'
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Lines:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - Offset: 0
|
|
|
|
CHECK-NEXT: LineStart: 2
|
|
|
|
CHECK-NEXT: IsStatement: true
|
|
|
|
CHECK-NEXT: EndDelta: 0
|
|
|
|
CHECK-NEXT: - Offset: 4
|
|
|
|
CHECK-NEXT: LineStart: 3
|
|
|
|
CHECK-NEXT: IsStatement: true
|
|
|
|
CHECK-NEXT: EndDelta: 0
|
|
|
|
CHECK-NEXT: - Offset: 9
|
|
|
|
CHECK-NEXT: LineStart: 4
|
|
|
|
CHECK-NEXT: IsStatement: true
|
|
|
|
CHECK-NEXT: EndDelta: 0
|
|
|
|
CHECK-NEXT: - Offset: 14
|
|
|
|
CHECK-NEXT: LineStart: 5
|
|
|
|
CHECK-NEXT: IsStatement: true
|
|
|
|
CHECK-NEXT: EndDelta: 0
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Columns:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - !Lines
|
|
|
|
CHECK-NEXT: CodeSize: 14
|
|
|
|
CHECK-NEXT: Flags: [ ]
|
|
|
|
CHECK-NEXT: RelocOffset: 32
|
|
|
|
CHECK-NEXT: RelocSegment: 2
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Blocks:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - FileName: '{{.*}}foo.h'
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Lines:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - Offset: 0
|
|
|
|
CHECK-NEXT: LineStart: 2
|
|
|
|
CHECK-NEXT: IsStatement: true
|
|
|
|
CHECK-NEXT: EndDelta: 0
|
|
|
|
CHECK-NEXT: - Offset: 4
|
|
|
|
CHECK-NEXT: LineStart: 3
|
|
|
|
CHECK-NEXT: IsStatement: true
|
|
|
|
CHECK-NEXT: EndDelta: 0
|
|
|
|
CHECK-NEXT: - Offset: 9
|
|
|
|
CHECK-NEXT: LineStart: 4
|
|
|
|
CHECK-NEXT: IsStatement: true
|
|
|
|
CHECK-NEXT: EndDelta: 0
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Columns:
|
2018-01-06 03:12:40 +08:00
|
|
|
CHECK-NEXT: - !FileChecksums
|
|
|
|
CHECK-NEXT: Checksums:
|
|
|
|
CHECK-NEXT: - FileName: '{{.*}}pdb_lines_1.c'
|
|
|
|
CHECK-NEXT: Kind: MD5
|
|
|
|
CHECK-NEXT: Checksum: 4EB19DCD86C3BA2238A255C718572E7B
|
|
|
|
CHECK-NEXT: - FileName: '{{.*}}foo.h'
|
|
|
|
CHECK-NEXT: Kind: MD5
|
|
|
|
CHECK-NEXT: Checksum: 061EB73ABB642532857A4F1D9CBAC323
|
2017-06-20 01:21:45 +08:00
|
|
|
|
2017-06-20 01:27:31 +08:00
|
|
|
CHECK-LABEL: - Module: {{.*}}pdb_lines_2.obj
|
|
|
|
CHECK-NEXT: ObjFile: {{.*}}pdb_lines_2.obj
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: SourceFiles:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - '{{.*}}pdb_lines_2.c'
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Subsections:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - !Lines
|
|
|
|
CHECK-NEXT: CodeSize: 1
|
|
|
|
CHECK-NEXT: Flags: [ ]
|
|
|
|
CHECK-NEXT: RelocOffset: 48
|
|
|
|
CHECK-NEXT: RelocSegment: 2
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Blocks:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - FileName: '{{.*}}pdb_lines_2.c'
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Lines:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - Offset: 0
|
|
|
|
CHECK-NEXT: LineStart: 1
|
|
|
|
CHECK-NEXT: IsStatement: true
|
|
|
|
CHECK-NEXT: EndDelta: 0
|
|
|
|
CHECK-NEXT: - Offset: 0
|
|
|
|
CHECK-NEXT: LineStart: 2
|
|
|
|
CHECK-NEXT: IsStatement: true
|
|
|
|
CHECK-NEXT: EndDelta: 0
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Columns:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - !FileChecksums
|
[LLD COFF/PDB] Incrementally update the build id.
Previously, our algorithm to compute a build id involved hashing the
executable and storing that as the GUID in the CV Debug Record chunk,
and setting the age to 1.
This breaks down in one very obvious case: a user adds some newlines to
a file, rebuilds, but changes nothing else. This causes new line
information and new file checksums to get written to the PDB, meaning
that the debug info is different, but the generated code would be the
same, so we would write the same build over again with an age of 1.
Anyone using a symbol cache would have a problem now, because the
debugger would open the executable, look at the age and guid, find a
matching PDB in the symbol cache and then load it. It would never copy
the new PDB to the symbol cache.
This patch implements the canonical Windows algorithm for updating
a build id, which is to check the existing executable first, and
re-use an existing GUID while bumping the age if it already
exists.
Differential Revision: https://reviews.llvm.org/D36758
llvm-svn: 310961
2017-08-16 05:31:41 +08:00
|
|
|
CHECK-NEXT: Checksums:
|
2017-06-20 01:21:45 +08:00
|
|
|
CHECK-NEXT: - FileName: '{{.*}}pdb_lines_2.c'
|
|
|
|
CHECK-NEXT: Kind: MD5
|
|
|
|
CHECK-NEXT: Checksum: DF91CB3A2B8D917486574BB50CAC4CC7
|
|
|
|
CHECK-NEXT: - Module: '* Linker *'
|
|
|
|
CHECK-NEXT: ObjFile: ''
|