@@ -36,7 +36,7 @@ public async Task TestPrinter(string name)
3636 await Verifier . Verify ( afterReadText ) . UseParameters ( name ) ;
3737
3838 // Update the layout
39- var diagnostics = new DiagnosticBag ( ) ;
39+ var diagnostics = new DiagnosticBag ( ) { EnableStackTrace = true } ;
4040 peImage . UpdateLayout ( diagnostics ) ;
4141
4242 var afterUpdateWriter = new StringWriter ( ) ;
@@ -56,7 +56,7 @@ public async Task TestPrinter(string name)
5656
5757 // Write the PE back to a byte buffer
5858 var output = new MemoryStream ( ) ;
59- peImage . Write ( output ) ;
59+ peImage . Write ( output , new PEImageWriterOptions ( ) { EnableStackTrace = true } ) ;
6060 output . Position = 0 ;
6161 byte [ ] outputBuffer = output . ToArray ( ) ;
6262
@@ -142,7 +142,7 @@ public void TestCreatePE()
142142 // Write the PE to a file
143143 // ***************************************************************************
144144 var output = new MemoryStream ( ) ;
145- pe . Write ( output ) ;
145+ pe . Write ( output , new ( ) { EnableStackTrace = true } ) ;
146146 output . Position = 0 ;
147147
148148 var sourceFile = Path . Combine ( AppContext . BaseDirectory , "PE" , "generated_win64.exe" ) ;
@@ -176,7 +176,10 @@ public async Task TestWindows(string sourceFile)
176176 var inputBuffer = new byte [ stream . Length ] ;
177177 stream . ReadExactly ( inputBuffer ) ;
178178
179- peImage . UpdateLayout ( new DiagnosticBag ( ) ) ;
179+ peImage . UpdateLayout ( new DiagnosticBag ( )
180+ {
181+ EnableStackTrace = true
182+ } ) ;
180183
181184 var newSizeOfInitializedData = peImage . OptionalHeader . SizeOfInitializedData ;
182185
@@ -188,7 +191,7 @@ public async Task TestWindows(string sourceFile)
188191
189192 // Write the PE back to a byte buffer
190193 var output = new MemoryStream ( ) ;
191- peImage . Write ( output ) ;
194+ peImage . Write ( output , new PEImageWriterOptions ( ) { EnableStackTrace = true } ) ;
192195 output . Position = 0 ;
193196 var outputBuffer = output . ToArray ( ) ;
194197
0 commit comments