src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Write out the debug infro required for PDB files to the PE file.
/// </summary>
Write out the debug infro required for PDB files to the PE file.
Write out the debug infro required for PDB files to the PE file .
private void WriteDebugInfo() {
            if (pdbWriter != null) {                  
                WriteZeros(4);                        
                Write(dateStamp);                     
                WriteZeros(4);                        
                Write(2);                             
                Write(debugBytesSize);             
                WriteZeros(4);                        
                Write(text.Offset() + debugOffset + debugSize);     
                if (Diag.DiagOn)
                    Debug.WriteLine("Debug Bytes Offset: " + BaseStream.Length.ToString());
                debugBytesStartOffset = BaseStream.Length;
                WriteZeros((uint)debugBytesSize);
                WriteZeros(NumToAlign((uint)debugBytesSize, 4));
            }
        }
private void WriteDebugInfo ( ) { if ( pdbWriter != null ) { WriteZeros ( 4 ) ; Write ( dateStamp ) ; WriteZeros ( 4 ) ; Write ( 2 ) ; Write ( debugBytesSize ) ; WriteZeros ( 4 ) ; Write ( text . Offset ( ) + debugOffset + debugSize ) ; if ( Diag . DiagOn ) Debug . WriteLine ( " " + BaseStream . Length . ToString ( ) ) ; debugBytesStartOffset = BaseStream . Length ; WriteZeros ( ( uint ) debugBytesSize ) ; WriteZeros ( NumToAlign ( ( uint ) debugBytesSize , 4 ) ) ; } }
Write out the debug infro required for PDB files to the PE file.
Write out the debug infro required for PDB files to the PE file .
// WINNT.h IMAGE_DEBUG_DIRECTORY // Characteristics // Date stamp // Major Version, Minor Version // Type  (Code View???) // Size of Data // Address of Raw Data // Pointer to Raw Data // Remember where the debug bytes need to be written to // For now don't write the real debug bytes. // Just fill the space so we can come and write them later. // Write(debugBytes);