From f73ea3208834ef42a4d69c9fcf3e5b0f2eafd32e Mon Sep 17 00:00:00 2001 From: carlossanlop Date: Mon, 16 Sep 2019 11:45:58 -0700 Subject: [PATCH 1/5] Automatically port Reflection.PortableExecutable.DebugDirectory* --- .../DebugDirectoryBuilder.xml | 51 +++++++------ .../DebugDirectoryEntry.xml | 28 ++++--- .../DebugDirectoryEntryType.xml | 75 +++++++++++++++++-- 3 files changed, 116 insertions(+), 38 deletions(-) diff --git a/xml/System.Reflection.PortableExecutable/DebugDirectoryBuilder.xml b/xml/System.Reflection.PortableExecutable/DebugDirectoryBuilder.xml index f540465632e..6dc0016a15d 100644 --- a/xml/System.Reflection.PortableExecutable/DebugDirectoryBuilder.xml +++ b/xml/System.Reflection.PortableExecutable/DebugDirectoryBuilder.xml @@ -65,11 +65,14 @@ - To be added. - To be added. - To be added. - To be added. + Path to the PDB. Shall not be empty. + Unique id of the PDB content. + Version of Portable PDB format (e.g. 0x0100 for 1.0), or 0 if the PDB is not portable. + Adds a CodeView entry. To be added. + is . + contains NUL character. + is smaller than 0x0100. @@ -95,10 +98,12 @@ - To be added. - To be added. - To be added. + Portable PDB metadata builder. + Version of Portable PDB format (e.g. 0x0100 for 1.0). + Adds Embedded Portable PDB entry. To be added. + is . + is smaller than 0x0100. @@ -123,10 +128,10 @@ - To be added. - To be added. - To be added. - To be added. + Entry type. + Entry version. + Entry stamp. + Adds an entry. To be added. @@ -157,13 +162,13 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + Type of data passed to . + Entry type. + Entry version. + Entry stamp. + Data passed to . + Serializes data to a . + Adds an entry. To be added. @@ -188,10 +193,12 @@ - To be added. - To be added. - To be added. + Hash algorithm name (e.g. "SHA256"). + Checksum. + Adds PDB checksum entry. To be added. + or is . + or is empty. @@ -214,7 +221,7 @@ - To be added. + Adds Reproducible entry. To be added. diff --git a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntry.xml b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntry.xml index 0a3ef9e5a5d..128caec0834 100644 --- a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntry.xml +++ b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntry.xml @@ -23,7 +23,7 @@ - To be added. + Identifies the location, size and format of a block of debug information. To be added. @@ -84,7 +84,7 @@ System.Int32 - To be added. + The file pointer to the debug data. To be added. To be added. @@ -109,7 +109,7 @@ System.Int32 - To be added. + The address of the debug data when loaded, relative to the image base. To be added. To be added. @@ -134,7 +134,7 @@ System.Int32 - To be added. + The size of the debug data (not including the debug directory itself). To be added. To be added. @@ -158,7 +158,7 @@ System.Boolean - To be added. + if the entry is a entry pointing to a Portable PDB. To be added. To be added. @@ -183,7 +183,7 @@ System.UInt16 - To be added. + The major version number of the debug data format. To be added. To be added. @@ -208,7 +208,7 @@ System.UInt16 - To be added. + The minor version number of the debug data format. To be added. To be added. @@ -233,9 +233,17 @@ System.UInt32 - To be added. + The time and date that the debug data was created if the PE/COFF file is not deterministic, otherwise a value based on the hash of the content. To be added. - To be added. + + + @@ -258,7 +266,7 @@ System.Reflection.PortableExecutable.DebugDirectoryEntryType - To be added. + The format of debugging information. To be added. To be added. diff --git a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml index 8388cd19afc..fadcc70a9d6 100644 --- a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml +++ b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml @@ -42,7 +42,16 @@ 2 - To be added. + Associated PDB file description. + + + @@ -66,7 +75,16 @@ 1 - To be added. + The COFF debug information (line numbers, symbol table, and string table). + + + @@ -89,7 +107,21 @@ 17 - To be added. + The entry points to a blob containing Embedded Portable PDB. + + + @@ -110,7 +142,20 @@ 19 - To be added. + The entry stores crypto hash of the content of the symbol file the PE/COFF file was built with. + + + @@ -134,7 +179,25 @@ 16 - To be added. + Presence of this entry indicates deterministic PE/COFF file. + + must have all fields, except for Type zeroed. + +See https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/specs/PE-COFF.md#deterministic-debug-directory-entry-type-16 for specification. + + + ]]> + @@ -158,7 +221,7 @@ 0 - To be added. + An unknown value that is ignored by all tools. From 804feb50417527af0bd48ce9fb31481c121ff395 Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Thu, 26 Sep 2019 13:53:45 -0700 Subject: [PATCH 2/5] Made direct edits. --- .../DebugDirectoryBuilder.xml | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/xml/System.Reflection.PortableExecutable/DebugDirectoryBuilder.xml b/xml/System.Reflection.PortableExecutable/DebugDirectoryBuilder.xml index 6dc0016a15d..f6751828cd8 100644 --- a/xml/System.Reflection.PortableExecutable/DebugDirectoryBuilder.xml +++ b/xml/System.Reflection.PortableExecutable/DebugDirectoryBuilder.xml @@ -37,7 +37,7 @@ - To be added. + Initializes a new instance of the class. To be added. @@ -65,13 +65,13 @@ - Path to the PDB. Shall not be empty. - Unique id of the PDB content. - Version of Portable PDB format (e.g. 0x0100 for 1.0), or 0 if the PDB is not portable. + The path to the PDB. It should not be empty. + The unique id of the PDB content. + The version of Portable PDB format (e.g. 0x0100 for 1.0), or 0 if the PDB is not portable. Adds a CodeView entry. To be added. is . - contains NUL character. + contains a NUL character. is smaller than 0x0100. @@ -98,9 +98,9 @@ - Portable PDB metadata builder. - Version of Portable PDB format (e.g. 0x0100 for 1.0). - Adds Embedded Portable PDB entry. + A Portable PDB metadata builder. + The version of Portable PDB format (e.g. 0x0100 for 1.0). + Adds an Embedded Portable PDB entry. To be added. is . is smaller than 0x0100. @@ -128,10 +128,10 @@ - Entry type. - Entry version. - Entry stamp. - Adds an entry. + The entry type. + The entry version. + The entry stamp. + Adds an entry of the specified type. To be added. @@ -162,13 +162,13 @@ - Type of data passed to . - Entry type. - Entry version. - Entry stamp. - Data passed to . - Serializes data to a . - Adds an entry. + The type of the data passed to . + The entry type. + The entry version. + The entry stamp. + The data to pass to . + A serializer for serializing data to a . + Adds an entry of the specified type and serializes its data. To be added. @@ -193,8 +193,8 @@ - Hash algorithm name (e.g. "SHA256"). - Checksum. + The hash algorithm name (for example, "SHA256"). + The checksum. Adds PDB checksum entry. To be added. or is . @@ -221,7 +221,7 @@ - Adds Reproducible entry. + Adds a reproducible entry. To be added. From d20e03ef10362e709cacc6c580b94ef96b20b6a9 Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Thu, 26 Sep 2019 14:09:59 -0700 Subject: [PATCH 3/5] Made direct edits. --- .../DebugDirectoryEntry.xml | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntry.xml b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntry.xml index 128caec0834..74156e5756a 100644 --- a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntry.xml +++ b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntry.xml @@ -60,7 +60,7 @@ To be added. To be added. To be added. - To be added. + Initializes a new instance of the structure. To be added. @@ -84,8 +84,8 @@ System.Int32 - The file pointer to the debug data. - To be added. + Gets the file pointer to the debug data. + The file pointer to the debug data. To be added. @@ -109,8 +109,8 @@ System.Int32 - The address of the debug data when loaded, relative to the image base. - To be added. + Gets the address of the debug data when loaded, relative to the image base. + The address of the debug data relative to the image base. To be added. @@ -134,8 +134,8 @@ System.Int32 - The size of the debug data (not including the debug directory itself). - To be added. + Gets the size of the debug data (not including the debug directory itself). + the size of the debug data (excluding the debug directory). To be added. @@ -158,8 +158,8 @@ System.Boolean - if the entry is a entry pointing to a Portable PDB. - To be added. + Gets a value that indicates if the entry is a entry that points to a Portable PDB. + if the entry is a entry pointing to a Portable PDB; otherwise, . To be added. @@ -183,8 +183,8 @@ System.UInt16 - The major version number of the debug data format. - To be added. + Gets the major version number of the debug data format. + The major version number of the debug data format. To be added. @@ -208,8 +208,8 @@ System.UInt16 - The minor version number of the debug data format. - To be added. + Gets the minor version number of the debug data format. + The minor version number of the debug data format. To be added. @@ -233,8 +233,8 @@ System.UInt32 - The time and date that the debug data was created if the PE/COFF file is not deterministic, otherwise a value based on the hash of the content. - To be added. + Get the time and date that the debug data was created if the PE/COFF file is not deterministic; otherwise, gets a value based on the hash of the content. + for a non-deterministic PE/COFF file, the time and date that the debug data was created; otherwise, a value based on the hash of the content. System.Reflection.PortableExecutable.DebugDirectoryEntryType - The format of debugging information. - To be added. + Gets the format of the debugging information. + The format of the debugging information. To be added. From 35a54268b38d54a4444455e35d3bea03ae2a29f9 Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Thu, 26 Sep 2019 14:41:47 -0700 Subject: [PATCH 4/5] Added edits directly --- .../DebugDirectoryEntryType.xml | 86 ++++++------------- 1 file changed, 28 insertions(+), 58 deletions(-) diff --git a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml index fadcc70a9d6..4d79669f2a5 100644 --- a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml +++ b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml @@ -18,7 +18,30 @@ To be added. - To be added. + + must have all fields except for zeroed. + + ]]> + @@ -43,15 +66,6 @@ 2 Associated PDB file description. - - - @@ -75,16 +89,7 @@ See https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/ 1 - The COFF debug information (line numbers, symbol table, and string table). - - - + The COFF debug information (line numbers, symbol table, and string table). This type of debug information is also pointed to by fields in the file headers. @@ -107,21 +112,7 @@ This type of debug information is also pointed to by fields in the file headers. 17 - The entry points to a blob containing Embedded Portable PDB. - - - + The entry points to a blob containing Embedded Portable PDB. The Embedded Portable PDB blob has the following format:- blob ::= uncompressed-size data- Data spans the remainder of the blob and contains a Deflate-compressed Portable PDB. @@ -142,20 +133,7 @@ See https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/ 19 - The entry stores crypto hash of the content of the symbol file the PE/COFF file was built with. - - - + The entry stores a crypto hash of the content of the symbol file the PE/COFF file was built with. The hash can be used to validate that a given PDB file was built with the PE/COFF file and not altered in any way. More than one entry can be present if multiple PDBs were produced during the build of the PE/COFF file (e.g. private and public symbols). @@ -179,21 +157,13 @@ More than one entry can be present, in case multiple PDBs were produced during t 16 - Presence of this entry indicates deterministic PE/COFF file. + The presence of this entry indicates a deterministic PE/COFF file. See the Remarks section for more information. must have all fields, except for Type zeroed. -See https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/specs/PE-COFF.md#deterministic-debug-directory-entry-type-16 for specification. ]]> From 58d9db2764e816c021b6ca52f9435853ec1c2fbd Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Fri, 11 Oct 2019 10:23:16 -0700 Subject: [PATCH 5/5] Update DebugDirectoryEntryType.xml --- .../DebugDirectoryEntryType.xml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml index 4d79669f2a5..02cc5cd858e 100644 --- a/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml +++ b/xml/System.Reflection.PortableExecutable/DebugDirectoryEntryType.xml @@ -158,16 +158,6 @@ The debug directory entry of type 16 The presence of this entry indicates a deterministic PE/COFF file. See the Remarks section for more information. - - - @@ -191,7 +181,7 @@ The debug directory entry of type 0 - An unknown value that is ignored by all tools. + An unknown value that should be ignored by all tools.