您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ EDEBUG函数代码示例

51自学网 2021-06-01 20:31:30
  C++
这篇教程C++ EDEBUG函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中EDEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ EDEBUG函数的具体用法?C++ EDEBUG怎么用?C++ EDEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了EDEBUG函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: EDEBUG

void QmlCppEngine::setState(DebuggerState newState, bool forced){    EDEBUG("SET MASTER STATE: " << newState);    EDEBUG("  CPP STATE: " << m_cppEngine->state());    EDEBUG("  QML STATE: " << m_qmlEngine->state());    DebuggerEngine::setState(newState, forced);}
开发者ID:FlavioFalcao,项目名称:qt-creator,代码行数:7,


示例2: add_myself

static voidadd_myself(void){	static const char myself[] = "/proc/self/exe";	static const char moddir[] = PKGLIBDIR;	static const char eprefix[] = "${exec_prefix}";	static const char prefix[] = "${prefix}";	const char *relmoddir;	char wd[PATH_MAX], *dp;	size_t sz;	sz = readlink(myself, wd, sizeof(wd));	wd[sz] = '/0';	if ((dp = strrchr(wd, '/')) == NULL) {		return;	}	/* add the path where the binary resides */	*dp = '/0';	EDEBUG("adding %s/n", wd);	lt_dladdsearchdir(wd);#define MEMCMPLIT(a, b)	memcmp((a), (b), sizeof(b) - 1)	if (moddir[0] == '/') {		/* absolute libdir, add him */		lt_dladdsearchdir(moddir);		return;	} else if (moddir[0] == '.') {		/* relative libdir? relative to what? */		return;	} else if (memcmp(moddir, eprefix, sizeof(eprefix) - 1) == 0) {		/* take the bit after EPREFIX for catting later on */		relmoddir = moddir + sizeof(eprefix) - 1;	} else if (memcmp(moddir, prefix, sizeof(prefix) - 1) == 0) {		/* take the bit after PREFIX for catting later on */		relmoddir = moddir + sizeof(prefix) - 1;	} else {		/* don't know, i guess i'll leave ya to it */		return;	}	/* go back one level in dp */	if ((dp = strrchr(wd, '/')) == NULL) {		return;	} else if (strcmp(dp, "/bin") && strcmp(dp, "/sbin")) {		/* dp doesn't end in /bin nor /sbin */		return;	}	/* good, now we're ready to cat relmoddir to dp */	strncpy(dp, relmoddir, sizeof(wd) - (dp - wd));	EDEBUG("adding %s/n", wd);	lt_dladdsearchdir(wd);	return;}
开发者ID:hroptatyr,项目名称:libfixc,代码行数:54,


示例3: do_regex

static int do_regex(REQUEST *request, char const *lhs, char const *rhs, bool iflag){	int compare;	int cflags = REG_EXTENDED;	regex_t reg;	regmatch_t rxmatch[REQUEST_MAX_REGEX + 1];	if (iflag) cflags |= REG_ICASE;	/*	 *	Include substring matches.	 */	compare = regcomp(&reg, rhs, cflags);	if (compare != 0) {		if (debug_flag) {			char errbuf[128];			regerror(compare, &reg, errbuf, sizeof(errbuf));			EDEBUG("Failed compiling regular expression: %s", errbuf);		}		EVAL_DEBUG("FAIL %d", __LINE__);		return -1;	}	memset(&rxmatch, 0, sizeof(rxmatch));	/* regexec does not seem to initialise unused elements */	compare = regexec(&reg, lhs, REQUEST_MAX_REGEX + 1, rxmatch, 0);	regfree(&reg);	rad_regcapture(request, compare, lhs, rxmatch);	return (compare == 0);}
开发者ID:arturmalinowski,项目名称:freeradius-server,代码行数:31,


示例4: vdi_v_curright

void vdi_v_curright(VDI_Workstation *vwk){  EDEBUG("v_curright: Call not implemented!/n");  vdipb->contrl[N_PTSOUT] = 0;  vdipb->contrl[N_INTOUT] = 0;}
开发者ID:e8johan,项目名称:ovdisis,代码行数:7,


示例5: vdi_v_hardcopy

void vdi_v_hardcopy(VDI_Workstation *vwk){  EDEBUG("v_hardcopy: Call not implemented!/n");  vdipb->contrl[N_PTSOUT] = 0;  vdipb->contrl[N_INTOUT] = 0;}
开发者ID:e8johan,项目名称:ovdisis,代码行数:7,


示例6: vdi_vq_chcells

void vdi_vq_chcells(VDI_Workstation *vwk){  EDEBUG("vq_chcells: Call not implemented!/n");  vdipb->contrl[N_PTSOUT] = 0;  vdipb->contrl[N_INTOUT] = 2;}
开发者ID:e8johan,项目名称:ovdisis,代码行数:7,


示例7: krb5_instantiate

static int krb5_instantiate(CONF_SECTION *conf, void *instance){	rlm_krb5_t *inst = instance;	krb5_error_code ret;	krb5_keytab keytab;	char keytab_name[200];	char *princ_name;#ifdef HEIMDAL_KRB5	DEBUG("Using Heimdal Kerberos library");#else	DEBUG("Using MIT Kerberos library");#endif#ifndef KRB5_IS_THREAD_SAFE	if (!krb5_is_thread_safe()) {		DEBUGI("libkrb5 is not threadsafe, recompile it with thread support enabled");		WDEBUG("rlm_krb5 will run in single threaded mode, performance may be degraded");	} else {		WDEBUG("Build time libkrb5 was not threadsafe, but run time library claims to be");		WDEBUG("Reconfigure and recompile rlm_krb5 to enable thread support");	}#endif	inst->xlat_name = cf_section_name2(conf);	if (!inst->xlat_name) {		inst->xlat_name = cf_section_name1(conf);	}		ret = krb5_init_context(&inst->context);	if (ret) {		EDEBUG("rlm_krb5 (%s): Context initialisation failed: %s", inst->xlat_name, error_message(ret));		return -1;	}		DEBUG("rlm_krb5 (%s): Context initialised successfully", inst->xlat_name);	/*	 *	Split service principal into service and host components	 *	they're needed to build the server principal in MIT,	 *	and to set the validation service in Heimdal.	 */	if (inst->service_princ) {		size_t len;		/* Service principal appears to contain a host component */		inst->hostname = strchr(inst->service_princ, '/');		if (inst->hostname) {				len = (inst->hostname - inst->service_princ);						inst->hostname++;		} else {			len = strlen(inst->service_princ);		}				if (len) {			inst->service = talloc_array(inst, char, (len + 1));			strlcpy(inst->service, inst->service_princ, len + 1);		}	}
开发者ID:dpocock,项目名称:freeradius-server,代码行数:59,


示例8: vdi_characters

void vdi_characters(VDI_Workstation *vwk){  if(vdi_charfuncs[vdipb->contrl[SUBROUTINE]] &&      (vdipb->contrl[SUBROUTINE] <= 17) && (vdipb->contrl[SUBROUTINE] >= 0))    vdi_charfuncs[vdipb->contrl[SUBROUTINE]](vwk);  else    EDEBUG("vdi_characters: Subroutine %d doesn't exist!/n",vdipb->contrl[SUBROUTINE]);}
开发者ID:e8johan,项目名称:ovdisis,代码行数:8,


示例9: EDEBUG

void QmlCppEngine::notifyEngineRemoteSetupFinished(const RemoteSetupResult &result){    EDEBUG("MASTER REMOTE SETUP FINISHED");    DebuggerEngine::notifyEngineRemoteSetupFinished(result);    cppEngine()->notifyEngineRemoteSetupFinished(result);    qmlEngine()->notifyEngineRemoteSetupFinished(result);}
开发者ID:acacid,项目名称:qt-creator,代码行数:8,


示例10: do_regex

static int do_regex(REQUEST *request, const char *lhs, const char *rhs, int iflag){	int i, compare;	int cflags = REG_EXTENDED;	regex_t reg;	regmatch_t rxmatch[REQUEST_MAX_REGEX + 1];	if (iflag) cflags |= REG_ICASE;	/*	 *	Include substring matches.	 */	compare = regcomp(&reg, rhs, cflags);	if (compare != 0) {		if (debug_flag) {			char errbuf[128];			regerror(compare, &reg, errbuf, sizeof(errbuf));			EDEBUG("Failed compiling regular expression: %s", errbuf);		}		EVAL_DEBUG("FAIL %d", __LINE__);		return -1;	}		compare = regexec(&reg, lhs, REQUEST_MAX_REGEX + 1, rxmatch, 0);	regfree(&reg);	/*	 *	Add new %{0}, %{1}, etc.	 */	if (compare == 0) for (i = 0; i <= REQUEST_MAX_REGEX; i++) {		char *r;					free(request_data_get(request, request,				      REQUEST_DATA_REGEX | i));				/*		 *	No %{i}, skip it.		 *	We MAY have %{2} without %{1}.		 */		if (rxmatch[i].rm_so == -1) continue;				/*		 *	Copy substring into allocated buffer		 */		r = rad_malloc(rxmatch[i].rm_eo -rxmatch[i].rm_so + 1);		memcpy(r, lhs + rxmatch[i].rm_so,		       rxmatch[i].rm_eo - rxmatch[i].rm_so);		r[rxmatch[i].rm_eo - rxmatch[i].rm_so] = '/0';		request_data_add(request, request,				 REQUEST_DATA_REGEX | i,				 r, free);		}	return (compare == 0);}
开发者ID:ehayon,项目名称:freeradius-server,代码行数:56,


示例11: EDEBUG

void NotifyBox::show(void) {	if(shown())		return;	EDEBUG(ESTRLOC ": %i %i/n", x(), y());	resize_all();	Fl_Window::show();	is_shown = true;	Fl::add_timeout(TIME_SHOWN, visible_timeout_cb, this);}
开发者ID:edeproject,项目名称:svn,代码行数:11,


示例12: do_regex

static int do_regex(REQUEST *request, value_pair_map_t const *map, bool iflag){	int compare, rcode;	int cflags = REG_EXTENDED;	regex_t reg, *preg;	char *lhs, *rhs;	regmatch_t rxmatch[REQUEST_MAX_REGEX + 1];	if (iflag) cflags |= REG_ICASE;	/*	 *	Expand and then compile it.	 */	if (map->src->type == VPT_TYPE_REGEX) {		rcode = radius_expand_tmpl(&rhs, request, map->src);		if (rcode < 0) {			EVAL_DEBUG("FAIL %d", __LINE__);			return -1;		}		rad_assert(rhs != NULL);		compare = regcomp(&reg, rhs, cflags);		if (compare != 0) {			if (debug_flag) {				char errbuf[128];				regerror(compare, &reg, errbuf, sizeof(errbuf));				EDEBUG("Failed compiling regular expression: %s", errbuf);			}			EVAL_DEBUG("FAIL %d", __LINE__);			return -1;		}		preg = &reg;	} else {		preg = map->src->vpt_preg;	}	rcode = radius_expand_tmpl(&lhs, request, map->dst);	if (rcode < 0) {		EVAL_DEBUG("FAIL %d", __LINE__);		return -1;	}	rad_assert(lhs != NULL);	memset(&rxmatch, 0, sizeof(rxmatch));	/* regexec does not seem to initialise unused elements */	compare = regexec(preg, lhs, REQUEST_MAX_REGEX + 1, rxmatch, 0);	rad_regcapture(request, compare, lhs, rxmatch);	return (compare == 0);}
开发者ID:capone1992,项目名称:freeradius-server,代码行数:51,


示例13: pairadd_sv

/* * *     Verify that a Perl SV is a string and save it in FreeRadius *     Value Pair Format * */static int pairadd_sv(TALLOC_CTX *ctx, VALUE_PAIR **vps, char *key, SV *sv, FR_TOKEN op){	char	    *val;	VALUE_PAIR      *vp;	if (SvOK(sv)) {		val = SvPV_nolen(sv);		vp = pairmake(ctx, vps, key, val, op);		if (vp != NULL) {			DEBUG("rlm_perl: Added pair %s = %s", key, val);			return 1;		} else {			EDEBUG("rlm_perl: Failed to create pair %s = %s", key, val);		}	}	return 0;}
开发者ID:archsh,项目名称:freeradius-server,代码行数:23,


示例14: rlm_sql_fetch_row

/************************************************************************* * *	Function: rlm_sql_fetch_row * *	Purpose: call the module's sql_fetch_row and implement re-connect * *************************************************************************/int rlm_sql_fetch_row(rlm_sql_handle_t **handle, rlm_sql_t *inst){	int ret;	if (!*handle || !(*handle)->conn) {		return -1;	}	/*	 * We can't implement reconnect logic here, because the caller may require	 * the original connection to free up queries or result sets associated with	 * that connection.	 */	ret = (inst->module->sql_fetch_row)(*handle, inst->config);	if (ret < 0) {		char const *error = (inst->module->sql_error)(*handle, inst->config);		EDEBUG("rlm_sql (%s): Error fetching row: %s",		       inst->config->xlat_name, error ? error : "<UNKNOWN>");	}	return ret;}
开发者ID:olivierbeytrison,项目名称:freeradius-server,代码行数:29,


示例15: eapttls_gen_challenge

/* *	Generate the TTLS challenge * *	It's in the TLS module simply because it's only a few lines *	of code, and it needs access to the TLS PRF functions. */void eapttls_gen_challenge(SSL *s, uint8_t *buffer, size_t size){	uint8_t out[32], buf[32];	uint8_t seed[sizeof(FR_TLS_PRF_CHALLENGE)-1 + 2*SSL3_RANDOM_SIZE];	uint8_t *p = seed;	if (!s->s3) {		EDEBUG("No SSLv3 information");		return;	}	memcpy(p, FR_TLS_PRF_CHALLENGE, sizeof(FR_TLS_PRF_CHALLENGE)-1);	p += sizeof(FR_TLS_PRF_CHALLENGE)-1;	memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE);	p += SSL3_RANDOM_SIZE;	memcpy(p, s->s3->server_random, SSL3_RANDOM_SIZE);	PRF(s->session->master_key, s->session->master_key_length,	    seed, sizeof(seed), out, buf, sizeof(out));	memcpy(buffer, out, size);}
开发者ID:AlainRomeyer,项目名称:freeradius-server,代码行数:28,


示例16: eaptls_gen_eap_key

/* *	Actually generates EAP-Session-Id, which is an internal server *	attribute.  Not all systems want to send EAP-Key-Nam */void eaptls_gen_eap_key(RADIUS_PACKET *packet, SSL *s, uint32_t header){	VALUE_PAIR *vp;	uint8_t *p;	if (!s->s3) {		EDEBUG("No SSLv3 information");		return;	}	vp = paircreate(packet, PW_EAP_SESSION_ID, 0);	if (!vp) return;	vp->length = 1 + 2 * SSL3_RANDOM_SIZE;	p = talloc_array(vp, uint8_t, vp->length);	p[0] = header & 0xff;	memcpy(p + 1, s->s3->client_random, SSL3_RANDOM_SIZE);	memcpy(p + 1 + SSL3_RANDOM_SIZE,	       s->s3->server_random, SSL3_RANDOM_SIZE);	vp->vp_octets = p;	pairadd(&packet->vps, vp);}
开发者ID:AlainRomeyer,项目名称:freeradius-server,代码行数:27,


示例17: eaptls_gen_mppe_keys

/* *	Generate keys according to RFC 2716 and add to reply */void eaptls_gen_mppe_keys(REQUEST *request, SSL *s,			  char const *prf_label){	unsigned char out[4*EAPTLS_MPPE_KEY_LEN], buf[4*EAPTLS_MPPE_KEY_LEN];	unsigned char seed[64 + 2*SSL3_RANDOM_SIZE];	unsigned char *p = seed;	size_t prf_size;	if (!s->s3) {		EDEBUG("No SSLv3 information");		return;	}	prf_size = strlen(prf_label);	memcpy(p, prf_label, prf_size);	p += prf_size;	memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE);	p += SSL3_RANDOM_SIZE;	prf_size += SSL3_RANDOM_SIZE;	memcpy(p, s->s3->server_random, SSL3_RANDOM_SIZE);	prf_size += SSL3_RANDOM_SIZE;	PRF(s->session->master_key, s->session->master_key_length,	    seed, prf_size, out, buf, sizeof(out));	p = out;	eap_add_reply(request, "MS-MPPE-Recv-Key", p, EAPTLS_MPPE_KEY_LEN);	p += EAPTLS_MPPE_KEY_LEN;	eap_add_reply(request, "MS-MPPE-Send-Key", p, EAPTLS_MPPE_KEY_LEN);	eap_add_reply(request, "EAP-MSK", out, 64);	eap_add_reply(request, "EAP-EMSK", out + 64, 64);}
开发者ID:AlainRomeyer,项目名称:freeradius-server,代码行数:39,


示例18: do_linelog

//.........这里部分代码省略.........            RDEBUG2("No such entry /"%s/"", line);            return RLM_MODULE_NOOP;        }        if (!cf_item_is_pair(ci)) {            RDEBUG2("Entry /"%s/" is not a variable assignment ", line);            goto do_log;        }        cp = cf_itemtopair(ci);        value = cf_pair_value(cp);        if (!value) {            RDEBUG2("Entry /"%s/" has no value", line);            goto do_log;        }        /*         *	Value exists, but is empty.  Don't log anything.         */        if (!*value) return RLM_MODULE_OK;    }do_log:    /*     *	FIXME: Check length.     */    if (strcmp(inst->filename, "syslog") != 0) {        if (radius_xlat(buffer, sizeof(buffer), request, inst->filename, NULL, NULL) < 0) {            return RLM_MODULE_FAIL;        }        /* check path and eventually create subdirs */        p = strrchr(buffer,'/');        if (p) {            *p = '/0';            if (rad_mkdir(buffer, 0700) < 0) {                RERROR("rlm_linelog: Failed to create directory %s: %s", buffer, fr_syserror(errno));                return RLM_MODULE_FAIL;            }            *p = '/';        }        fd = fr_logfile_open(inst->lf, buffer, inst->permissions);        if (fd == -1) {            ERROR("rlm_linelog: Failed to open %s: %s",                  buffer, fr_syserror(errno));            return RLM_MODULE_FAIL;        }#ifdef HAVE_GRP_H        if (inst->group != NULL) {            gid = strtol(inst->group, &endptr, 10);            if (*endptr != '/0') {                grp = getgrnam(inst->group);                if (!grp) {                    RDEBUG2("Unable to find system group /"%s/"", inst->group);                    goto skip_group;                }                gid = grp->gr_gid;            }            if (chown(buffer, -1, gid) == -1) {                RDEBUG2("Unable to change system group of /"%s/"", buffer);            }        }#endif    }skip_group:    /*     *	FIXME: Check length.     */    if (radius_xlat(line, sizeof(line) - 1, request, value, linelog_escape_func, NULL) < 0) {        if (fd > -1) {            fr_logfile_close(inst->lf, fd);        }        return RLM_MODULE_FAIL;    }    if (fd >= 0) {        strcat(line, "/n");        if (write(fd, line, strlen(line)) < 0) {            EDEBUG("rlm_linelog: Failed writing: %s", fr_syserror(errno));            fr_logfile_close(inst->lf, fd);            return RLM_MODULE_FAIL;        }        fr_logfile_close(inst->lf, fd);#ifdef HAVE_SYSLOG_H    } else {        syslog(inst->facility, "%s", line);#endif    }    return RLM_MODULE_OK;}
开发者ID:kcnwogu,项目名称:freeradius-server,代码行数:101,


示例19: QTC_CHECK

void QmlCppEngine::slaveEngineStateChanged    (DebuggerEngine *slaveEngine, const DebuggerState newState){    DebuggerEngine *otherEngine = (slaveEngine == m_cppEngine)         ? m_qmlEngine : m_cppEngine;    QTC_CHECK(otherEngine != slaveEngine);    if (debug) {        EDEBUG("GOT SLAVE STATE: " << slaveEngine << newState);        EDEBUG("  OTHER ENGINE: " << otherEngine << otherEngine->state());        EDEBUG("  COMBINED ENGINE: " << this << state() << isDying());    }    // Idea is to follow the state of the cpp engine, except where we are stepping in QML.    // That is, when the QmlEngine moves between InferiorStopOk, and InferiorRunOk, InferiorStopOk ...    //    // Accordingly, the 'active engine' is the cpp engine until the qml engine enters the    // InferiorStopOk state. The cpp engine becomes the active one again as soon as it itself enters    // the InferiorStopOk state.    if (slaveEngine == m_cppEngine) {        switch (newState) {        case DebuggerNotReady: {            // Can this ever happen?            break;        }        case EngineSetupRequested: {            // set by queueSetupEngine()            QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());            break;        }        case EngineSetupFailed: {            qmlEngine()->quitDebugger();            notifyEngineSetupFailed();            break;        }        case EngineSetupOk: {            notifyEngineSetupOk();            break;        }        case InferiorSetupRequested: {            // set by queueSetupInferior()            QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());            break;        }        case InferiorSetupFailed: {            qmlEngine()->quitDebugger();            notifyInferiorSetupFailed();            break;        }        case InferiorSetupOk: {            notifyInferiorSetupOk();            break;        }        case EngineRunRequested: {            // set by queueRunEngine()            break;        }        case EngineRunFailed: {            qmlEngine()->quitDebugger();            notifyEngineRunFailed();            break;        }        case InferiorUnrunnable: {            qmlEngine()->quitDebugger();            notifyInferiorUnrunnable();            break;        }        case InferiorRunRequested: {            // might be set already by notifyInferiorRunRequested()            QTC_ASSERT(state() == InferiorRunRequested                       || state() == InferiorStopOk, qDebug() << state());            if (state() != InferiorRunRequested)                notifyInferiorRunRequested();            break;        }        case InferiorRunOk: {            QTC_ASSERT(state() == EngineRunRequested                       || state() == InferiorRunRequested, qDebug() << state());            if (state() == EngineRunRequested)                notifyEngineRunAndInferiorRunOk();            else if (state() == InferiorRunRequested)                notifyInferiorRunOk();            if (qmlEngine()->state() == InferiorStopOk) {                // track qml engine again                setState(InferiorStopRequested);                notifyInferiorStopOk();                setActiveEngine(m_qmlEngine);            }            break;        }        case InferiorRunFailed: {            qmlEngine()->quitDebugger();            notifyInferiorRunFailed();            break;        }        case InferiorStopRequested: {            if (m_activeEngine == cppEngine()) {//.........这里部分代码省略.........
开发者ID:FlavioFalcao,项目名称:qt-creator,代码行数:101,



注:本文中的EDEBUG函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ EDGE_COUNT函数代码示例
C++ ECerr函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。