-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
35 lines (30 loc) · 1.03 KB
/
Program.cs
File metadata and controls
35 lines (30 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.Runtime.InteropServices;
namespace PE2PDBUrl
{
internal class Program
{
private static void Main(string[] args)
{
if (args.Length != 1)
{
Console.WriteLine("PE2PDBUrl <PE File>");
return;
}
string file = args[0];
if (!File.Exists(file))
{
Console.WriteLine($"{file} does not exist");
return;
}
PEDebugInformation peDebugInformation = PEDebugInformation.GetDebugURLs(file);
if (string.IsNullOrEmpty(peDebugInformation.PEUrl) || string.IsNullOrEmpty(peDebugInformation.PDBUrl))
{
Console.WriteLine($"{file} cannot be parsed correctly to retrieve debug information");
return;
}
Console.WriteLine($"PE File: {file}");
Console.WriteLine($"PE Url: {peDebugInformation.PEUrl}");
Console.WriteLine($"PDB Url: {peDebugInformation.PDBUrl}");
}
}
}