@@ -168,6 +168,67 @@ it("reports NB10 declared age without inventing a GUID", () => {
168168 expect ( caveats [ 0 ] ) . not . toContain ( "GUID" ) ;
169169} ) ;
170170
171+ it . each ( [ false , null , true ] ) (
172+ "keeps an omitted NB10 GUID unknown with loaded = %s" ,
173+ ( loaded ) => {
174+ const pdbPath = "a" . repeat ( 4070 ) + "\\legacy.pdb" ;
175+ const legacy = {
176+ ...target ,
177+ codeView : {
178+ pdbPath,
179+ pdbFileName : "legacy.pdb" ,
180+ guid : null ,
181+ age : 2 ,
182+ } ,
183+ } ;
184+ const pdb = {
185+ ...absentAttributes ,
186+ file : pdbPath ,
187+ age : "2" ,
188+ signature : "01234567" ,
189+ version : "NB10" ,
190+ loaded,
191+ } ;
192+ expect ( ghidraPePdbLimitations ( legacy , pdb ) ) . toEqual (
193+ ghidraPdbLimitations ( pdb ) ,
194+ ) ;
195+ const omitted : GhidraSessionInfo [ "pdb" ] = {
196+ ...pdb ,
197+ resource_limit : { omitted_attributes : [ "guid" ] , utf16_budget : 4096 } ,
198+ } ;
199+ const caveats = ghidraPePdbLimitations ( legacy , omitted ) ;
200+ expect ( caveats ) . toEqual ( [
201+ ...ghidraPdbLimitations ( omitted ) ,
202+ expect . stringContaining ( 'PDB "legacy.pdb" (age (decimal) 2)' ) ,
203+ ] ) ;
204+ expect ( caveats . at ( - 1 ) ) . toContain ( "equivalence is not established" ) ;
205+ } ,
206+ ) ;
207+
208+ it . each ( [ "signature" , "version" ] as const ) (
209+ "keeps matching NB10 identity when only %s is omitted" ,
210+ ( attribute ) => {
211+ const legacy = {
212+ ...target ,
213+ codeView : {
214+ pdbPath : "legacy.pdb" ,
215+ pdbFileName : "legacy.pdb" ,
216+ guid : null ,
217+ age : 2 ,
218+ } ,
219+ } ;
220+ const pdb : GhidraSessionInfo [ "pdb" ] = {
221+ ...absentAttributes ,
222+ file : "legacy.pdb" ,
223+ age : "2" ,
224+ resource_limit : { omitted_attributes : [ attribute ] , utf16_budget : 4096 } ,
225+ } ;
226+ expect ( ghidraPePdbLimitations ( legacy , pdb ) ) . toEqual (
227+ ghidraPdbLimitations ( pdb ) ,
228+ ) ;
229+ } ,
230+ ) ;
231+
171232it ( "retains missing-report uncertainty without a declared CodeView record" , ( ) => {
172233 const { codeView : _ , ...withoutReference } = target ;
173234 expect ( ghidraPePdbLimitations ( withoutReference , undefined ) ) . toEqual (
0 commit comments