Skip to content

Commit

Permalink
Show imported file names while debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
TollyH committed May 31, 2023
1 parent f07ae17 commit 28ac883
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,20 @@ void DisplayDebugInfo()
Console.Write($"\n\nAbout to execute instruction:\n ");
Console.WriteLine(lineDisassembly);
Console.WriteLine();
if (debugInfoFile is not null && debugInfoFile.Value.AddressLabels.TryGetValue(currentAddress, out string[]? labels))
if (debugInfoFile is not null)
{
Console.Write("This address is referenced by the following labels:\n ");
Console.WriteLine(string.Join("\n ", labels));
Console.WriteLine();
if (debugInfoFile.Value.AddressLabels.TryGetValue(currentAddress, out string[]? labels))
{
Console.Write("This address is referenced by the following labels:\n ");
Console.WriteLine(string.Join("\n ", labels));
Console.WriteLine();
}
if (debugInfoFile.Value.ImportLocations.TryGetValue(currentAddress, out string? importName))
{
Console.Write("The following file was imported here:\n ");
Console.WriteLine(importName);
Console.WriteLine();
}
}
Console.WriteLine("Register states:");
foreach (int register in Enum.GetValues(typeof(Data.Register)))
Expand Down

0 comments on commit 28ac883

Please sign in to comment.