本文整理汇总了C++中CL_DEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ CL_DEBUG函数的具体用法?C++ CL_DEBUG怎么用?C++ CL_DEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CL_DEBUG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: masterPath
void CompilerLocatorGCC::AddTools(CompilerPtr compiler,
const wxString& binFolder,
const wxString& suffix)
{
wxFileName masterPath(binFolder, "");
wxString defaultBinFolder = "/usr/bin";
compiler->SetCompilerFamily(COMPILER_FAMILY_GCC);
compiler->SetInstallationPath( binFolder );
CL_DEBUG("Found GNU GCC compiler under: %s. \"%s\"", masterPath.GetPath(), compiler->GetName());
wxFileName toolFile(binFolder, "");
// ++++-----------------------------------------------------------------
// With XCode installation, only
// g++, gcc, and make are installed under the Xcode installation folder
// the rest (mainly ar and as) are taken from /usr/bin
// ++++-----------------------------------------------------------------
toolFile.SetFullName("g++");
AddTool(compiler, "CXX", toolFile.GetFullPath(), suffix);
AddTool(compiler, "LinkerName", toolFile.GetFullPath(), suffix);
#ifndef __WXMAC__
AddTool(compiler, "SharedObjectLinkerName", toolFile.GetFullPath(), suffix, "-shared -fPIC");
#else
AddTool(compiler, "SharedObjectLinkerName", toolFile.GetFullPath(), suffix, "-dynamiclib -fPIC");
#endif
toolFile.SetFullName("gcc");
AddTool(compiler, "CC", toolFile.GetFullPath(), suffix);
toolFile.SetFullName("make");
wxString makeExtraArgs;
if ( wxThread::GetCPUCount() > 1 ) {
makeExtraArgs << "-j" << wxThread::GetCPUCount();
}
AddTool(compiler, "MAKE", toolFile.GetFullPath(), "", makeExtraArgs);
// ++++-----------------------------------------------------------------
// From this point on, we use /usr/bin only
// ++++-----------------------------------------------------------------
toolFile.AssignDir( defaultBinFolder );
toolFile.SetFullName("ar");
AddTool(compiler, "AR", toolFile.GetFullPath(), "", "rcu");
toolFile.SetFullName("windres");
AddTool(compiler, "ResourceCompiler", "", "");
toolFile.SetFullName("as");
AddTool(compiler, "AS", toolFile.GetFullPath(), "");
}
示例2: ConnectionSmEncryptionKeyRefresh
void ConnectionSmEncryptionKeyRefresh(const typed_bdaddr* taddr)
{
#ifdef CONNECTION_DEBUG_LIB
if(taddr == NULL)
{
CL_DEBUG(("Out of range Bluetooth Address 0x%p\n", (void*)taddr));
}
#endif
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_ENCRYPTION_KEY_REFRESH_REQ);
message->taddr = *taddr;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_ENCRYPTION_KEY_REFRESH_REQ, message);
}
}
示例3: DoGetCommand
void CppCheckPlugin::DoProcess(ProjectPtr proj)
{
wxString command = DoGetCommand(proj);
m_view->AppendLine(wxString::Format(_("Starting cppcheck: %s\n"), command.c_str()));
#if defined(__WXMSW__)
// Under Windows, we set the working directory to the binary folder
// so the configurtion files can be found
CL_DEBUG("CppCheck: Working directory: %s", clStandardPaths::Get().GetBinFolder());
CL_DEBUG("CppCheck: Command: %s", command);
m_cppcheckProcess = CreateAsyncProcess(this, command, IProcessCreateDefault, clStandardPaths::Get().GetBinFolder());
#elif defined(__WXOSX__)
CL_DEBUG("CppCheck: Working directory: %s", clStandardPaths::Get().GetDataDir());
CL_DEBUG("CppCheck: Command: %s", command);
m_cppcheckProcess = CreateAsyncProcess(this, command, IProcessCreateDefault, clStandardPaths::Get().GetDataDir());
#else
m_cppcheckProcess = CreateAsyncProcess(this, command);
#endif
if(!m_cppcheckProcess) {
wxMessageBox(_("Failed to launch codelite_cppcheck process!"), _("Warning"), wxOK | wxCENTER | wxICON_WARNING);
return;
}
}
示例4: CL_DEBUG
void LLDBPlugin::TerminateTerminal()
{
if(m_terminalPID != wxNOT_FOUND) {
CL_DEBUG("Killing Terminal Process PID: %d", (int)m_terminalPID);
::wxKill(m_terminalPID, wxSIGKILL);
m_terminalPID = wxNOT_FOUND;
}
#ifdef __WXGTK__
if(m_terminalTTY.StartsWith("/tmp/pts")) {
// this is a fake symlink - remove it
::unlink(m_terminalTTY.mb_str(wxConvUTF8).data());
}
#endif
m_terminalTTY.Clear();
}
示例5: ConnectionL2capUnmapConnectionlessRequest
void ConnectionL2capUnmapConnectionlessRequest(Sink sink)
{
if (sink)
{
MAKE_CL_MESSAGE(CL_INTERNAL_L2CAP_UNMAP_CONNECTIONLESS_REQ);
message->sink = sink;
MessageSend(connectionGetCmTask(), CL_INTERNAL_L2CAP_UNMAP_CONNECTIONLESS_REQ, message);
}
#ifdef CONNECTION_DEBUG_LIB
else
{
CL_DEBUG(("Sink is NULL!\n"));
}
#endif
}
示例6: databaseFile
FileNameVector_t CompilationDatabase::GetCompileCommandsFiles() const
{
wxFileName databaseFile(GetFileName());
wxFileName fn(databaseFile);
// Usually it will be under the top folder
fn.RemoveLastDir();
// Since we can have multiple "compile_commands.json" files, we take the most updated file
// Prepare a list of files to check
FileNameVector_t files;
std::queue<std::pair<wxString, int> > dirs;
// we start with the current path
dirs.push(std::make_pair(fn.GetPath(), 0));
const int MAX_DEPTH = 2; // If no files were found, scan 2 levels only
while(!dirs.empty()) {
std::pair<wxString, int> curdir = dirs.front();
dirs.pop();
if(files.empty() && (curdir.second > MAX_DEPTH)) {
CL_DEBUG("Could not find compile_commands.json files while reaching depth 2, aborting");
break;
}
wxFileName fn(curdir.first, "compile_commands.json");
if(fn.Exists()) {
CL_DEBUGS("CompilationDatabase: found file: " + fn.GetFullPath());
files.push_back(fn);
}
// Check to see if there are more directories to recurse
wxDir dir;
if(dir.Open(curdir.first)) {
wxString dirname;
bool cont = dir.GetFirst(&dirname, "", wxDIR_DIRS);
while(cont) {
wxString new_dir;
new_dir << curdir.first << wxFileName::GetPathSeparator() << dirname;
dirs.push(std::make_pair(new_dir, curdir.second + 1));
dirname.Clear();
cont = dir.GetNext(&dirname);
}
}
}
return files;
}
示例7: CL_DEBUGS
void LLDBConnector::DeleteBreakpoints()
{
if ( IsCanInteract() ) {
CL_DEBUGS(wxString () << "codelite: deleting breakpoints (total of " << m_pendingDeletionBreakpoints.size() << " breakpoints)");
LLDBCommand command;
command.SetCommandType( kCommandDeleteBreakpoint );
command.SetBreakpoints( m_pendingDeletionBreakpoints );
SendCommand( command );
CL_DEBUGS(wxString () << "codelite: DeleteBreakpoints celar pending deletionbreakpoints queue");
m_pendingDeletionBreakpoints.clear();
} else {
CL_DEBUG("codelite: interrupting codelite-lldb for kInterruptReasonDeleteBreakpoint");
Interrupt( kInterruptReasonDeleteBreakpoint );
}
}
示例8: clang_getNumDiagnostics
void ClangUtils::printDiagnosticsToLog(CXTranslationUnit& TU)
{
//// Report diagnostics to the log file
const unsigned diagCount = clang_getNumDiagnostics(TU);
for(unsigned i=0; i<diagCount; i++) {
CXDiagnostic diag = clang_getDiagnostic(TU, i);
CXString diagStr = clang_formatDiagnostic(diag, clang_defaultDiagnosticDisplayOptions());
wxString wxDiagString = wxString(clang_getCString(diagStr), wxConvUTF8);
if(!wxDiagString.Contains(wxT("'dllimport' attribute"))) {
CL_DEBUG(wxT("Diagnostic: %s"), wxDiagString.c_str());
}
clang_disposeString(diagStr);
clang_disposeDiagnostic(diag);
}
}
示例9: t_mine_init
static void t_mine_init ( MbsTask *task )
{
GList *l;
gint64 total = 0;
task->data = g_new0(MineData, 1);
for (l = MB_SECTOR(MB_COLONY_SECTOR(MB_TASK_COLONY(task)))->veins; l; l = l->next)
{
if (MB_VEIN_RESOURCE(l->data) == MB_TASK_RESOURCE(task))
MINE_DATA(task)->veins = g_list_append(MINE_DATA(task)->veins,
l_object_ref(l->data));
total += MB_VEIN_QTTY(l->data);
}
CL_DEBUG("mine task '%s' : %" G_GINT64_FORMAT,
MB_RESOURCE_NAME(MB_TASK_RESOURCE(task)),
total);
}
示例10: masterPath
void CompilerLocatorMinGW::AddTools(CompilerPtr compiler, const wxString& binFolder, const wxString& name)
{
wxFileName masterPath(binFolder, "");
masterPath.RemoveLastDir();
if ( m_locatedFolders.count(masterPath.GetPath()) ) {
return;
}
m_locatedFolders.insert( masterPath.GetPath() );
if ( name.IsEmpty() ) {
compiler->SetName("MinGW ( " + masterPath.GetDirs().Last() + " )");
} else {
compiler->SetName("MinGW ( " + name + " )");
}
CL_DEBUG("Found MinGW compiler under: %s. \"%s\"", masterPath.GetPath(), compiler->GetName());
wxFileName toolFile(binFolder, "");
toolFile.SetFullName("g++.exe");
AddTool(compiler, "CXX", toolFile.GetFullPath());
AddTool(compiler, "LinkerName", toolFile.GetFullPath());
AddTool(compiler, "SharedObjectLinkerName", toolFile.GetFullPath(), "-shared -fPIC");
toolFile.SetFullName("gcc.exe");
AddTool(compiler, "CC", toolFile.GetFullPath());
toolFile.SetFullName("ar.exe");
AddTool(compiler, "AR", toolFile.GetFullPath(), "rcu");
toolFile.SetFullName("windres.exe");
AddTool(compiler, "ResourceCompiler", toolFile.GetFullPath());
toolFile.SetFullName("as.exe");
AddTool(compiler, "AS", toolFile.GetFullPath());
toolFile.SetFullName("make.exe");
if ( toolFile.FileExists() ) {
AddTool(compiler, "MAKE", toolFile.GetFullPath());
} else {
toolFile.SetFullName("mingw32-make.exe");
if ( toolFile.FileExists() ) {
AddTool(compiler, "MAKE", toolFile.GetFullPath());
}
}
}
示例11: fn
CXTranslationUnit ClangWorkerThread::DoCreateTU(CXIndex index, ClangThreadRequest* task, bool reparse)
{
wxFileName fn(task->GetFileName());
DoSetStatusMsg(wxString::Format(wxT("clang: parsing file %s..."), fn.GetFullName().c_str()));
FileExtManager::FileType type = FileExtManager::GetType(task->GetFileName());
int argc(0);
char** argv = MakeCommandLine(task, argc, type);
for(int i = 0; i < argc; i++) {
CL_DEBUG(wxT("Command Line Argument: %s"), wxString(argv[i], wxConvUTF8).c_str());
}
std::string c_filename = task->GetFileName().mb_str(wxConvUTF8).data();
CL_DEBUG(wxT("Calling clang_parseTranslationUnit..."));
// First time, need to create it
unsigned flags;
if(reparse) {
flags = CXTranslationUnit_CacheCompletionResults | CXTranslationUnit_PrecompiledPreamble |
CXTranslationUnit_Incomplete | CXTranslationUnit_DetailedPreprocessingRecord |
CXTranslationUnit_CXXChainedPCH;
} else {
flags = CXTranslationUnit_Incomplete |
#if HAS_LIBCLANG_BRIEFCOMMENTS
CXTranslationUnit_SkipFunctionBodies |
#endif
CXTranslationUnit_DetailedPreprocessingRecord;
}
CXTranslationUnit TU = clang_parseTranslationUnit(index, c_filename.c_str(), argv, argc, NULL, 0, flags);
CL_DEBUG(wxT("Calling clang_parseTranslationUnit... done"));
ClangUtils::FreeArgv(argv, argc);
DoSetStatusMsg(wxString::Format(wxT("clang: parsing file %s...done"), fn.GetFullName().c_str()));
if(TU && reparse) {
CL_DEBUG(wxT("Calling clang_reparseTranslationUnit..."));
if(clang_reparseTranslationUnit(TU, 0, NULL, clang_defaultReparseOptions(TU)) == 0) {
CL_DEBUG(wxT("Calling clang_reparseTranslationUnit... done"));
return TU;
} else {
CL_DEBUG(wxT("An error occured during reparsing of the TU for file %s. TU: %p"),
task->GetFileName().c_str(),
(void*)TU);
// The only thing that left to be done here, is to dispose the TU
clang_disposeTranslationUnit(TU);
PostEvent(wxEVT_CLANG_TU_CREATE_ERROR, task->GetFileName());
return NULL;
}
}
return TU;
}
示例12: wxDELETE
void clTernServer::OnTernTerminated(clProcessEvent& event)
{
wxDELETE(m_tern);
if(m_goingDown || !m_jsCCManager->IsEnabled()) {
return;
}
#if defined(__WXMSW__) && !defined(NDEBUG)
HANDLE hProcess = ::GetCurrentProcess();
DWORD handleCount;
::GetProcessHandleCount(hProcess, &handleCount);
CL_DEBUG("Tern process termianted. Number of handles %d", (int)handleCount);
::CloseHandle(hProcess);
#endif
PrintMessage("Tern server terminated, will restart it\n");
Start(m_workingDirectory);
}
示例13: CL_DEBUG
void NotebookNavigationDlg::OnKeyUp(wxKeyEvent& event)
{
CL_DEBUG("NotebookNavigationDlg::OnKeyUp");
#ifdef __WXOSX__
if(event.GetKeyCode() == WXK_ALT) {
CloseDialog();
} else {
event.Skip();
}
#else
if(event.GetKeyCode() == WXK_CONTROL) {
CloseDialog();
} else {
event.Skip();
}
#endif
}
示例14: ConnectionWriteScanEnable
void ConnectionWriteScanEnable(hci_scan_enable mode)
{
/* Check params are within allowed values - debug build only */
#ifdef CONNECTION_DEBUG_LIB
if (mode > hci_scan_enable_inq_and_page)
{
CL_DEBUG(("Out of range scan enable 0x%x\n", mode));
}
#endif
{
/* All requests are sent through the internal state handler */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_WRITE_SCAN_ENABLE_REQ);
message->mode = mode;
MessageSend(connectionGetCmTask(), CL_INTERNAL_DM_WRITE_SCAN_ENABLE_REQ, message);
}
}
示例15: fn
void ClangCleanerThread::DeleteStalePCHFiles()
{
wxString tmpdir;
if ( ::wxGetEnv("TMP", &tmpdir) ) {
wxArrayString files;
if ( wxDir::GetAllFiles(tmpdir, &files, "*.pch", wxDIR_FILES) ) {
for(size_t i=0; i<files.GetCount(); ++i) {
wxFileName fn( files.Item(i) );
if ( fn.GetFullName().StartsWith("preamble") ) {
if( ::wxRemoveFile( files.Item(i) ) ) {
CL_DEBUG("Deleting stale file: %s", files.Item(i) );
}
}
}
}
}
}