if(frame.absoluteFile)
editor = (CodeEditor)ide.OpenFile(frame.absoluteFile, false, true, null, no, normal, false);
if(!editor && frame.file)
- frame.absoluteFile = ide.workspace.GetAbsolutePathFromRelative(frame.file);
+ frame.absoluteFile = ide.workspace.CopyAbsolutePathFromRelative(frame.file);
if(!frame.absoluteFile && askForLocation && frame.file)
{
char * s = null;
if(SourceDirDialog(title, ide.workspace.projectDir, frame.file, sourceDir))
{
AddSourceDir(sourceDir);
- frame.absoluteFile = ide.workspace.GetAbsolutePathFromRelative(frame.file);
+ frame.absoluteFile = ide.workspace.CopyAbsolutePathFromRelative(frame.file);
}
}
if(!editor && frame.absoluteFile)
void RunToCursor(CompilerConfig compiler, ProjectConfig config, int bitDepth, bool useValgrind, const char * absoluteFilePath, int lineNumber, bool ignoreBreakpoints, bool atSameLevel, bool oldImplementation)
{
char relativeFilePath[MAX_LOCATION];
+ const char * objectFileExt = compiler ? compiler.objectFileExt : objectDefaultFileExt;
_dpcl(_dpct, dplchan::debuggerCall, 0, "Debugger::RunToCursor()");
_ChangeUserAction(runToCursor);
- ide.workspace.GetRelativePath(absoluteFilePath, relativeFilePath, null);
+ ide.workspace.GetRelativePath(absoluteFilePath, relativeFilePath, null, objectFileExt);
if(bpRunToCursor && bpRunToCursor.inserted && symbols)
{
{
Project owner;
char relativePath[MAX_LOCATION];
+ const char * objectFileExt = currentCompiler ? currentCompiler.objectFileExt : objectDefaultFileExt;
- ide.workspace.GetRelativePath(absolutePath, relativePath, &owner);
+ ide.workspace.GetRelativePath(absolutePath, relativePath, &owner, objectFileExt);
if(!owner && !FileExists(absolutePath))
{
Workspace ws = ide.workspace;
if(ws)
{
- String path = ide.workspace.GetPathWorkspaceRelativeOrAbsolute(item.value);
+ String path = ide.workspace.CopyUnixPathWorkspaceRelativeOrAbsolute(item.value);
if(strcmp(frame.file, path))
frame.file = path;
delete path;
GdbExecCommon();
if(absoluteFilePath)
{
- ide.workspace.GetRelativePath(absoluteFilePath, relativeFilePath, null);
+ const char * objectFileExt = currentCompiler ? currentCompiler.objectFileExt : objectDefaultFileExt;
+ ide.workspace.GetRelativePath(absoluteFilePath, relativeFilePath, null, objectFileExt);
if(!GdbCommand(0.1, true, "-exec-until %s:%d", relativeFilePath, lineNumber))
{
GetLastDirectory(relativeFilePath, relativeFilePath);
GdbExecCommon();
if(lineNumber)
{
- ide.workspace.GetRelativePath(absoluteFilePathOrLocation, relativeFilePath, null);
+ const char * objectFileExt = currentCompiler ? currentCompiler.objectFileExt : objectDefaultFileExt;
+ ide.workspace.GetRelativePath(absoluteFilePathOrLocation, relativeFilePath, null, objectFileExt);
if(!GdbCommand(0.1, true, "advance %s:%d", relativeFilePath, lineNumber)) // should use -exec-advance -- GDB/MI implementation missing
{
GetLastDirectory(relativeFilePath, relativeFilePath);
{
Expression memberExp = exp.member.exp;
Identifier memberID = exp.member.member;
- Type type = memberExp.expType;
+ Type type = memberExp ? memberExp.expType : null;
Class _class = (type && memberID) ? (memberID && memberID.classSym) ? memberID.classSym.registered : ((type.kind == classType && type._class) ? type._class.registered : null) : null;
if(_class && memberID && memberID.string)
snprintf(watchmsg, sizeof(watchmsg), $"Missing property evaluation for \"%s\" in class \"%s\"", memberID.string, _class.name);
{
if(!strcmp(prjName, prj.name))
{
- if(prj.GetAbsoluteFromRelativePath(filePath, fullPath))
+ if(prj.GetAbsoluteFromRelativePath(filePath, fullPath, null))
{
property::absoluteFilePath = fullPath;
project = prj;
else
{
Project prj = ide.project;
- if(prj.GetAbsoluteFromRelativePath(filePath, fullPath))
+ if(prj.GetAbsoluteFromRelativePath(filePath, fullPath, null))
{
property::absoluteFilePath = fullPath;
project = prj;
{
CodeLocation codloc { line = line };
codloc.file = CopyString(loc);
- codloc.absoluteFile = ide.workspace.GetAbsolutePathFromRelative(loc);
+ codloc.absoluteFile = ide.workspace.CopyAbsolutePathFromRelative(loc);
return codloc;
}
}