Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
special handling of the macro replacement ""?
ollydbg:
Hi, when I'm using the gd_on's unified workspace/code::blocks cbp files, I see something strange.
See here: it looks like GCC works OK, but GDB failed to find the dll(setting wrong PATH)
Re: crash when I try to open a wxsmith file under C::B against wx 3.3.1
If a variable a has a filed name b, and its value is
--- Code: ---""
--- End code ---
, and if we have
--- Code: ---AAA$(#a.b)
--- End code ---
, we will finally get
--- Code: ---AAA""
--- End code ---
The current implementation treats an empty string "" as a valid value and performs the replacement, resulting in
--- Code: ---AAA""
--- End code ---
instead of the expected
--- Code: ---AAA
--- End code ---
.
I'd like to see your options on this issue.
Thanks.
AndrewCot:
Make sure you get approval by MortenMacFlybefore making any changes. Check out the SF tickets for posts on macro and hopefully you will fins the ticket and have a read before you spend time on this as you may end up wasting your time.
BTW I agree with you.
ollydbg:
--- Quote from: AndrewCot on Yesterday at 09:21:14 am ---Make sure you get approval by MortenMacFlybefore making any changes. Check out the SF tickets for posts on macro and hopefully you will fins the ticket and have a read before you spend time on this as you may end up wasting your time.
BTW I agree with you.
--- End quote ---
Hi, AndrewCot, long time no see.
I think it is a good direction.
Maybe there are similar topics in the sourceforge tickets.
So I will search for that.
To switch between the debug version of wx library, using the unified workspace or cbp project is much easier. We don't need to replace or editor each cbp files.
gd_on:
To add some informations:
In standard cbp files, there is an environment variable defined as:
--- Code: ---<Variable name="WX_CFG" value="" />
--- End code ---
When it is used in standard cbp files, as:
--- Code: ---<Add directory="$(#wx33_64.lib)/gcc_dll$(WX_CFG)
--- End code ---
there are no problems.
In my unified workspace/cbp files, I define a wxwidgets path as, in my case, C:\wxWidgets-3.3.1 as the base, and in a user-defined field, I have created a wx_cfg variable. If I set this variable with nothing (an empty field), the variable is eliminated after a click on the save button. It's why, as in standard cbp files, I tried to set an empty string by "". Apparently, this is the problem described by ollydbg when I use a variable as:
--- Code: ---<Add directory="$(#WXWIDGETS)/lib/gcc_dll$(#WXWIDGETS.WX_CFG)
--- End code ---
ollydbg:
I did some test, and if the empty value key is allowed to add in the global compiler variable, the result may be that there are a lot of predefined keys saved to the config file, for example, see below:
--- Code: --- <sets>
<default>
<cccccc>
<DDD>
<str>
<![CDATA[]]>
</str>
</DDD>
<BBB>
<str>
<![CDATA[xxx]]>
</str>
</BBB>
<CFLAGS>
<str>
<![CDATA[]]>
</str>
</CFLAGS>
<BIN>
<str>
<![CDATA[]]>
</str>
</BIN>
<LFLAGS>
<str>
<![CDATA[]]>
</str>
</LFLAGS>
<OBJ>
<str>
<![CDATA[]]>
</str>
</OBJ>
<LIB>
<str>
<![CDATA[]]>
</str>
</LIB>
<INCLUDE>
<str>
<![CDATA[]]>
</str>
</INCLUDE>
<BASE>
<str>
<![CDATA[aaaa]]>
</str>
</BASE>
</cccccc>
--- End code ---
You can see, I don't want to do that DDD is a user defined key, and its value is empty. While the CFLAGS is predefined key, and its value is also empty.
So, I think the solution is: using the predefined value string, for example, a value named: __EMPTY__ or just an empty string "", then in the code when we get the value, we have to check the result, and remove the __EMPTY__ or "" in the command line.
Navigation
[0] Message Index
[#] Next page
Go to full version