Skip to content

Commit f0122e6

Browse files
Renaming everything to SharpDebug (#40)
Renaming all projects and moving them into new folders. Increasing version to 2.0 Renaming namespace to SharpDebug. Using SharpDebug_dumps. Changing license to MIT.
1 parent 1651f54 commit f0122e6

File tree

632 files changed

+1269
-1527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

632 files changed

+1269
-1527
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,16 @@ ModelManifest.xml
214214
# Custom project files
215215
*.VC.opendb
216216
*.VC.db
217-
/Utility/CsDebugScript.Reference/Help
217+
/Utility/SharpDebug.Reference/Help
218218
/NuGet.Packager/lib
219219

220220
# temp gvim files
221221
*.swp
222222
*.swo
223-
/Source/CsDebugScript.VS/Microsoft.CodeAnalysis.dll
224-
/Source/CsDebugScript.VS/Microsoft.CodeAnalysis.CSharp.dll
225-
/Source/CsDebugScript.VS/System.Collections.Immutable.dll
226-
/Source/CsDebugScript.VS/System.IO.FileSystem.dll
227-
/Source/CsDebugScript.VS/System.Reflection.Metadata.dll
223+
/Source/SharpDebug.VS/Microsoft.CodeAnalysis.dll
224+
/Source/SharpDebug.VS/Microsoft.CodeAnalysis.CSharp.dll
225+
/Source/SharpDebug.VS/System.Collections.Immutable.dll
226+
/Source/SharpDebug.VS/System.IO.FileSystem.dll
227+
/Source/SharpDebug.VS/System.Reflection.Metadata.dll
228228
/Source/DiaHelpers/Dia2Lib.dll
229229
/dumps

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "dumps/Source"]
22
path = dumps/Source
3-
url = https://github.com/southpolenator/WinDbgCs_dumps/
3+
url = https://github.com/southpolenator/SharpDebug_dumps/

Documentation/Build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Before running tests, you need to download all dumps. Execute `dumps\download.ps
1212

1313
With Visual Studio, you can use __Test Explorer__ to find and execute tests.
1414

15-
Enter `Tests\CsDebugScript.Tests.Native` directory. Run `dotnet test` command.
15+
Enter `Tests\SharpDebug.Tests.Native` directory. Run `dotnet test` command.

Documentation/CodeGen.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,26 @@ Here is an example XML configuration file:
4747
</Modules>
4848
<Transformations>
4949
<Transformation OriginalType="std::any"
50-
NewType="CsDebugScript.CommonUserTypes.NativeTypes.std.any" />
50+
NewType="SharpDebug.CommonUserTypes.NativeTypes.std.any" />
5151
<Transformation OriginalType="std::array&lt;${T},${Length}&gt;"
52-
NewType="CsDebugScript.CommonUserTypes.NativeTypes.std.array&lt;${T}&gt;" />
52+
NewType="SharpDebug.CommonUserTypes.NativeTypes.std.array&lt;${T}&gt;" />
5353
<Transformation OriginalType="std::basic_string&lt;char,${char_traits},${allocator}&gt;"
54-
NewType="CsDebugScript.CommonUserTypes.NativeTypes.std.@string" />
54+
NewType="SharpDebug.CommonUserTypes.NativeTypes.std.@string" />
5555
<Transformation OriginalType="std::vector&lt;${T},${allocator}&gt;"
56-
NewType="CsDebugScript.CommonUserTypes.NativeTypes.std.vector&lt;${T}&gt;" />
56+
NewType="SharpDebug.CommonUserTypes.NativeTypes.std.vector&lt;${T}&gt;" />
5757
</Transformations>
5858
<UseDirectClassAccess>true</UseDirectClassAccess>
5959
<DontSaveGeneratedCodeFiles>true</DontSaveGeneratedCodeFiles>
6060
<GeneratePhysicalMappingOfUserTypes>true</GeneratePhysicalMappingOfUserTypes>
6161
</XmlConfig>
6262
```
63-
You can see more about all available XML fields in [source code](../Source/CsDebugScript.CodeGen/XmlConfig.cs).
63+
You can see more about all available XML fields in [source code](../Source/SharpDebug.CodeGen/XmlConfig.cs).
6464

6565
#### Transformations
6666
Transformations are being used for user types defined somewhere else (like [common user types](CommonUserTypes.md)). They allow mapping from symbol type to existing user type during code generation. For example, if user defines transformation for std::vector class like in example above, all members that are of type std::vector will be exported as CsDebubScript.commonUserTypes.NativeTypes.std.vector.
6767

6868
#### Generating physical mapping of user types
69-
In order to fully benefit performance wise from code generation, you want to use this option. This will generate user types that read whole memory associated with the type (size of the type is written in symbol file) and later using types and offsets available from symbol file it will read directly from [MemoryBuffer](../Source/CsDebugScript.Engine/Engine/Utility/MemoryBuffer.cs). You can find all Read* functions in [UserType](../Source/CsDebugScript.Engine/UserType.cs) class.
69+
In order to fully benefit performance wise from code generation, you want to use this option. This will generate user types that read whole memory associated with the type (size of the type is written in symbol file) and later using types and offsets available from symbol file it will read directly from [MemoryBuffer](../Source/SharpDebug.Engine/Engine/Utility/MemoryBuffer.cs). You can find all Read* functions in [UserType](../Source/SharpDebug.Engine/UserType.cs) class.
7070

7171
#### Using direct class access
7272
Some symbol providers (DbgEng symbol provider) doesn't support getting base classes, class fields, but only all fields defined in the type. Modern symbol providers support direct class access and should be used by default.

Documentation/CommonUserTypes.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,32 @@ You should read about [user types](UserTypes.md) before continuing
22

33
## Existing (common) user types
44
Currently implemented common user types:
5-
* [STL](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std)
6-
* [std::any](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/any.cs)
7-
* [std::array](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/array.cs)
8-
* [std::basic_string](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/basic_string.cs)
9-
* [std::filesystem::path](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/filesystem/path.cs)
10-
* [std::list](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/list.cs)
11-
* [std::map](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/map.cs)
12-
* [std::optional](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/optional.cs)
13-
* [std::pair](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/pair.cs)
14-
* [std::shared_ptr](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/shared_ptr.cs)
15-
* [std::string](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/string.cs)
16-
* [std::unordered_map](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/unordered_map.cs)
17-
* [std::variant](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/variant.cs)
18-
* [std::vector](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/vector.cs)
19-
* [std::weak_ptr](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/weak_ptr.cs)
20-
* [std::wstring](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/wstring.cs)
21-
* [OpenCV](../Source/CsDebugScript.CommonUserTypes/NativeTypes/cv)
22-
* [CvMat](../Source/CsDebugScript.CommonUserTypes/NativeTypes/cv/CvMat.cs)
23-
* [cv::Mat](../Source/CsDebugScript.CommonUserTypes/NativeTypes/std/Mat.cs)
24-
* [Windows](../Source/CsDebugScript.CommonUserTypes/NativeTypes/Windows)
25-
* [Heap](../Source/CsDebugScript.CommonUserTypes/NativeTypes/Windows/Heap.cs)
26-
* [ProcessEnvironmentBlock](../Source/CsDebugScript.CommonUserTypes/NativeTypes/Windows/ProcessEnvironmentBlock.cs)
27-
* [ThreadEnvironmentBlock](../Source/CsDebugScript.CommonUserTypes/NativeTypes/Windows/ThreadEnvironmentBlock.cs)
28-
* [CLR](../Source/CsDebugScript.CommonUserTypes/CLR)
29-
* [System.Exception](../Source/CsDebugScript.CommonUserTypes/CLR/System/Exception.cs)
30-
* [System.String](../Source/CsDebugScript.CommonUserTypes/CLR/System/String.cs)
5+
* [STL](../Source/SharpDebug.CommonUserTypes/NativeTypes/std)
6+
* [std::any](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/any.cs)
7+
* [std::array](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/array.cs)
8+
* [std::basic_string](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/basic_string.cs)
9+
* [std::filesystem::path](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/filesystem/path.cs)
10+
* [std::list](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/list.cs)
11+
* [std::map](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/map.cs)
12+
* [std::optional](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/optional.cs)
13+
* [std::pair](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/pair.cs)
14+
* [std::shared_ptr](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/shared_ptr.cs)
15+
* [std::string](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/string.cs)
16+
* [std::unordered_map](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/unordered_map.cs)
17+
* [std::variant](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/variant.cs)
18+
* [std::vector](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/vector.cs)
19+
* [std::weak_ptr](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/weak_ptr.cs)
20+
* [std::wstring](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/wstring.cs)
21+
* [OpenCV](../Source/SharpDebug.CommonUserTypes/NativeTypes/cv)
22+
* [CvMat](../Source/SharpDebug.CommonUserTypes/NativeTypes/cv/CvMat.cs)
23+
* [cv::Mat](../Source/SharpDebug.CommonUserTypes/NativeTypes/std/Mat.cs)
24+
* [Windows](../Source/SharpDebug.CommonUserTypes/NativeTypes/Windows)
25+
* [Heap](../Source/SharpDebug.CommonUserTypes/NativeTypes/Windows/Heap.cs)
26+
* [ProcessEnvironmentBlock](../Source/SharpDebug.CommonUserTypes/NativeTypes/Windows/ProcessEnvironmentBlock.cs)
27+
* [ThreadEnvironmentBlock](../Source/SharpDebug.CommonUserTypes/NativeTypes/Windows/ThreadEnvironmentBlock.cs)
28+
* [CLR](../Source/SharpDebug.CommonUserTypes/CLR)
29+
* [System.Exception](../Source/SharpDebug.CommonUserTypes/CLR/System/Exception.cs)
30+
* [System.String](../Source/SharpDebug.CommonUserTypes/CLR/System/String.cs)
3131

3232
STL classes are verified against different compilers and STL libraries (VS, GCC, Clang).
3333

Documentation/Drawings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Drawing objects
22
Drawing library help visualize results in [interactive mode](InteractiveMode.md). It can be used during debugging any image processing or computer vision app.
33

4-
Basic interface used for creating objects is [IGraphics](../Source/CsDebugScript.Drawing.Interfaces/IGraphics.cs). It allows more than just visualizing images, you can visualize detected objects on images while debugging.
4+
Basic interface used for creating objects is [IGraphics](../Source/SharpDebug.Drawing.Interfaces/IGraphics.cs). It allows more than just visualizing images, you can visualize detected objects on images while debugging.
55
In interactive mode, you can get this interface by quering global object `Graphics`.
66

77
Dumping drawing object will open drawing visualizer:

Documentation/DumpProcessing.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
## Creating a new project that uses debugger engine
22
* Create a new .NET project (you can use Console Application)
3-
* Add NuGet package CsDebugScript
3+
* Add NuGet package SharpDebug
44
* Add initialization code:
55
```cs
6-
using CsDebugScript;
6+
using SharpDebug;
77

88
DebuggerInitialization.OpenDumpFile("path_to_dump_file", "symbol_path;srv*");
99
// After this line, you can execute any code that can be executed in the script
1010
```
1111

1212
## Creating a new project that uses scripting and UI
1313
* Create a new .NET project (you can use Console Application)
14-
* Add NuGet package CsDebugScript
15-
* Add NuGet package CsDebugScript.UI
14+
* Add NuGet package SharpDebug
15+
* Add NuGet package SharpDebug.UI
1616
* Add initialization code:
1717
```cs
18-
CsDebugScript.DebuggerInitialization.OpenDumpFile("path_to_dump_file", "symbol_path;srv*");
19-
CsDebugScript.UI.InteractiveWindow.ShowModalWindow();
18+
SharpDebug.DebuggerInitialization.OpenDumpFile("path_to_dump_file", "symbol_path;srv*");
19+
SharpDebug.UI.InteractiveWindow.ShowModalWindow();
2020
```
2121
Instead of opening interactive window, you can execute scripts:
2222
```cs
23-
CsDebugScript.ScriptExecution.Execute("path_to_script");
23+
SharpDebug.ScriptExecution.Execute("path_to_script");
2424
```
2525
Or execute interactive commands with
2626
```cs
27-
var interactiveExecution = new CsDebugScript.InteractiveExecution();
27+
var interactiveExecution = new SharpDebug.InteractiveExecution();
2828
interactiveExecution.Interpret("<C# code>");
2929
```
3030

3131
## Sample project
32-
Please take a look at [CsDebugScript.Engine.Test](../Tests/CsDebugScript.Engine.Test/Program.cs). It shows how to:
32+
Please take a look at [SharpDebug.Engine.Test](../Tests/SharpDebug.Engine.Test/Program.cs). It shows how to:
3333
* Open a dump
3434
* Execute some C# code against it
3535
* Execute C# script

Documentation/InteractiveMode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Here are helper functions with dynamic arguments that can be used for easier vis
3333
void DrawImage(dynamic width, dynamic height, dynamic data, ChannelType[] channels, dynamic stride = null);
3434
```
3535
Where `width`, `height` and `stride` can be any kind of number that can be casted to int. It can also be Variable that holds number type.
36-
`channels` can be any value from `CsDebugScript.Drawing.Channels` predefined static fields or you can create a new one.
36+
`channels` can be any value from `SharpDebug.Drawing.Channels` predefined static fields or you can create a new one.
3737
`data` can be ulong value of the pointer, pointer to a simple type, or pointer to void. If pixel channel type cannot be deduced, you can use generics function:
3838
```cs
3939
void DrawImage<T>(dynamic width, dynamic height, dynamic data, ChannelType[] channels, dynamic stride = null);

Documentation/Tutorials.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ HelpMe("It works!");
251251
### Referencing assemblies in scripts
252252
By now, you have huge collection of common code and compiling scripts is not that fast any more, you should create .NET library (dll) and just reference it from the script:
253253
```cs
254-
#r "CsDebugScript.CommonUserTypes.dll"
255-
using std = CsDebugScript.CommonUserTypes.NativeTypes.std;
254+
#r "SharpDebug.CommonUserTypes.dll"
255+
using std = SharpDebug.CommonUserTypes.NativeTypes.std;
256256

257257
var variable = Process.Current.GetGlobal("mymodule!globalVariable");
258258
var s = variable.CastAs<std.wstring>();

Documentation/UserTypes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This is ok approach, but there are some problems with it:
2929
3. It won't be as fast as reading memory directly.
3030

3131
Here are some steps on how to improve it:
32-
#### Start using [CodeArray](../Source/CsDebugScript.Engine/CodeArray.cs) (get some speed benefits)
32+
#### Start using [CodeArray](../Source/SharpDebug.Engine/CodeArray.cs) (get some speed benefits)
3333
```cs
3434
CodeArray global_data = new CodeArray(Process.Current.GetGlobal("global_data"));
3535
foreach (Variable data in global_data)
@@ -96,7 +96,7 @@ There are some special cases when you actually want to write user types manually
9696
- Code generation doesn't know how to deal with C++ specializations for different number constants or has some other problems with your specific type
9797
- You want to share your user types for different versions of library
9898

99-
In those cases, you want to help engine with work with these user types correctly. That means that you probably want to inherit [UserType](../Source/CsDebugScript.Engine/UserType.cs) class and also you want to add [UserTypeAttribute](../Source/CsDebugScript.Engine/UserTypeAttribute.cs) to new class.
99+
In those cases, you want to help engine with work with these user types correctly. That means that you probably want to inherit [UserType](../Source/SharpDebug.Engine/UserType.cs) class and also you want to add [UserTypeAttribute](../Source/SharpDebug.Engine/UserTypeAttribute.cs) to new class.
100100

101101
Inheriting from UserType class will help with storing necessary data for you (like remembering Variable, or MemoryBuffer in advanced scenarios). Adding UserTypeAttribute to your class will trigger automatic casting in interactive mode. If you don't care about goddies of UserType and UserTypeAttribute, you should inherit Variable class when implementing your user type.
102102

0 commit comments

Comments
 (0)