本文整理匯總了C++中EDEBUG函數的典型用法代碼示例。如果您正苦於以下問題:C++ EDEBUG函數的具體用法?C++ EDEBUG怎麽用?C++ EDEBUG使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了EDEBUG函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);
}
示例2: add_myself
static void
add_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;
}
示例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(®, rhs, cflags);
if (compare != 0) {
if (debug_flag) {
char errbuf[128];
regerror(compare, ®, 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(®, lhs, REQUEST_MAX_REGEX + 1, rxmatch, 0);
regfree(®);
rad_regcapture(request, compare, lhs, rxmatch);
return (compare == 0);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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]);
}
示例9: EDEBUG
void QmlCppEngine::notifyEngineRemoteSetupFinished(const RemoteSetupResult &result)
{
EDEBUG("MASTER REMOTE SETUP FINISHED");
DebuggerEngine::notifyEngineRemoteSetupFinished(result);
cppEngine()->notifyEngineRemoteSetupFinished(result);
qmlEngine()->notifyEngineRemoteSetupFinished(result);
}
示例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(®, rhs, cflags);
if (compare != 0) {
if (debug_flag) {
char errbuf[128];
regerror(compare, ®, errbuf, sizeof(errbuf));
EDEBUG("Failed compiling regular expression: %s", errbuf);
}
EVAL_DEBUG("FAIL %d", __LINE__);
return -1;
}
compare = regexec(®, lhs, REQUEST_MAX_REGEX + 1, rxmatch, 0);
regfree(®);
/*
* 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);
}
示例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);
}
示例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(®, rhs, cflags);
if (compare != 0) {
if (debug_flag) {
char errbuf[128];
regerror(compare, ®, errbuf, sizeof(errbuf));
EDEBUG("Failed compiling regular expression: %s", errbuf);
}
EVAL_DEBUG("FAIL %d", __LINE__);
return -1;
}
preg = ®
} 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);
}
示例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;
}
示例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;
}
示例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);
}