本文整理汇总了C++中dbgf函数的典型用法代码示例。如果您正苦于以下问题:C++ dbgf函数的具体用法?C++ dbgf怎么用?C++ dbgf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dbgf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _psxRcntWcount
INLINE void _psxRcntWcount( u32 index, u32 value )
{
if( value > 0xffff )
{
#ifdef DEBUG_BIOS
dbgf("[RCNT %i] wcount > 0xffff: %x\n", index, value );
#endif
value &= 0xffff;
}
rcnts[index].cycleStart = psxRegs.cycle;
rcnts[index].cycleStart -= value * rcnts[index].rate;
// TODO: <=.
if( value < rcnts[index].target )
{
rcnts[index].cycle = rcnts[index].target * rcnts[index].rate;
rcnts[index].counterState = CountToTarget;
}
else
{
rcnts[index].cycle = 0xffff * rcnts[index].rate;
rcnts[index].counterState = CountToOverflow;
}
}
示例2: dbgf
HRESULT IDirect3DDevice9New::CreateIndexBuffer(UINT Length,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DIndexBuffer9** ppIndexBuffer,HANDLE* pSharedHandle)
{
dbgf("dev: CreateIndexBuffer %s %s", getUsage(Usage), getPool(Pool));
if(config.debug.compatibleIB)
{
// Compatible index buffer mode - do not use emulated IB, set dynamic memory instead
if(Pool == D3DPOOL_MANAGED)
{
ONCE dbg("DEBUG: using compatible index buffers (manage-emulation disabled)");
Pool = D3DPOOL_DEFAULT;
Usage |= D3DUSAGE_DYNAMIC;
}
return dev->CreateIndexBuffer(Length, Usage, Format, Pool, ppIndexBuffer, pSharedHandle);
}
#if USE_D3DEX || MANAGE_DEBUG_IB
/*if(Pool == D3DPOOL_MANAGED && Usage == D3DUSAGE_WRITEONLY)
Pool = D3DPOOL_DEFAULT; // No need for manage-emulation for writeonly buffers, just set pool to default*/
if(Pool == D3DPOOL_MANAGED)
{
*ppIndexBuffer = new IDirect3DIndexBuffer9Managed((IDirect3DDevice9Ex*)dev, this, Length, Usage, Format, Pool, pSharedHandle);
// TODO: check for failure
return D3D_OK;
}
#endif
return dev->CreateIndexBuffer(Length, Usage, Format, Pool, ppIndexBuffer, pSharedHandle);
}
示例3: dbpf
long dbpf(const char *pname,const char *pvalue)
{
DBADDR addr;
long status;
short dbrType;
size_t n = 1;
if (!pname || !*pname || !pvalue) {
printf("Usage: dbpf \"pv name\", \"value\"\n");
return 1;
}
if (nameToAddr(pname, &addr))
return -1;
if (addr.no_elements > 1 &&
(addr.dbr_field_type == DBR_CHAR || addr.dbr_field_type == DBR_UCHAR)) {
dbrType = addr.dbr_field_type;
n = strlen(pvalue) + 1;
}
else {
dbrType = DBR_STRING;
}
status = dbPutField(&addr, dbrType, pvalue, (long) n);
dbgf(pname);
return status;
}
示例4: ZenEditor_replace_content
static PyObject *
ZenEditor_replace_content(ZenEditor *self, PyObject *args)
{
PyObject *result;
gint sel_start = -1, sel_end = -1, ph_pos;
gchar *text, *ph, *tmp, *tmp2;
ScintillaObject *sci;
print_called();
py_return_none_if_null(sci = ZenEditor_get_scintilla(self));
if (PyArg_ParseTuple(args, "s|ii", &text, &sel_start, &sel_end))
{
tmp = ZenEditor_replace_caret_placeholder(self->caret_placeholder, text, &ph_pos);
tmp2 = ZenEditor_replace_range(tmp);
g_free(tmp);
if (sel_start == -1 && sel_end == -1)
{
/* replace whole editor content */
sci_set_text(sci, tmp2);
}
else if (sel_start != -1 && sel_end == -1)
{
/* insert text at sel_start */
sci_insert_text(sci, sel_start, tmp2);
}
else if (sel_start != -1 && sel_end != -1)
{
/* replace from sel_start to sel_end */
sci_set_selection_start(sci, sel_start);
sci_set_selection_end(sci, sel_end);
sci_replace_sel(sci, tmp2);
}
else
{
dbgf("Invalid arguments were supplied.");
g_free(tmp2);
Py_RETURN_NONE;
}
g_free(tmp2);
/* Move cursor to first placeholder position, if found */
if (ph_pos > -1)
sci_set_current_position(sci, sel_start + ph_pos, TRUE);
}
else
{
if (PyErr_Occurred())
{
PyErr_Print();
PyErr_Clear();
}
}
Py_RETURN_NONE;
}
示例5: dumplist
static void dumplist (void)
{
shmpiece *x = shm_start;
#ifdef DEBUG_MEMORY
dbgf ("Start Dump:\n");
#endif
while (x) {
#ifdef DEBUG_MEMORY
dbgf (" this=%p, Native %p, id %d, prev=%p, next=%p, size=0x%08x\n",
x, x->native_address, x->id, x->prev, x->next, x->size);
#endif
x = x->next;
}
#ifdef DEBUG_MEMORY
dbgf ("End Dump:\n");
#endif
}
示例6: dummy_bget
uae_u32 REGPARAM2 dummy_bget (uaecptr addr)
{
#ifdef DEBUG_MEMORY
dbgf("dummy_bget 0x%X\n",addr);
#endif
special_mem |= S_READ;
return 0xFF;
}
示例7: sizeof
void *_debugRealloc(void *memoryParameter, uint32_t length, int32_t tag)
{
unsigned char *memory;
struct chunkHeader *chunkHeader=NULL;
struct chunkTrailer *chunkTrailer;
unsigned char *result;
uint32_t copyLength;
if (memoryParameter) { /* if memoryParameter==NULL, realloc() should work like malloc() !! */
memory = memoryParameter;
chunkHeader = (struct chunkHeader *)(memory - sizeof(struct chunkHeader));
if (chunkHeader->magicNumber != MAGIC_NUMBER)
{
dbgf( DBGL_SYS, DBGT_ERR,
"invalid magic number in header: %08x, malloc tag = %d",
chunkHeader->magicNumber, chunkHeader->tag );
cleanup_all( -500078 );
}
chunkTrailer = (struct chunkTrailer *)(memory + chunkHeader->length);
if (chunkTrailer->magicNumber != MAGIC_NUMBER)
{
dbgf( DBGL_SYS, DBGT_ERR,
"invalid magic number in trailer: %08x, malloc tag = %d",
chunkTrailer->magicNumber, chunkHeader->tag );
cleanup_all( -500079 );
}
}
result = _debugMalloc(length, tag);
if (memoryParameter) {
copyLength = length;
if (copyLength > chunkHeader->length)
copyLength = chunkHeader->length;
memcpy(result, memoryParameter, copyLength);
debugFree(memoryParameter, -300280);
}
return result;
}
示例8: __lbDbgAssertExit
void __lbDbgAssertExit(struct dbgModule *dbg, const char *assertion,
const char *filename, unsigned int line,
const char *function) {
dbgf(dbg, DBGERR, "%s (%s:%u): Assertion '%s' failed",
function, filename, line, assertion);
lbdFatalShutdown();
}
示例9: psxRcntRtarget
u32 psxRcntRtarget( u32 index )
{
#ifdef DEBUG_BIOS
dbgf("[RCNT %i] rtarget: %x\n", index, rcnts[index].target );
#endif
return rcnts[index].target;
}
示例10: dbgf
IDirect3DVertexBuffer9* IDirect3DVertexBuffer9Managed::GetRealBuffer()
{
dbgf("IDirect3DVertexBuffer9Managed 0x%08X: GetRealBuffer", this);
if(locks)
dbg("WARNING: IDirect3DVertexBuffer9Managed 0x%08X: GetRealBuffer() with %d active locks", locks);
if(lockSections.size() || fullDirty)
{
#ifdef ALWAYS_FULL_UPDATE
fullDirty = true;
#endif
//dbg("IDirect3DVertexBuffer9Managed 0x%08X: UPDATE");
if(!fullDirty)
{
// Partial buffer lock
for(int i=0;i<lockSections.size();i++)
{
DWORD lockOffset = lockSections[i].lockOffset;
DWORD lockSize = lockSections[i].lockSize;
#ifdef RECREATE_ON_REUSE
const DWORD flags = NULL;
#else
// Improves performance - but isn't safe and not allowed by D3D spec
const DWORD flags = D3DLOCK_NOOVERWRITE;
#endif
// Copy sysmem to vidmem
void *vb;
if(buf->Lock(lockOffset, lockSize, &vb, flags) != D3D_OK) {
dbg("IDirect3DVertexBuffer9Managed: Unlock: Lock failed!");
return buf;
}
memcpy(vb, bufSys+lockOffset, lockSize?lockSize:bufSize);
buf->Unlock();
}
}
else
{
// Full buffer lock
// Copy sysmem to vidmem
void *vb;
if(buf->Lock(0, 0, &vb, FLOCKFLAGS/*|D3DLOCK_NOOVERWRITE*/) != D3D_OK) {
dbg("IDirect3DVertexBuffer9Managed: Unlock: Lock failed!");
return buf;
}
memcpy(vb, bufSys, bufSize);
buf->Unlock();
}
lockSections.clear();
fullDirty = false;
}
return buf;
}
示例11: mbres_bget
uae_u32 REGPARAM2 mbres_bget (uaecptr addr)
{
#ifdef DEBUG_MEMORY
dbgf("mbres_bget 0x%X\n",addr);
#endif
special_mem |= S_READ;
return (addr & 0xFFFF) == 3 ? mbres_val : 0;
}
示例12: mbres_wget
uae_u32 REGPARAM2 mbres_wget (uaecptr addr)
{
#ifdef DEBUG_MEMORY
dbgf("mbres_wget 0x%X\n",addr);
#endif
special_mem |= S_READ;
return 0;
}
示例13: howto_plugin_init
static int32_t howto_plugin_init( void ) {
dbgf( DBGL_CHANGES, DBGT_INFO, "init plugin %s", HOWTO_PLUGIN );
register_options_array( howto_plugin_options, sizeof( howto_plugin_options ) );
return SUCCESS;
}
示例14: bogomem_bput
void REGPARAM2 bogomem_bput (uaecptr addr, uae_u32 b)
{
#ifdef DEBUG_MEMORY
dbgf("bogomem_bput 0x%X = 0x%X\n",addr,b);
#endif
addr -= bogomem_start & bogomem_mask;
addr &= bogomem_mask;
bogomemory[addr] = b;
}
示例15: rtarea_bget
uae_u32 REGPARAM2 rtarea_bget (uaecptr addr)
{
#ifdef DEBUG_MEMORY
dbgf("rtarea_bget 0x%X\n",addr);
#endif
special_mem |= S_READ;
addr &= 0xFFFF;
return rtarea[addr];
}