Thanks for reply, but i dont think so.
The following code is an example. I usually put a breakpoint at the first if line and then SIGSEGV is raised ( in my watch window is msg).
The signal didnt raise if the breakpoint is disable.
void DiagnosticPutString(const unsigned short ai_sourceId,
const unsigned short ai_diagCommIndex,
const unsigned short ai_diagSessionIndex,
const unsigned short ai_diagSectorIndex,
const int ai_protocol,
const int ai_errorCode,
const std::string& ai_string)
{
static std::string msg ("");
if ( !ai_string.empty() )
{
msg = msg + ai_string;
if (
(ai_string.at(0) == '\n') ||
(ai_string.find("\r\n") != std::string::npos)
)
{
Log("DiagnosticPutString: "
<< "\n sourceId: " << ai_sourceId
<< "\n comIndex: " << ai_diagCommIndex
<< "\n sessionIndex: " << ai_diagSessionIndex
<< "\n sectorIndex: " << ai_diagSectorIndex
<< "\n protocol: " << ai_protocol
<< "\n errorCode: " << ai_errorCode
<< "\n message: " << msg);
msg.clear();
}
}