Mail Archives: djgpp/2002/01/27/06:15:09
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote in
news:Pine DOT SUN DOT 3 DOT 91 DOT 1020127105615 DOT 14549M-100000 AT is:
i'm wondering - maybe it's not so bad idea to try debug something together
:) ? Imho, this will be interesting...
>> char * p = new char[l];
>> eax=0000000a ebx=746f6f72 ecx=000baf58 edx=00000002 esi=00000054
> in the EBX register. The register dump above shows that the value of
> EBX looks like ASCII text ("root", written right to left, because x86
> is a little endian machine). Does that "root" string ring a bell? Is
it should be easy, program crashes every time in exacly same place :
My program crashes in :
--------------------------
Call frame traceback:
c:/djgpp/lang/cxx-v3/bits/locale_facets.tcc(75) in function
$(RHIDE_INCLUDES) $(C_DEBUG_FLA
c:/djgpp/lang/cxx-v3/bits/locale_facets.tcc(75) in function
$(RHIDE_INCLUDES) $(C_DEBUG_FLA
c:/djgpp/lang/cxx-v3/bits/locale_facets.tcc(75) in function
$(RHIDE_INCLUDES) $(C_DEBUG_FLA
ustr.cpp(66) in function _ZN4cStr4_IncEPKc
ustr.h(37) in function _ZN4cStrpLIcEERS_T_
0acmd.cpp(736) in function _ZN10cCommander5ParseE4cStr
0acmd.cpp(684) in function _ZN10cCommander10RunCommandE4cStrb
0acmd.cpp(781) in function _ZN10cCommander3RunEv
0acmd.cpp(818) in function _ZN11cUptApplCmd3RunEv
shell.cpp(74) in function _ZN9cUptShell10StartShellEv
main.cpp(30) in function main
c:/djgpp/lang/cxx-v3/bits/locale_facets.tcc(75) in function
$(RHIDE_INCLUDES) $(C_DEBUG_FLA
--------------------------
cStr is my cals simmilar to std::string, but my own :)
It's possible that is still contains bugs... let's debug it :
Ok, string allocated in t=0x1483c4
cStr::_Put now allocating 12 bytes for string,
oryginla string is 'run auto.ub'...
Ok, string allocated in t=0x148434
Ok, string allocated in t=0x14844c
Ok, string allocated in t=0x148464
Ok, string allocated in t=0x1484ec
Ok, string allocated in t=0x14849c
Ok, string allocated in t=0x14850c
Ok, string allocated in t=0x148404
etc... this is sample of normal working, each string (when i.e. copying
cStr, etc) is allocated in diffrent memory region.
In last lines before crash, program often is allocating strings twice in
same memory area...
Hmm I'll add some debugging code and post results here.
Thanks for Help ! :)
--
Raf256
,--, _ ,- _ _ _
|,-'`_|_|_ `_||_'|_' raf256 AT wp DOT pl GG-1175498 ICQ-143712878
| `\|_| | |_,,_||_|
C++; (_2b||!_2b)?this->is->a:question; {B.Stroustrup, W.Shakespeare}
- Raw text -