Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Zorroslade on September 09, 2010, 05:14:13 pm
-
Not sure if this is the place to report an anomaly/bug.
We are using CodeBlocks 10.05 (from May) on Debian and wx2.8.10 (32 bit).
In the memory window while debugging, a "Ta" (without quotes) shows up. It only shows up for static variables. If the static variable is greater than 8 bytes, it shows up every 8th byte. This artifact is prolly from gdb for static memory and not handled correctly. I did not find any info on the web about it.
Later,
-
Enable the debugger's debug log ( Settings -> Compiler & Debugger -> Debugger ) and paste the log in a [ code ] tags.
-
Here is the dump for the static variable.
> x/256xb rcptBuf
0x85267a0 <RS485TxTask::taskProc()::rcptBuf>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267a8 <RS485TxTask::taskProc()::rcptBuf+8>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267b0 <RS485TxTask::taskProc()::rcptBuf+16>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267b8 <RS485TxTask::taskProc()::rcptBuf+24>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267c0 <RS485TxTask::taskProc()::rcptBuf+32>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267c8 <RS485TxTask::taskProc()::rcptBuf+40>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267d0 <RS485TxTask::taskProc()::rcptBuf+48>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267d8 <RS485TxTask::taskProc()::rcptBuf+56>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267e0 <RS485TxTask::taskProc()::rcptBuf+64>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267e8 <RS485TxTask::taskProc()::rcptBuf+72>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267f0 <RS485TxTask::taskProc()::rcptBuf+80>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x85267f8 <RS485TxTask::taskProc()::rcptBuf+88>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526800 <RS485TxTask::taskProc()::rcptBuf+96>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526808 <RS485TxTask::taskProc()::rcptBuf+104>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526810 <RS485TxTask::taskProc()::rcptBuf+112>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526818 <RS485TxTask::taskProc()::rcptBuf+120>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526820 <RS485TxTask::taskProc()::rcptBuf+128>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526828 <RS485TxTask::taskProc()::rcptBuf+136>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526830 <RS485TxTask::taskProc()::rcptBuf+144>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526838 <RS485TxTask::taskProc()::rcptBuf+152>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526840 <RS485TxTask::taskProc()::rcptBuf+160>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526848 <RS485TxTask::taskProc()::rcptBuf+168>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526850 <RS485TxTask::taskProc()::rcptBuf+176>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526858 <RS485TxTask::taskProc()::rcptBuf+184>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526860 <RS485TxTask::taskProc()::rcptBuf+192>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526868 <CZeusTask::_instance>: 0xc8 0x5e 0x7f 0x08 0x5c 0x59 0x75 0x08
0x8526870 <_ZL21emptyCriteriaDefsList>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526878: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526880 <_ZL21emptyCriteriaDefsList>: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526888: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526890: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x8526898: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Thx.
-
Hm, seems that the output is different than the expected one.
Can you provide a minimal sample project to reproduce the bug?
-
Sorry for the delay.
Here is some sample code.
class TestxTest
{
public:
TestxTest() {};
~TestxTest() {};
void fct();
};
void TestxTest::fct()
{
static char var1[200];
for (int cnt = 0; cnt < 200; cnt++)
var1[cnt] = cnt;
}
class TestXTest
{
public:
TestXTest() {};
~TestXTest() {};
void fctText();
};
void TestXTest::fctText()
{
static char var1[200];
for (int cnt = 0; cnt < 200; cnt++)
var1[cnt] = cnt;
}
int main()
{
TestxTest xTest;
TestXTest XTest;
xTest.fct();
XTest.fctText();
cout << "Hello world!" << endl;
return 0;
}
It looks like the loop control for displaying static data is one larger than it should be.
Later,
-
Reproduced, thank you
I hope, I will have a patch in the next couple of days...
p.s. here is a patch that tries to fix the problem: http://forums.codeblocks.org/index.php/topic,10908.msg89584.html#msg89584