mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-21 07:59:18 +01:00
Update SigScanner.cs
add log lines back in
This commit is contained in:
parent
866efc5bcf
commit
4482f305b0
1 changed files with 5 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
namespace Dalamud.Game {
|
namespace Dalamud.Game {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -28,6 +29,8 @@ namespace Dalamud.Game {
|
||||||
|
|
||||||
if (IsCopy)
|
if (IsCopy)
|
||||||
SetupCopiedSegments();
|
SetupCopiedSegments();
|
||||||
|
Log.Verbose("Module base: {Address}", TextSectionBase);
|
||||||
|
Log.Verbose("Module size: {Size}", TextSectionSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -127,10 +130,12 @@ namespace Dalamud.Game {
|
||||||
private long _moduleCopyOffset;
|
private long _moduleCopyOffset;
|
||||||
|
|
||||||
private unsafe void SetupCopiedSegments() {
|
private unsafe void SetupCopiedSegments() {
|
||||||
|
Log.Verbose("module copy START");
|
||||||
// .text
|
// .text
|
||||||
_moduleCopyPtr = Marshal.AllocHGlobal(Module.ModuleMemorySize);
|
_moduleCopyPtr = Marshal.AllocHGlobal(Module.ModuleMemorySize);
|
||||||
Buffer.MemoryCopy(Module.BaseAddress.ToPointer(), _moduleCopyPtr.ToPointer(), Module.ModuleMemorySize, Module.ModuleMemorySize);
|
Buffer.MemoryCopy(Module.BaseAddress.ToPointer(), _moduleCopyPtr.ToPointer(), Module.ModuleMemorySize, Module.ModuleMemorySize);
|
||||||
_moduleCopyOffset = _moduleCopyPtr.ToInt64() - Module.BaseAddress.ToInt64();
|
_moduleCopyOffset = _moduleCopyPtr.ToInt64() - Module.BaseAddress.ToInt64();
|
||||||
|
Log.Verbose("copy OK!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue