Debugging Macros
[CORELIB]

Collaboration diagram for Debugging Macros:


Defines

#define _TRACE(message)
 Define macros to support debugging.
#define _TRACE_EX(err_code, err_subcode, message)
#define _TRACE_X(err_subcode, message)   _TRACE_XX(NCBI_USE_ERRCODE_X, err_subcode, message)
#define _TRACE_XX(error_name, err_subcode, message)
#define NCBI_TROUBLE(mess)   NCBI_NS_NCBI::CNcbiDiag::DiagTrouble(DIAG_COMPILE_INFO, mess)
#define NCBI_ASSERT(expr, mess)
#define NCBI_VERIFY(expr, mess)   NCBI_ASSERT(expr, mess)
#define _DEBUG_ARG(arg)   arg
#define _DEBUG_CODE(code)   do { code } while ( 0 )
#define _ASSERT(expr)   NCBI_ASSERT(expr, NULL)
#define _VERIFY(expr)   NCBI_VERIFY(expr, NULL)
#define _TROUBLE   NCBI_TROUBLE(NULL)

Enumerations

enum  EValidateAction { eValidate_Default = 0, eValidate_Abort, eValidate_Throw }
 Which action to perform. More...

Functions

void xncbi_SetValidateAction (EValidateAction action)
 Set the action to be performed.
EValidateAction xncbi_GetValidateAction (void)
 Get the action to be performed.


Define Documentation

#define _ASSERT expr   )     NCBI_ASSERT(expr, NULL)
 

Definition at line 132 of file ncbidbg.hpp.

#define _DEBUG_ARG arg   )     arg
 

Definition at line 107 of file ncbidbg.hpp.

Referenced by CPager::CPager(), CCodeGenerator::ExternalResolve(), CPager::IsPagerCommand(), CObjectsSniffer::ProbeASN1_Bin(), CCodeGenerator::ResolveInAnyModule(), and SplitQuery_CalculateNumChunks().

#define _DEBUG_CODE code   )     do { code } while ( 0 )
 

Definition at line 109 of file ncbidbg.hpp.

Referenced by DropExonHead(), SplitChunk(), and SplitExon().

#define _TRACE message   ) 
 

Value:

( NCBI_NS_NCBI::CNcbiDiag(DIAG_COMPILE_INFO, \
      NCBI_NS_NCBI::eDiag_Trace).GetRef()        \
      << message << NCBI_NS_NCBI::Endm )
Define macros to support debugging.

Definition at line 67 of file ncbidbg.hpp.

Referenced by CStatement::Action(), CResultSetMetaData::Action(), CResultSet::Action(), CDataSource::Action(), CCursor::Action(), CConnection::Action(), CBulkInsert::Action(), CServer_ConnectionPool::Add(), CDensityMap< CntType >::AddAlignments(), CEventHandler::AddListener(), CActiveObject::AddListener(), CFileCode::AddType(), CMsvcConfigure::AnalyzeDefines(), CPluginValue::AsString(), CProjectTreeBuilder::BuildProjectTree(), CStatement::CacheResultSet(), CSeqAnnotFromFasta::CacheSequences(), CMSSpectrumMatch::CalcPoissonMean(), CBlobOStream::CBlobOStream(), CByteStreamBuf::CByteStreamBuf(), CConnection::CConnection(), CInitRegistrar::CInitRegistrar(), CServer_ConnectionPool::Clean(), CConnection::CloneCDB_Conn(), CServer_ConnectionPool::CloseConnection(), CMsvcConfigure::Configure(), CPhyloTreeDataSource::Copy(), AbstractParser::CopyLineComment(), CObjectStreamCopier::CopyPointer(), CPager::CPager(), CMsvcConfigure::CreateConfH(), CAlnMultiDSBuilder::CreateDataSource(), CEntrezDB::CreateGene_Gene(), CPluginManager< TClass >::CreateInstanceFromKey(), CPluginManager< TClass >::CreateInstanceFromList(), CServer::CreateRequest(), CServer_ControlConnection::CreateRequest(), CResultSet::CResultSet(), CSQLITE3_Statement::CSQLITE3_Statement(), CPhyloTreeDataSource::Cut(), CWinMaskConfig::CWinMaskConfig(), CTexWindow::draw(), CGlZoomLens::Draw(), CDataSource::DropTSE(), IRegistry::EnumerateEntries(), CDelayedOfstream::equals(), CCallableStatement::Execute(), CNcbiRelocateCommand::Execute(), CCodeGenerator::ExternalResolve(), CProjBulderApp::GenerateMacProjects(), CProjBulderApp::GenerateMsvcProjects(), IRegistry::Get(), CPluginManagerGetter< Interface >::Get(), CGlUtils::GetAccelerated(), CConnection::GetAuxConn(), IRegistry::GetComment(), CPager::GetDisplayedPage(), CDll::GetEntryPoint(), CCdAnnotationInfo::GetEvidencePositions(), CPluginManager< TClass >::GetFactory(), CFileModules::GetFileNamePrefix(), CDataTypeModule::GetFileNamePrefix(), CSeqGraphicRenderer::GetHeight(), CPager::GetPageSize(), GetQueryBatchSize(), CTextUtil::GetWordFrequencies(), CToMultiExHandler::HandleIt(), CNcbiResource::HandleRequest(), IRegistry::HasEntry(), CCallableStatement::HasMoreResults(), CImage::Init(), CPager::IsPagerCommand(), CGlTexture::Load(), CDll::Load(), CCompoundRWRegistry::LoadBaseRegistries(), LoadScope(), CSQLITE3_Cache::CWriterThread::Main(), main(), MakeFileName(), CDBConnectionFactory::MakeValidConnection(), CPhyloTreeDataSource::MoveNode(), CConnection::MsgToEx(), ncbi_q_error(), CPhyloTreeDataSource::NewNode(), CCompareSeqRegions::NextComparisonGroup(), CActiveObject::Notify(), CGlWidgetBase::OnAllEvents(), CAutoCompleteCombo::OnIdle(), CAutoCompleteCombo::OnItemSelected(), CAutoCompleteCombo::OnKeyDown(), CProjectViewBase::OnProjectChanged(), CProjectViewBase::OnSelectionChanged(), CAutoCompleteCombo::OnTextChanged(), CProjectViewBase::OnViewCreated(), CProjectViewBase::OnViewReleased(), CDelayedOfstream::open(), CBDB_CacheIWriter::OpenOverflowFile(), CByteStreamBuf::overflow(), CPhyloTreeDataSource::Paste(), Path(), CAppPopup::PopupURL(), CSeqMaskerScoreMeanGlob::PostAdvance(), PrintVec(), CObjectsSniffer::ProbeASN1_Bin(), CServerConnectionRequest::Process(), CAcceptRequest::Process(), CCgiSampleApplication::ProcessRequest(), CNlmZipBtRdr::Read(), CResultSet::Read(), CObjectIStream::ReadExternalObject(), CObjectIStream::ReadPointer(), CGff3Reader::ReadSeqEntry(), CMsvcProjectMakefile::Redefine(), RegisterMethods(), CWriteObjectList::RegisterObject(), CMetaRegistry::SEntry::Reload(), CCgiRedirectApplication::RemapEntries(), CPhyloTreeDataSource::Remove(), CActiveObject::RemoveListener(), CProjectTreeBuilder::ResolveDefs(), CCodeGenerator::ResolveInAnyModule(), CDelayedOfstream::rewrite(), CAlnMrgApp::Run(), CCgiApplication::Run(), s_BlastResults2SeqAlignDatabaseSearch_OMF(), s_ExpandSubNodes(), CImageUtil::Scale(), IRWRegistry::Set(), IRWRegistry::SetComment(), CServer_ConnectionPool::SetConnType(), CDataSource::SetLogStream(), CMySQL_Connection::SetTimeout(), CDBL_Connection::SetTimeout(), CTL_Connection::SetTimeout(), CObjectIStream::SkipExternalObject(), CObjectIStream::SkipPointer(), SplitQuery_CalculateNumChunks(), SplitQuery_GetChunkSize(), SplitQuery_GetOverlapChunkSize(), CSimpleDictionary::SuggestAlternates(), CByteStreamBuf::underflow(), CDll::Unload(), CPluginManager< TClass >::UnregisterFactory(), CVariantInfo::UpdateDelayedBuffer(), CSymbolGuard::UpdateSymbols(), CWinMaskConfig::Validate(), CReader::WaitBeforeNewConnection(), CObjectOStream::WriteExternalObject(), CObjectOStream::WritePointer(), CLDS_BuildIdIdx::x_AddToIdx(), CConn_Streambuf::x_Cleanup(), CQuerySplitter::x_ComputeQueryIndicesForChunks(), CProjectViewBase::x_CreateMenuBarMenu(), CAlnMultiDSBuilder::x_CreateSparseDataSource(), CwxSettingsDlg::x_GetFakeDataSource(), CSeqGraphicConfigPanel::x_GetFakeDataSource(), CGlTexture::x_InitTexObj(), CBlastPrelimSearch::x_LaunchMultiThreadedSearch(), CNCMessageHandler::x_ManageCmdPipeline(), CProjectView::x_OnSetSelection(), CXcompareAnnotsApplication::x_ProcessComparison(), CXcompareAnnotsApplication::x_ProcessSeqAlignSetFromFile(), CTSE_ScopeInfo::x_RestoreAdded(), CCgiApplication::x_RunFastCGI(), CTSE_ScopeInfo::x_SaveRemoved(), CStatement::x_Send(), CCompoundRWRegistry::x_Set(), CMemoryRegistry::x_Set(), CRPCClient< TRequest, TReply >::x_ShouldRetry(), CBDB_CacheIWriter::~CBDB_CacheIWriter(), CBulkInsert::~CBulkInsert(), CConnection::~CConnection(), CCursor::~CCursor(), CDataSource::~CDataSource(), CResultSet::~CResultSet(), CResultSetMetaData::~CResultSetMetaData(), and CStatement::~CStatement().

#define _TRACE_EX err_code,
err_subcode,
message   ) 
 

Value:

( NCBI_NS_NCBI::CNcbiDiag(DIAG_COMPILE_INFO             \
      NCBI_NS_NCBI::eDiag_Trace).GetRef()                   \
      << NCBI_NS_NCBI::ErrCode( (err_code), (err_subcode) ) \
      << message << NCBI_NS_NCBI::Endm )

Definition at line 72 of file ncbidbg.hpp.

#define _TRACE_X err_subcode,
message   )     _TRACE_XX(NCBI_USE_ERRCODE_X, err_subcode, message)
 

Definition at line 78 of file ncbidbg.hpp.

#define _TRACE_XX error_name,
err_subcode,
message   ) 
 

Value:

( (NCBI_CHECK_ERR_SUBCODE_X_NAME(error_name, err_subcode)),            \
      _TRACE_EX(NCBI_ERRCODE_X_NAME(error_name), err_subcode, message) )

Definition at line 81 of file ncbidbg.hpp.

#define _TROUBLE   NCBI_TROUBLE(NULL)
 

Definition at line 134 of file ncbidbg.hpp.

#define _VERIFY expr   )     NCBI_VERIFY(expr, NULL)
 

Definition at line 133 of file ncbidbg.hpp.

Referenced by CCgiCookies::Add(), CDataSource_ScopeInfo::AddTSE_Lock(), CDataSource_ScopeInfo::AttachTSE(), CSQLITE_Global::Finalize(), CSeq_id_Local_Tree::FindOrCreate(), CCompressionStreambuf::Flush(), CMatrixScoringMethod::GetColorForNoScore(), CTestSeqBasedMethod::GetColorForNoScore(), CSNPScoringMethod::GetColorForNoScore(), CTestSeqBasedMethod::GetColorForScore(), CScope_Impl::GetEditHandle(), GetExtensionAsInterface(), CBlockingQueue< TRequest >::GetHandle(), CNCDBFile::GetLastBlobId(), CDataSource::GetTSE_LoadLockIfLoaded(), CDataSource_ScopeInfo::GetTSE_Lock(), CBDB_Cache::GetWriteStream(), CSQLITE_Global::Initialize(), CMapControl::InsertItem(), CNCDBFile::IsBlobExists(), CInterProcessLock::Lock(), CRenderableImpl::NeedTooltip(), CTraceGraph::NeedTooltip(), CBZip2Decompressor::Process(), CDeleteQueue< Key, Value >::Put(), CNCDBFile::ReadBlobInfo(), CObjectManager::RegisterScope(), SIdAnnotPieces::Remove(), CDataSource_ScopeInfo::RemoveTSE_Lock(), CObjectManager::RevokeScope(), CMatrixScoringMethod::SetColorForNoScore(), CSNPScoringMethod::SetColorForNoScore(), CTSE_ScopeInfo::SetEditTSE(), CConn_Streambuf::showmanyc(), CInterProcessLock::Unlock(), CNCBlobStorage::x_CreateBlobInCache(), CTSE_Lock::x_Drop(), CDataSource::x_DropTSE(), CId1Reader::x_GetConnection(), CDataSource::x_IndexAnnotTSEs(), CFeatList::x_Init(), CNCBlobStorage::x_MoveBlobInCache(), CGFFReader::x_ParseV2Attributes(), CObjectManager::x_RegisterLoader(), CDataSource::x_ReleaseLastTSELock(), CId2Reader::x_RemoveConnectionSlot(), CId1Reader::x_RemoveConnectionSlot(), CDataSource::x_ResetDirtyAnnotIndex(), CTSE_ScopeInfo::x_RestoreAdded(), CObjectManager::x_RevokeDataLoader(), CDataSource::x_SetDirtyAnnotIndex(), CDataSource::x_SetLoadLock(), CTSE_Chunk_Info::x_SplitAttach(), CSeq_id_Local_Tree::x_Unindex(), CSeq_id_int_Tree::x_Unindex(), and CTSE_ScopeInfo::~CTSE_ScopeInfo().

#define NCBI_ASSERT expr,
mess   ) 
 

Value:

do { if ( !(expr) ) \
          NCBI_NS_NCBI::CNcbiDiag::DiagAssert(DIAG_COMPILE_INFO, #expr, mess); \
      } while ( 0 )

Definition at line 99 of file ncbidbg.hpp.

Referenced by CAgpErrEx::CAgpErrEx(), CAgpValidateReader::OnGapOrComponent(), CAgpValidateReader::OnScaffoldEnd(), CAlnVecRow::RenderColumn(), CAgpReader::SetErrorHandler(), and CAgpRow::SetErrorHandler().

#define NCBI_TROUBLE mess   )     NCBI_NS_NCBI::CNcbiDiag::DiagTrouble(DIAG_COMPILE_INFO, mess)
 

Definition at line 85 of file ncbidbg.hpp.

Referenced by CNCDBFile::x_GetStatement().

#define NCBI_VERIFY expr,
mess   )     NCBI_ASSERT(expr, mess)
 

Definition at line 105 of file ncbidbg.hpp.


Enumeration Type Documentation

enum EValidateAction
 

Which action to perform.

Specify action to be performed when expression under "xncbi_Validate(expr, ...)" evaluates to FALSE.

Enumerator:
eValidate_Default  Default action.
eValidate_Abort  abort() if not valid
eValidate_Throw  Throw an exception if not valid.

Definition at line 141 of file ncbidbg.hpp.


Function Documentation

EValidateAction xncbi_GetValidateAction void   ) 
 

Get the action to be performed.

Definition at line 57 of file ncbidbg.cpp.

References eValidate_Abort, eValidate_Default, eValidate_Throw, and s_ValidateTLS.

void xncbi_SetValidateAction EValidateAction  action  ) 
 

Set the action to be performed.

Definition at line 51 of file ncbidbg.cpp.

References s_ValidateTLS.


Generated on Mon Dec 7 16:01:28 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:24:35 2009 by modify_doxy.py rev. 173732