mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-18 04:26:49 +00:00
Remove bool parameter to InitResolver to cancel resolving
This commit is contained in:
@@ -2012,7 +2012,7 @@ void MainWindow::on_action_Resolve_Symbols_triggered()
|
||||
bool finished = false;
|
||||
|
||||
m_Ctx.Replay().AsyncInvoke([this, &progress, &finished](IReplayController *) {
|
||||
bool success = m_Ctx.Replay().GetCaptureAccess()->InitResolver(&progress, NULL);
|
||||
bool success = m_Ctx.Replay().GetCaptureAccess()->InitResolver(&progress);
|
||||
|
||||
if(!success)
|
||||
{
|
||||
|
||||
@@ -1242,12 +1242,10 @@ separate thread.
|
||||
|
||||
:param float progress: A reference to a ``float`` value that will be updated as the init happens
|
||||
from ``0.0`` to ``1.0``. The parameter can be ``None`` if no progress update is desired.
|
||||
:param bool killSignal: A reference to a ``bool`` that can be set to ``True`` to stop the lookup
|
||||
process.
|
||||
:return: ``True`` if the resolver successfully initialised, ``False`` if something went wrong.
|
||||
:rtype: ``bool``
|
||||
)");
|
||||
virtual bool InitResolver(float *progress, volatile bool *killSignal) = 0;
|
||||
virtual bool InitResolver(float *progress) = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the details of each stackframe in the provided callstack.
|
||||
|
||||
|
||||
@@ -510,7 +510,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData)
|
||||
}
|
||||
});
|
||||
|
||||
resolver = Callstack::MakeResolver(buf.data(), buf.size(), &progress, NULL);
|
||||
resolver = Callstack::MakeResolver(buf.data(), buf.size(), &progress);
|
||||
|
||||
Threading::JoinThread(ticker);
|
||||
Threading::CloseThread(ticker);
|
||||
@@ -1624,7 +1624,7 @@ public:
|
||||
return hasCallstacks;
|
||||
}
|
||||
|
||||
bool InitResolver(float *progressPtr, volatile bool *killSignal)
|
||||
bool InitResolver(float *progressPtr)
|
||||
{
|
||||
float dummy = 0.0f;
|
||||
if(progressPtr == NULL)
|
||||
|
||||
@@ -232,8 +232,7 @@ void Init();
|
||||
Stackwalk *Collect();
|
||||
Stackwalk *Create();
|
||||
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress,
|
||||
volatile bool *killSignal);
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress);
|
||||
|
||||
bool GetLoadedModules(byte *buf, size_t &size);
|
||||
}; // namespace Callstack
|
||||
|
||||
@@ -76,7 +76,7 @@ bool GetLoadedModules(byte *buf, size_t &size)
|
||||
return true;
|
||||
}
|
||||
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress, volatile bool *killSignal)
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress)
|
||||
{
|
||||
RDCERR("Callstack resolving not supported on Android.");
|
||||
return NULL;
|
||||
|
||||
@@ -76,7 +76,7 @@ bool GetLoadedModules(byte *buf, size_t &size)
|
||||
return true;
|
||||
}
|
||||
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress, volatile bool *killSignal)
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress)
|
||||
{
|
||||
RDCERR("Callstack resolving not supported on Apple.");
|
||||
return NULL;
|
||||
|
||||
@@ -221,7 +221,7 @@ private:
|
||||
std::map<uint64_t, Callstack::AddressDetails> m_Cache;
|
||||
};
|
||||
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress, volatile bool *killSignal)
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress)
|
||||
{
|
||||
// we look in the original locations for the files, we don't prompt if we can't
|
||||
// find the file, or the file doesn't have symbols (and we don't validate that
|
||||
@@ -242,9 +242,6 @@ StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress, vola
|
||||
|
||||
while(search && search < dbend)
|
||||
{
|
||||
if(killSignal && *killSignal)
|
||||
break;
|
||||
|
||||
if(progress)
|
||||
*progress = float(search - start) / float(DBSize);
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ private:
|
||||
class Win32CallstackResolver : public Callstack::StackResolver
|
||||
{
|
||||
public:
|
||||
Win32CallstackResolver(byte *moduleDB, size_t DBSize, float *progress, volatile bool *killSignal);
|
||||
Win32CallstackResolver(byte *moduleDB, size_t DBSize, float *progress);
|
||||
~Win32CallstackResolver();
|
||||
|
||||
Callstack::AddressDetails GetAddr(uint64_t addr);
|
||||
@@ -675,8 +675,7 @@ wstring Win32CallstackResolver::pdbBrowse(wstring startingPoint)
|
||||
return outBuf;
|
||||
}
|
||||
|
||||
Win32CallstackResolver::Win32CallstackResolver(byte *moduleDB, size_t DBSize, float *progress,
|
||||
volatile bool *killSignal)
|
||||
Win32CallstackResolver::Win32CallstackResolver(byte *moduleDB, size_t DBSize, float *progress)
|
||||
{
|
||||
wstring configPath = StringFormat::UTF82Wide(FileIO::GetAppFolderFilename("config.ini"));
|
||||
{
|
||||
@@ -725,9 +724,6 @@ Win32CallstackResolver::Win32CallstackResolver(byte *moduleDB, size_t DBSize, fl
|
||||
if(progress)
|
||||
*progress = float(chunks - moduleDB) / float(end - moduleDB);
|
||||
|
||||
if(killSignal && *killSignal)
|
||||
break;
|
||||
|
||||
Module m;
|
||||
|
||||
m.name = modName;
|
||||
@@ -966,7 +962,7 @@ Stackwalk *Create()
|
||||
return new Win32Callstack(NULL, 0);
|
||||
}
|
||||
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress, volatile bool *killSignal)
|
||||
StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress)
|
||||
{
|
||||
if(DBSize < 8 || memcmp(moduleDB, "WN32CALL", 8))
|
||||
{
|
||||
@@ -974,7 +970,7 @@ StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, float *progress, vola
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return new Win32CallstackResolver(moduleDB, DBSize, progress, killSignal);
|
||||
return new Win32CallstackResolver(moduleDB, DBSize, progress);
|
||||
}
|
||||
|
||||
bool GetLoadedModules(byte *buf, size_t &size)
|
||||
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
void WriteSection(const SectionProperties &props, const bytebuf &contents);
|
||||
|
||||
bool HasCallstacks();
|
||||
bool InitResolver(float *progress, volatile bool *killSignal);
|
||||
bool InitResolver(float *progress);
|
||||
rdcarray<rdcstr> GetResolve(const rdcarray<uint64_t> &callstack);
|
||||
|
||||
private:
|
||||
@@ -678,7 +678,7 @@ bool CaptureFile::HasCallstacks()
|
||||
return m_RDC && m_RDC->SectionIndex(SectionType::ResolveDatabase) >= 0;
|
||||
}
|
||||
|
||||
bool CaptureFile::InitResolver(float *progress, volatile bool *killSignal)
|
||||
bool CaptureFile::InitResolver(float *progress)
|
||||
{
|
||||
if(!HasCallstacks())
|
||||
{
|
||||
@@ -711,7 +711,7 @@ bool CaptureFile::InitResolver(float *progress, volatile bool *killSignal)
|
||||
if(progress)
|
||||
*progress = 0.002f;
|
||||
|
||||
m_Resolver = Callstack::MakeResolver(buf.data(), buf.size(), progress, killSignal);
|
||||
m_Resolver = Callstack::MakeResolver(buf.data(), buf.size(), progress);
|
||||
|
||||
if(!m_Resolver)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user