Skip to content

Commit 236ae07

Browse files
authored
Fix typo in RVA callstack module info extraction (#99)
1 parent ed84aa6 commit 236ae07

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Engine/StackResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public async Task<string> ResolveCallstacksAsync(List<StackDetails> listOfCallSt
320320

321321
this.StatusMessage = "Checking for embedded symbol information...";
322322
var syms = await ModuleInfoHelper.ParseModuleInfoAsync(listOfCallStacks, cts);
323-
if (syms == null) return "Unable to determine symbol information from XML frames - this may be caused by multiple PDB versions in the same input.";
323+
if (syms == null) return "Unable to determine symbol information (non-XML frames) - this may be caused by multiple PDB versions in the same input.";
324324
if (cts.IsCancellationRequested) { StatusMessage = OperationCanceled; PercentComplete = 0; return OperationCanceled; }
325325

326326
var symSrvSymPath = string.Empty;
@@ -332,7 +332,7 @@ public async Task<string> ResolveCallstacksAsync(List<StackDetails> listOfCallSt
332332
this.StatusMessage = "Looking for embedded XML-formatted frames and symbol information...";
333333
// attempt to check if there are XML-formatted frames each with the related PDB attributes and if so replace those lines with the normalized versions
334334
(syms, listOfCallStacks) = await ModuleInfoHelper.ParseModuleInfoXMLAsync(listOfCallStacks, cts);
335-
if (syms == null) return "Unable to determine symbol information from XML frames - this may be caused by multiple PDB versions in the same input.";
335+
if (syms == null) return "Unable to determine symbol information from XML frames - this may be caused by incomplete or malformed frames.";
336336
if (cts.IsCancellationRequested) { StatusMessage = OperationCanceled; PercentComplete = 0; return OperationCanceled; }
337337
if (syms.Count() > 0) {
338338
// if the user has provided such a list of module info, proceed to actually use dbghelp.dll / symsrv.dll to download thos PDBs and get local paths for them

Tests/Tests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,10 @@ private string PrepareLargeXEventInput() {
599599
var ret = await csr.ResolveCallstacksAsync(await csr.GetListofCallStacksAsync(input, false, cts), pdbPath, false, null, false, true, false, true, false, false, null, cts);
600600
var expected = "02 sqldk!MemoryClerkInternal::AllocatePagesWithFailureMode+644\r\n03 sqldk!Spinlock<244,2,1>::SpinToAcquireWithExponentialBackoff+349";
601601
Assert.AreEqual(expected.Trim(), ret.Trim());
602+
// modify the input to not have any prior PDB info - this will be an "error" case
603+
input = "Frame = <frame id=\"02\" name=\"sqldk.dll\" address = \"0x100440609\"/>\r\n<frame id=\"03\" name=\"sqldk.dll\" address=\"0x10042249f\" />\n";
604+
ret = await csr.ResolveCallstacksAsync(await csr.GetListofCallStacksAsync(input, false, cts), pdbPath, false, null, false, true, false, true, false, false, null, cts);
605+
Assert.IsTrue(ret.StartsWith("Unable to determine symbol information from XML frames"));
602606
}
603607

604608
/// End-to-end test with XE histogram target and XML frames.

0 commit comments

Comments
 (0)