@@ -6229,16 +6229,20 @@ HRESULT SymbolReader::LoadCoreCLR()
6229
6229
{
6230
6230
HRESULT Status = S_OK;
6231
6231
6232
- std::string absolutePath, coreClrPath;
6233
- absolutePath = g_ExtServices->GetCoreClrDirectory ();
6234
- GetDirectory (absolutePath.c_str (), coreClrPath);
6232
+ std::string absolutePath;
6233
+ std::string coreClrPath = g_ExtServices->GetCoreClrDirectory ();
6234
+ if (!GetAbsolutePath (coreClrPath.c_str (), absolutePath))
6235
+ {
6236
+ ExtErr (" Error: fail to convert CLR files path to absolute path \n " );
6237
+ return E_FAIL;
6238
+ }
6235
6239
coreClrPath.append (" /" );
6236
6240
coreClrPath.append (coreClrDll);
6237
6241
6238
6242
coreclrLib = dlopen (coreClrPath.c_str (), RTLD_NOW | RTLD_LOCAL);
6239
6243
if (coreclrLib == nullptr )
6240
6244
{
6241
- fprintf (stderr, " Error: Fail to load %s\n " , coreClrPath.c_str ());
6245
+ ExtErr ( " Error: Fail to load %s\n " , coreClrPath.c_str ());
6242
6246
return E_FAIL;
6243
6247
}
6244
6248
void *hostHandle;
@@ -6270,7 +6274,7 @@ HRESULT SymbolReader::LoadCoreCLR()
6270
6274
6271
6275
if (!GetEntrypointExecutableAbsolutePath (entryPointExecutablePath))
6272
6276
{
6273
- perror (" Could not get full path to current executable" );
6277
+ ExtErr (" Could not get full path to current executable" );
6274
6278
return E_FAIL;
6275
6279
}
6276
6280
@@ -6280,7 +6284,7 @@ HRESULT SymbolReader::LoadCoreCLR()
6280
6284
propertyKeys, propertyValues, &hostHandle, &domainId);
6281
6285
if (Status != S_OK)
6282
6286
{
6283
- fprintf (stderr, " Error: Fail to initialize CoreCLR\n " );
6287
+ ExtErr ( " Error: Fail to initialize CoreCLR\n " );
6284
6288
return Status;
6285
6289
}
6286
6290
0 commit comments