mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixes to debugging source-server files
This commit is contained in:
parent
aa313a1a9d
commit
6143c617b7
7 changed files with 29 additions and 19 deletions
|
@ -2,5 +2,9 @@ namespace System
|
||||||
{
|
{
|
||||||
struct Void : void
|
struct Void : void
|
||||||
{
|
{
|
||||||
|
public override void ToString(String strBuffer)
|
||||||
|
{
|
||||||
|
strBuffer.Append("void");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6124,6 +6124,8 @@ namespace IDE
|
||||||
var args = outFileInfo.Split!('\n');
|
var args = outFileInfo.Split!('\n');
|
||||||
if (args.Count == 3)
|
if (args.Count == 3)
|
||||||
{
|
{
|
||||||
|
aliasFilePath = scope:: String(filePath);
|
||||||
|
|
||||||
filePath.Set(args[0]);
|
filePath.Set(args[0]);
|
||||||
loadCmd = scope:: String(args[1]);
|
loadCmd = scope:: String(args[1]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2669,6 +2669,7 @@ namespace IDE.ui
|
||||||
if (mTrackedTextElementViewList == null)
|
if (mTrackedTextElementViewList == null)
|
||||||
{
|
{
|
||||||
String findFileName = mFilePath;
|
String findFileName = mFilePath;
|
||||||
|
String srcFileName = mAliasFilePath ?? mFilePath;
|
||||||
|
|
||||||
mTrackedTextElementViewList = new List<TrackedTextElementView>();
|
mTrackedTextElementViewList = new List<TrackedTextElementView>();
|
||||||
if (mFilePath == null)
|
if (mFilePath == null)
|
||||||
|
@ -2686,7 +2687,7 @@ namespace IDE.ui
|
||||||
|
|
||||||
for (var breakpoint in debugManager.mBreakpointList)
|
for (var breakpoint in debugManager.mBreakpointList)
|
||||||
{
|
{
|
||||||
if ((breakpoint.mFileName != null) && (Path.Equals(breakpoint.mFileName, findFileName)))
|
if ((breakpoint.mFileName != null) && (Path.Equals(breakpoint.mFileName, srcFileName)))
|
||||||
{
|
{
|
||||||
var breakpointView = new TrackedTextElementView(breakpoint);
|
var breakpointView = new TrackedTextElementView(breakpoint);
|
||||||
UpdateTrackedElementView(breakpointView);
|
UpdateTrackedElementView(breakpointView);
|
||||||
|
@ -3681,7 +3682,7 @@ namespace IDE.ui
|
||||||
if (gApp.mDebugger.mIsRunning)
|
if (gApp.mDebugger.mIsRunning)
|
||||||
foundPosition = RemapActiveToCompiledLine(curCompileIdx, ref lineIdx, ref lineCharIdx);
|
foundPosition = RemapActiveToCompiledLine(curCompileIdx, ref lineIdx, ref lineCharIdx);
|
||||||
bool createNow = foundPosition || !mIsBeefSource; // Only be strict about Beef source
|
bool createNow = foundPosition || !mIsBeefSource; // Only be strict about Beef source
|
||||||
Breakpoint newBreakpoint = debugManager.CreateBreakpoint_Create(mFilePath, lineIdx, lineCharIdx, -1);
|
Breakpoint newBreakpoint = debugManager.CreateBreakpoint_Create(mAliasFilePath ?? mFilePath, lineIdx, lineCharIdx, -1);
|
||||||
newBreakpoint.mThreadId = threadId;
|
newBreakpoint.mThreadId = threadId;
|
||||||
debugManager.CreateBreakpoint_Finish(newBreakpoint, createNow);
|
debugManager.CreateBreakpoint_Finish(newBreakpoint, createNow);
|
||||||
int newDrawLineNum = GetDrawLineNum(newBreakpoint);
|
int newDrawLineNum = GetDrawLineNum(newBreakpoint);
|
||||||
|
|
|
@ -111,7 +111,7 @@ bool DbgSymRequest::Get(const StringImpl& url, const StringImpl& destPath, NetRe
|
||||||
{
|
{
|
||||||
if (mIsPreCache)
|
if (mIsPreCache)
|
||||||
{
|
{
|
||||||
auto netResult = mDbgSymSrv->mDebugger->mDebugManager->mNetManager->QueueGet(url, destPath);
|
auto netResult = mDbgSymSrv->mDebugger->mDebugManager->mNetManager->QueueGet(url, destPath, true);
|
||||||
if (chainNetResult != NULL)
|
if (chainNetResult != NULL)
|
||||||
{
|
{
|
||||||
if ((*chainNetResult != NULL) && (netResult != NULL))
|
if ((*chainNetResult != NULL) && (netResult != NULL))
|
||||||
|
|
|
@ -1620,7 +1620,7 @@ BF_EXPORT NetResult* HTTP_GetFile(char* url, char* destPath)
|
||||||
{
|
{
|
||||||
AutoCrit autoCrit(gDebugManager->mNetManager->mThreadPool.mCritSect);
|
AutoCrit autoCrit(gDebugManager->mNetManager->mThreadPool.mCritSect);
|
||||||
|
|
||||||
auto netResult = gDebugManager->mNetManager->QueueGet(url, destPath);
|
auto netResult = gDebugManager->mNetManager->QueueGet(url, destPath, false);
|
||||||
netResult->mDoneEvent = new SyncEvent();
|
netResult->mDoneEvent = new SyncEvent();
|
||||||
return netResult;
|
return netResult;
|
||||||
}
|
}
|
||||||
|
|
|
@ -447,7 +447,7 @@ NetManager::~NetManager()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NetRequest* NetManager::CreateGetRequest(const StringImpl& url, const StringImpl& destPath)
|
NetRequest* NetManager::CreateGetRequest(const StringImpl& url, const StringImpl& destPath, bool useCache)
|
||||||
{
|
{
|
||||||
AutoCrit autoCrit(mThreadPool.mCritSect);
|
AutoCrit autoCrit(mThreadPool.mCritSect);
|
||||||
|
|
||||||
|
@ -462,15 +462,18 @@ NetRequest* NetManager::CreateGetRequest(const StringImpl& url, const StringImpl
|
||||||
netResult->mFailed = false;
|
netResult->mFailed = false;
|
||||||
netResult->mCurRequest = netRequest;
|
netResult->mCurRequest = netRequest;
|
||||||
|
|
||||||
NetResult** netResultPtr;
|
if (useCache)
|
||||||
if (mCachedResults.TryAdd(url, NULL, &netResultPtr))
|
|
||||||
{
|
{
|
||||||
*netResultPtr = netResult;
|
NetResult** netResultPtr;
|
||||||
}
|
if (mCachedResults.TryAdd(url, NULL, &netResultPtr))
|
||||||
else
|
{
|
||||||
{
|
*netResultPtr = netResult;
|
||||||
mOldResults.Add(*netResultPtr);
|
}
|
||||||
*netResultPtr = netResult;
|
else
|
||||||
|
{
|
||||||
|
mOldResults.Add(*netResultPtr);
|
||||||
|
*netResultPtr = netResult;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
netRequest->mResult = netResult;
|
netRequest->mResult = netResult;
|
||||||
|
@ -478,11 +481,11 @@ NetRequest* NetManager::CreateGetRequest(const StringImpl& url, const StringImpl
|
||||||
return netRequest;
|
return netRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
NetResult* NetManager::QueueGet(const StringImpl& url, const StringImpl& destPath)
|
NetResult* NetManager::QueueGet(const StringImpl& url, const StringImpl& destPath, bool useCache)
|
||||||
{
|
{
|
||||||
BfLogDbg("NetManager queueing %s\n", url.c_str());
|
BfLogDbg("NetManager queueing %s %d\n", url.c_str(), useCache);
|
||||||
|
|
||||||
auto netRequest = CreateGetRequest(url, destPath);
|
auto netRequest = CreateGetRequest(url, destPath, useCache);
|
||||||
auto netResult = netRequest->mResult;
|
auto netResult = netRequest->mResult;
|
||||||
mThreadPool.AddJob(netRequest);
|
mThreadPool.AddJob(netRequest);
|
||||||
return netResult;
|
return netResult;
|
||||||
|
@ -524,7 +527,7 @@ bool NetManager::Get(const StringImpl& url, const StringImpl& destPath)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
netRequest = CreateGetRequest(url, destPath);
|
netRequest = CreateGetRequest(url, destPath, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,8 +109,8 @@ public:
|
||||||
NetManager();
|
NetManager();
|
||||||
~NetManager();
|
~NetManager();
|
||||||
|
|
||||||
NetRequest* CreateGetRequest(const StringImpl& url, const StringImpl& destPath);
|
NetRequest* CreateGetRequest(const StringImpl& url, const StringImpl& destPath, bool useCache);
|
||||||
NetResult* QueueGet(const StringImpl& url, const StringImpl& destPath);
|
NetResult* QueueGet(const StringImpl& url, const StringImpl& destPath, bool useCache);
|
||||||
bool Get(const StringImpl& url, const StringImpl& destPath);
|
bool Get(const StringImpl& url, const StringImpl& destPath);
|
||||||
|
|
||||||
void CancelAll();
|
void CancelAll();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue