Thread now also tracks the address of the last executed function.
This commit is contained in:
@@ -18,6 +18,7 @@ Thread::Thread(Team* team, thread_id threadID)
|
|||||||
fID(threadID),
|
fID(threadID),
|
||||||
fState(THREAD_STATE_UNKNOWN),
|
fState(THREAD_STATE_UNKNOWN),
|
||||||
fExecutedSubroutine(false),
|
fExecutedSubroutine(false),
|
||||||
|
fSubroutineAddress(0),
|
||||||
fStoppedReason(THREAD_STOPPED_UNKNOWN),
|
fStoppedReason(THREAD_STOPPED_UNKNOWN),
|
||||||
fCpuState(NULL),
|
fCpuState(NULL),
|
||||||
fStackTrace(NULL)
|
fStackTrace(NULL)
|
||||||
@@ -70,6 +71,7 @@ Thread::SetState(uint32 state, uint32 reason, const BString& info)
|
|||||||
SetCpuState(NULL);
|
SetCpuState(NULL);
|
||||||
SetStackTrace(NULL);
|
SetStackTrace(NULL);
|
||||||
fExecutedSubroutine = false;
|
fExecutedSubroutine = false;
|
||||||
|
fSubroutineAddress = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fTeam->NotifyThreadStateChanged(this);
|
fTeam->NotifyThreadStateChanged(this);
|
||||||
@@ -113,8 +115,9 @@ Thread::SetStackTrace(StackTrace* trace)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Thread::SetExecutedSubroutine()
|
Thread::SetExecutedSubroutine(target_addr_t address)
|
||||||
{
|
{
|
||||||
fExecutedSubroutine = true;
|
fExecutedSubroutine = true;
|
||||||
|
fSubroutineAddress = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
#include <Referenceable.h>
|
#include <Referenceable.h>
|
||||||
#include <util/DoublyLinkedList.h>
|
#include <util/DoublyLinkedList.h>
|
||||||
|
|
||||||
|
#include "types/Types.h"
|
||||||
|
|
||||||
|
|
||||||
class CpuState;
|
class CpuState;
|
||||||
class StackTrace;
|
class StackTrace;
|
||||||
@@ -69,7 +71,9 @@ public:
|
|||||||
|
|
||||||
bool ExecutedSubroutine() const
|
bool ExecutedSubroutine() const
|
||||||
{ return fExecutedSubroutine; }
|
{ return fExecutedSubroutine; }
|
||||||
void SetExecutedSubroutine();
|
target_addr_t SubroutineAddress() const
|
||||||
|
{ return fSubroutineAddress; }
|
||||||
|
void SetExecutedSubroutine(target_addr_t address);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Team* fTeam;
|
Team* fTeam;
|
||||||
@@ -77,6 +81,7 @@ private:
|
|||||||
BString fName;
|
BString fName;
|
||||||
uint32 fState;
|
uint32 fState;
|
||||||
bool fExecutedSubroutine;
|
bool fExecutedSubroutine;
|
||||||
|
target_addr_t fSubroutineAddress;
|
||||||
uint32 fStoppedReason;
|
uint32 fStoppedReason;
|
||||||
BString fStoppedReasonInfo;
|
BString fStoppedReasonInfo;
|
||||||
CpuState* fCpuState;
|
CpuState* fCpuState;
|
||||||
|
|||||||
Reference in New Issue
Block a user