www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/27/06:15:09

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "'Raf256' Rafal Maj" <raf256 AT szybkapoczta DOT pl>
Newsgroups: comp.os.msdos.djgpp
Subject: let's debug together ;)
Date: 27 Jan 2002 11:13:36 GMT
Organization: aa
Lines: 67
Sender: raf256 AT poczta DOT onet DOT pl@chello062179025129.chello.pl
Message-ID: <Xns91A37D346E0Drfdfciasdsdj412tr@213.180.128.20>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1020127105615 DOT 14549M-100000 AT is>
NNTP-Posting-Host: chello062179025129.chello.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1012130016 11421 62.179.25.129 (27 Jan 2002 11:13:36 GMT)
X-Complaints-To: abuse AT onet DOT pl
NNTP-Posting-Date: 27 Jan 2002 11:13:36 GMT
User-Agent: Xnews/4.11.09
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019