mirror of https://github.com/x64dbg/GleeBug
added operator= in ThreadInfo + removed redundant null check
This commit is contained in:
parent
59574f105f
commit
43415e12aa
|
|
@ -21,6 +21,18 @@ namespace GleeBug
|
|||
{
|
||||
}
|
||||
|
||||
ThreadInfo & ThreadInfo::operator=(const ThreadInfo& other)
|
||||
{
|
||||
dwThreadId = other.dwThreadId;
|
||||
hThread = other.hThread;
|
||||
lpThreadLocalBase = other.lpThreadLocalBase;
|
||||
lpStartAddress = other.lpStartAddress;
|
||||
registers = Registers(); //create new registers
|
||||
stepCallbacks = other.stepCallbacks;
|
||||
isSingleStepping = other.isSingleStepping;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool ThreadInfo::RegReadContext()
|
||||
{
|
||||
SuspendThread(this->hThread);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,13 @@ namespace GleeBug
|
|||
*/
|
||||
ThreadInfo(const ThreadInfo & other);
|
||||
|
||||
/**
|
||||
\brief Assignment operator.
|
||||
\param other The other object.
|
||||
\return A shallow copy of this object.
|
||||
*/
|
||||
ThreadInfo & operator=(const ThreadInfo & other);
|
||||
|
||||
/**
|
||||
\brief Read the register context from the thread. This fills the RegistersInfo member.
|
||||
\return true if it succeeds, false if it fails.
|
||||
|
|
|
|||
|
|
@ -45,8 +45,7 @@ namespace GleeBug
|
|||
&si,
|
||||
&_mainProcess);
|
||||
|
||||
if (szCreateWithCmdLine)
|
||||
delete[] szCreateWithCmdLine;
|
||||
delete[] szCreateWithCmdLine;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue