Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Speedup GDB debugging
BlueHazzard:
This patch fixes it for me...
No idea why the old code was there, it made no sense if a default set was set...
--- Code: ---Index: src/plugins/contrib/envvars/envvars_common.cpp
===================================================================
--- src/plugins/contrib/envvars/envvars_common.cpp (revision 12529)
+++ src/plugins/contrib/envvars/envvars_common.cpp (working copy)
@@ -229,8 +229,8 @@
set_path.Empty();
ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("envvars"));
- if (!cfg || set_path.IsEmpty())
- return set_path;
+ if (!cfg)
+ return wxString();
if (!check_exists)
return _T("/sets/")+set_name;
--- End code ---
AndrewCot:
I did a local build with the patch and the warnings no longer occur.
Miguel Gimenez:
@bluehazzard, do you plan to commit the patch or should someone post a ticket so this is not lost?. Currently the envvars plugin does not work at all with projects, so IMHO it is a major bug.
BlueHazzard:
--- Quote from: Miguel Gimenez on October 12, 2021, 07:17:55 pm ---@bluehazzard, do you plan to commit the patch or should someone post a ticket so this is not lost?. Currently the envvars plugin does not work at all with projects, so IMHO it is a major bug.
--- End quote ---
Have you found other problems too?
Miguel Gimenez:
While the patch fixes the warning about set not found, the plugin does not set the specified variables. I have written a test console program that prints the value of an environment variable called TEST_VAR, and created two sets with different values for the variable; whatever set you select in Project Options, the printed value is the same.
--- Code: ---#include <windows.h>
#include <stdio.h>
int main()
{
char Buffer[256];
const DWORD res = GetEnvironmentVariable("TEST_VAR", Buffer, sizeof(Buffer));
if (!res)
{
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), Buffer, sizeof(Buffer), NULL);
printf("Error %s", Buffer);
}
else
printf("TEST_VAR = %s", Buffer);
return 0;
}
--- End code ---
The expected behaviour is: the plugin sets the variable to the value indicated in the specified set
EDIT: if you close the project and reopen it, you get again the "set not found" warnings. I will study this deeper and create a ticket.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version