Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ide/debugger: Debugger support for automatically resolving location o…

…f symbol loader modules (*.main.ec) (#755)
  • Loading branch information...
commit ea4a21950a9986eed80d3f73f0118989651a3333 1 parent b3e3d25
@jerstlouis jerstlouis authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 ide/src/project/Project.ec
View
19 ide/src/project/Project.ec
@@ -992,6 +992,7 @@ private:
}
#endif
+ // This method is only called from Debugger, should be moved to Debugger class?
#ifndef MAKEFILE_GENERATOR
bool GetRelativePath(char * filePath, char * relativePath)
{
@@ -1005,6 +1006,24 @@ private:
PathCatSlash(relativePath, node.name);
return true;
}
+ else
+ {
+ // Tweak for automatically resolving symbol loader modules
+ char * sl = strstr(moduleName, ".main.ec");
+ if(sl && (*sl = 0, !strcmpi(moduleName, name)))
+ {
+ char objDir[MAX_LOCATION];
+ DirExpression objDirExp = GetObjDir(ide.debugger.currentCompiler, ide.debugger.prjConfig);
+ strcpy(objDir, objDirExp.dir);
+ delete objDirExp;
+ ChangeCh(objDir, '\\', '/'); // TODO: this is a hack, paths should never include win32 path seperators - fix this in ProjectSettings and ProjectLoad instead
+ ReplaceSpaces(objDir, objDir);
+ strcpy(relativePath, objDir);
+ *sl = '.';
+ PathCatSlash(relativePath, moduleName);
+ return true;
+ }
+ }
// WARNING: On failure, relative path is uninitialized
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.