Skip to content

Commit a02de4e

Browse files
authored
Prompt user if symbol path is not specified (#102)
1 parent 2661893 commit a02de4e

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

GUI/MainForm.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ public MainForm() {
2121
internal static readonly string LatestReleaseTimestampCulture = "en-US";
2222

2323
private void ResolveCallstacks_Click(object sender, EventArgs e) {
24-
List<string> dllPaths = null;
25-
if (!string.IsNullOrEmpty(binaryPaths.Text)) dllPaths = binaryPaths.Text.Split(';').ToList();
24+
if (string.IsNullOrWhiteSpace(pdbPaths.Text)) {
25+
MessageBox.Show(this,
26+
"Please specify path(s) to PDB files!",
27+
"No symbol path(s) specified", MessageBoxButtons.OK, MessageBoxIcon.Error);
28+
return;
29+
}
30+
2631
var res = this._resolver.ProcessBaseAddresses(this._baseAddressesString);
2732
if (!res) {
2833
MessageBox.Show(this, "Cannot interpret the module base address information. Make sure you just have the output of the following query (no column headers, no other columns) copied from SSMS using the Grid Results\r\n\r\nselect name, base_address from sys.dm_os_loaded_modules where name not like '%.rll'",
@@ -85,12 +90,12 @@ private void ResolveCallstacks_Click(object sender, EventArgs e) {
8590
allStacks = allStacksTask.Result;
8691
}
8792
if (allStacks.Any()) using (BackgroundCTS = new CancellationTokenSource()) {
88-
var resolverTask = this._resolver.ResolveCallstacksAsync(allStacks, pdbPaths.Text, pdbRecurse.Checked, dllPaths,
93+
var resolverTask = this._resolver.ResolveCallstacksAsync(allStacks, pdbPaths.Text, pdbRecurse.Checked, string.IsNullOrEmpty(binaryPaths.Text) ? null : binaryPaths.Text.Split(';').ToList(),
8994
DLLrecurse.Checked, IncludeLineNumbers.Checked, RelookupSource.Checked,
9095
includeOffsets.Checked, showInlineFrames.Checked, cachePDB.Checked, outputFilePath.Text, BackgroundCTS);
91-
this.MonitorBackgroundTask(resolverTask);
92-
finalOutput.Text = resolverTask.Result;
93-
}
96+
this.MonitorBackgroundTask(resolverTask);
97+
finalOutput.Text = resolverTask.Result;
98+
}
9499

95100
if (finalOutput.Text.Contains("WARNING:")) {
96101
MessageBox.Show(this,

0 commit comments

Comments
 (0)