Board index » cppbuilder » BCB5 de{*word*81} fails on template class instances

BCB5 de{*word*81} fails on template class instances


2004-04-24 02:28:49 AM
cppbuilder3
Has anyone else noticed BCB5's de{*word*81}'s bizarre behavior when template
class instances are 'inspected'? Sometimes it works. Sometimes it does
not. I can't find any rhyme or reason to it.
For example,
class SomeClass : public TObject
{
private:
int x;
// blah blah blah
};
{
boost::scoped_ptr<SomeClass>sc(new SomeClass());
// try to 'inspect' sc here.
}
About 50% of the time, the top edit in the 'inspect' window will show
the address at which sc is located but that is all it will show. You
can't inspect sc's state with 'inspect'. The other 50% of the time it
works as expected.
The only workaround I can find is pretty {*word*193} but it does work. If we
let sc be located at 0x0011FFCC then the following in the
'Evaluate/Modify' expression edit will reveal the value of x:
((SomeClass*)(*(unsigned int*)0x0011FFCC))->x.
Which isn't exactly cute and is totally dependent on boost::scoped_ptr's
layout in RAM. Use a different template and you're likely to have to add
an offset to the raw memory address to get at what you want to see. Ugh.
Does anyone know
a) how to fix this ?
b) if this is fixed in BCB6 ?
Thanks,
Tom
 
 

Re:BCB5 de{*word*81} fails on template class instances

On Fri, 23 Apr 2004 14:28:49 -0400, Tom Jett wrote:
Quote
Has anyone else noticed BCB5's de{*word*81}'s bizarre behavior when template
class instances are 'inspected'? Sometimes it works. Sometimes it does
not. I can't find any rhyme or reason to it.
It's a bit better in BCB6 but not always. My biggest complaint has always
been its inability to handle memory blocks without resorting to the CPU
view. Prior to Builder you could use the 'm<n>' suffix in the evaluator but
now that doesn't work properly. It insists on stopping at the first '\0' in
the memory block.
--
Andrue Cope
[Bicester UK]