mirror of
https://github.com/reactos/reactosdbg.git
synced 2024-11-23 11:49:53 +00:00
6030ecd415
locals and stack trace at the place where reactos is stopped. svn path=/trunk/tools/reactosdbg/; revision=759
50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.IO;
|
|
|
|
namespace RosDBG
|
|
{
|
|
class ModuleIndex
|
|
{
|
|
string mReactOSBuild;
|
|
Dictionary<string, string> mModcache = new Dictionary<string, string>();
|
|
|
|
public string ReactOSBuild
|
|
{
|
|
get { return mReactOSBuild; }
|
|
set
|
|
{
|
|
mReactOSBuild = value;
|
|
mModcache.Clear();
|
|
if (mReactOSBuild != null)
|
|
ReadDirs(mReactOSBuild);
|
|
}
|
|
}
|
|
|
|
void ReadDirs(string dir)
|
|
{
|
|
foreach (string subdir in Directory.GetDirectories(dir))
|
|
ReadDirs(Path.Combine(dir, subdir));
|
|
|
|
foreach (string file in Directory.GetFiles(dir))
|
|
mModcache[Path.GetFileNameWithoutExtension(file).ToLowerInvariant()] =
|
|
Path.Combine(dir, file);
|
|
}
|
|
|
|
public ModuleIndex()
|
|
{
|
|
}
|
|
|
|
public string GetModuleByName(string name)
|
|
{
|
|
string result;
|
|
if (mModcache.TryGetValue(name.ToLowerInvariant(), out result))
|
|
return result;
|
|
else
|
|
return null;
|
|
}
|
|
}
|
|
}
|