[PATCH] D33968: [codeview] use 32-bit integer for RelocOffset in DebugLinesSubsection
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 17:22:03 PDT 2017
Lgtm
On Tue, Jun 6, 2017 at 5:13 PM Bob Haarman via Phabricator <
reviews at reviews.llvm.org> wrote:
> inglorion created this revision.
> Herald added a reviewer: hiraditya.
>
> RelocOffset is a 32-bit value, but we previously truncated it to 16 bits.
>
> Fixes PR33335.
>
>
> https://reviews.llvm.org/D33968
>
> Files:
> llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h
> llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
> llvm/test/DebugInfo/PDB/Inputs/simple-line-info.yaml
> llvm/test/DebugInfo/PDB/pdbdump-yaml-lineinfo-write.test
>
>
> Index: llvm/test/DebugInfo/PDB/pdbdump-yaml-lineinfo-write.test
> ===================================================================
> --- llvm/test/DebugInfo/PDB/pdbdump-yaml-lineinfo-write.test
> +++ llvm/test/DebugInfo/PDB/pdbdump-yaml-lineinfo-write.test
> @@ -29,7 +29,7 @@
> LINES-NEXT: Lines {
> LINES-NEXT: Block {
> LINES-NEXT: RelocSegment: 1
> -LINES-NEXT: RelocOffset: 16
> +LINES-NEXT: RelocOffset: 100016
> LINES-NEXT: CodeSize: 10
> LINES-NEXT: HasColumns: No
> LINES-NEXT: Lines {
> Index: llvm/test/DebugInfo/PDB/Inputs/simple-line-info.yaml
> ===================================================================
> --- llvm/test/DebugInfo/PDB/Inputs/simple-line-info.yaml
> +++ llvm/test/DebugInfo/PDB/Inputs/simple-line-info.yaml
> @@ -17,7 +17,7 @@
> - !Lines
> CodeSize: 10
> Flags: [ ]
> - RelocOffset: 16
> + RelocOffset: 100016
> RelocSegment: 1
> Blocks:
> - FileName:
> 'd:\src\llvm\test\debuginfo\pdb\inputs\empty.cpp'
> Index: llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
> ===================================================================
> --- llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
> +++ llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
> @@ -145,7 +145,7 @@
> }
>
> void DebugLinesSubsection::setRelocationAddress(uint16_t Segment,
> - uint16_t Offset) {
> + uint32_t Offset) {
> RelocOffset = Offset;
> RelocSegment = Segment;
> }
> Index: llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h
> ===================================================================
> --- llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h
> +++ llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h
> @@ -122,16 +122,16 @@
> uint32_t calculateSerializedSize() const override;
> Error commit(BinaryStreamWriter &Writer) const override;
>
> - void setRelocationAddress(uint16_t Segment, uint16_t Offset);
> + void setRelocationAddress(uint16_t Segment, uint32_t Offset);
> void setCodeSize(uint32_t Size);
> void setFlags(LineFlags Flags);
>
> bool hasColumnInfo() const;
>
> private:
> DebugChecksumsSubsection &Checksums;
>
> - uint16_t RelocOffset = 0;
> + uint32_t RelocOffset = 0;
> uint16_t RelocSegment = 0;
> uint32_t CodeSize = 0;
> LineFlags Flags = LF_None;
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170607/d096f623/attachment.html>
More information about the llvm-commits
mailing list