-
June 12th, 2015, 09:34 AM
#1
c++ stl map gdb debug
Hello,
The following code runs in the client server mode.
In the server I have the fumction which updates the global stl ..Later when the same server is requested to update that variable, (the previous value is reset).
code snippet is:
Code:
DiaRes CGxDiaSvr::CCRequest(CDiaMessage & sMsg)
{
CPCRF::m_mPDN2GxSessionId.insert( std::pair<string,string>(sFramedIpAddr.AsText(),sSessionId) );
}
Above code gets called twice and stl has 2 elements.
Later the below code gets called in the server and the "CPCRF::m_mPDN2GxSessionId" map element count value is "0".
DiaRes CRxDiaSvr::AARequest(CDiaMessage & sMsg)
{
map<string, string>::iterator it = CPCRF::m_mPDN2GxSessionId.find(sFramedIpAddr.AsText());
string sGxSessionId = it->second;
}
I have tried gdb, put breakpoints which hits at 1st code twice and stl gets two elements. Laer when it hits 2nd part of code shown, the map gets initialised to "0". I then tried put watch, somehow not hitting. May be i am doing something wrong in this big chink of legacy code..
thanks a lot
~pdk
Last edited by pdk5; June 13th, 2015 at 12:49 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|