本文整理汇总了C++中DBGOUT函数的典型用法代码示例。如果您正苦于以下问题:C++ DBGOUT函数的具体用法?C++ DBGOUT怎么用?C++ DBGOUT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DBGOUT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process_ip_packet
int
process_ip_packet(int direction, int iface, UCHAR *ip_packet, UINT size)
{
struct ip_hdr *ip_hdr;
UINT hdr_len;
if(!ip_packet) {
DBGOUT(("process_ip_packet: NULL ip_packet passed!\n"));
return FILTER_UNKNOWN;
}
if (size < sizeof(struct ip_hdr)) {
DBGOUT(("process_ip_packet: too small buffer for ip_hdr! (%u)\n", size));
return FILTER_UNKNOWN;
}
ip_hdr = (struct ip_hdr *)ip_packet;
if(!ip_hdr)
return FILTER_UNKNOWN;
hdr_len = ip_hdr->ip_hl * 4;
if (size < hdr_len) {
DBGOUT(("process_ip_packet: too small buffer for ip_hdr! (%u vs. %u)\n",
size, hdr_len));
return FILTER_UNKNOWN;
}
return process_transp(direction, iface, ip_hdr->ip_p, ip_hdr,
ip_packet + hdr_len, size - hdr_len);
}
示例2: md5_starts
uint32 mhmakefileparser::CreateEnvMd5_32() const
{
md5_context ctx;
string Md5;
string EnvVars=ExpandVar(USED_ENVVARS);
const char *pTmp=EnvVars.c_str();
// Now create the md5 string
md5_starts( &ctx );
DBGOUT(cout << "MD5 of " << m_MakeDir->GetQuotedFullFileName() << endl);
while (*pTmp)
{
string Var;
pTmp=NextItem(pTmp,Var,";");
if (!SkipVar(Var))
{
string Val=ExpandVar(Var);
transform(Val.begin(),Val.end(),Val.begin(),(int(__CDECL *)(int))toupper);
DBGOUT(cout << GetMakeDir()->GetQuotedFullFileName() << " -> Setting GetFromEnv var " << Var << " to " << Val << endl);
md5_update( &ctx, (uint8 *) Var.c_str(), (unsigned long)Var.size());
md5_update( &ctx, (uint8 *) "=", 1);
md5_update( &ctx, (uint8 *) Val.c_str(), (unsigned long)Val.size());
}
}
return md5_finish32( &ctx);
}
示例3: DBGOUT
void SafeListView::populate(SafeGroup *group, SafeListViewGroup *view)
{
if(group) {
DBGOUT("populate");
SafeGroup::Iterator iter(group);
while(iter.current()) {
SafeItem *item = iter.current();
if(item->rtti() == SafeEntry::RTTI) {
DBGOUT("Adding item: " << ((SafeEntry *)item)->name());
if(view == NULL)
(void)new SafeListViewEntry(this, (SafeEntry *)item);
else
(void)new SafeListViewEntry(view, (SafeEntry *)item);
}
else if(item->rtti() == SafeGroup::RTTI) {
SafeListViewGroup *g = NULL;
DBGOUT("Adding group: " << ((SafeGroup *)item)->name());
if(view == NULL)
g = new SafeListViewGroup(this, (SafeGroup *)item);
else
g = new SafeListViewGroup(view, (SafeGroup *)item);
populate((SafeGroup *)item, g);
}
else {
DBGOUT("Unknown item");
}
++iter;
}
}
}
示例4: MiniportReset
// BUGBUG: Arguments are reversed from as documented in April '96 MSDN!
NDIS_STATUS MiniportReset(PBOOLEAN AddressingReset, NDIS_HANDLE MiniportAdapterContext)
{
IrDevice *dev, *thisDev = CONTEXT_TO_DEV(MiniportAdapterContext);
NDIS_STATUS result = NDIS_STATUS_SUCCESS;
DBGOUT(("MiniportReset(0x%x)", (UINT)MiniportAdapterContext));
/* BUGBUG: fixed; REMOVE ???
* Verify that the context is not bogus.
* I've seen bad contexts getting passed in when the system gets corrupted.
*/
for (dev = firstIrDevice; dev && (dev != thisDev); dev = dev->next){ }
if (!dev){
DBGERR(("Bad context in MiniportReset"));
return NDIS_STATUS_FAILURE;
}
DoClose(thisDev);
CloseDevice(thisDev);
OpenDevice(thisDev);
DoOpen(thisDev);
*AddressingReset = TRUE;
DBGOUT(("MiniportReset done."));
return result;
}
示例5: check
struct postfix *
check(struct prefix *p)
{
struct postfix *pd;
if (p->magic != MAGIC) {
DBGOUT(("memtrack: check: invalid pre-magic! 0x%x\n", p));
INT_3;
return NULL;
}
pd = (struct postfix *)(p->data + p->size);
if (pd->magic != MAGIC) {
DBGOUT(("memtrack: memtrack_free: invalid post-magic! 0x%x\n", pd));
INT_3;
return NULL;
}
if (p->size != pd->size) {
DBGOUT(("memtrack: memtracl_free: invalid post-size! 0x%x 0x%x\n", p, pd));
INT_3;
return NULL;
}
return pd;
}
示例6: mempool_fini
void
mempool_fini()
{
KIRQL irql;
ULONG total = 0;
KeAcquireSpinLock(&guard, &irql);
if (first != NULL) {
struct prefix *p;
for (p = first; p; p = p->next) {
check(p);
DBGOUT(("memtrack: memory leak detected! %s:%u (%u bytes)\n",
p->file, p->line, p->size));
total += p->size;
}
}
KeReleaseSpinLock(&guard, irql);
DBGOUT(("memtrack: Total memory leakage: %u bytes (%u blocks)\n", total, count));
if (total) INT_3;
}
示例7: set_gpio_strenth
/*------------------------------------------------------------------------------
* intialize nexell soc and board status.
*/
static void set_gpio_strenth(U32 Group, U32 BitNumber, U32 mA)
{
U32 drv1=0, drv0=0;
U32 drv1_value, drv0_value;
switch( mA )
{
case 0 : drv0 = 0; drv1 = 0; break;
case 1 : drv0 = 0; drv1 = 1; break;
case 2 : drv0 = 1; drv1 = 0; break;
case 3 : drv0 = 1; drv1 = 1; break;
default: drv0 = 0; drv1 = 0; break;
}
DBGOUT("DRV Strength : GRP : i %x Bit: %x ma :%d \n",
Group, BitNumber, mA);
drv1_value = NX_GPIO_GetDRV1(Group) & ~(1 << BitNumber);
drv0_value = NX_GPIO_GetDRV0(Group) & ~(1 << BitNumber);
if (drv1) drv1_value |= (drv1 << BitNumber);
if (drv0) drv0_value |= (drv0 << BitNumber);
DBGOUT(" Value : drv1 :%8x drv0 %8x \n ",drv1_value, drv0_value);
NX_GPIO_SetDRV0 ( Group, drv0_value );
NX_GPIO_SetDRV1 ( Group, drv1_value );
}
示例8: stop_dma_ch
static int stop_dma_ch(struct snd_pcm_substream *substream)
{
struct nx_runtime_data *rtd = substream->runtime->private_data;
struct dma_trans *tr = rtd->dma_tr;
volatile int wait = 0;
int ret = 0;
DBGOUT("%s\n", __func__);
if (! tr)
return -1;
rtd->dma_run = false;
while (soc_dma_check_run(tr) && DMA_STOP_TIMEOUT > wait) {
wait++;
udelay(1000);
}
if (wait >= DMA_STOP_TIMEOUT) {
printk(KERN_ERR "%s, dma stop wait time out %d\n", __func__, wait);
soc_dma_trans_stop(tr);
ret = -1;
}
DBGOUT("%s wait=%d\n", __func__, wait);
return ret;
}
示例9: DriverEntry
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
NTSTATUS result = STATUS_SUCCESS, stat;
NDIS_HANDLE wrapperHandle;
NDIS40_MINIPORT_CHARACTERISTICS info;
DBGOUT(("==> IRMINI_Entry()"));
NdisMInitializeWrapper( (PNDIS_HANDLE)&wrapperHandle,
DriverObject,
RegistryPath,
NULL
);
DBGOUT(("Wrapper handle is %xh", (UINT)wrapperHandle));
info.MajorNdisVersion = (UCHAR)NDIS_MAJOR_VERSION;
info.MinorNdisVersion = (UCHAR)NDIS_MINOR_VERSION;
// info.Flags = 0;
info.CheckForHangHandler = MiniportCheckForHang;
info.HaltHandler = MiniportHalt;
info.InitializeHandler = MiniportInitialize;
info.QueryInformationHandler = MiniportQueryInformation;
info.ReconfigureHandler = MiniportReconfigure;
info.ResetHandler = MiniportReset;
info.SendHandler = MiniportSend;
info.SetInformationHandler = MiniportSetInformation;
info.TransferDataHandler = MiniportTransferData;
info.HandleInterruptHandler = MiniportHandleInterrupt;
info.ISRHandler = MiniportISR;
info.DisableInterruptHandler = MiniportDisableInterrupt;
info.EnableInterruptHandler = MiniportEnableInterrupt;
/*
* New NDIS 4.0 fields
*/
info.ReturnPacketHandler = ReturnPacketHandler;
info.SendPacketsHandler = SendPacketsHandler;
info.AllocateCompleteHandler = AllocateCompleteHandler;
stat = NdisMRegisterMiniport( wrapperHandle,
(PNDIS_MINIPORT_CHARACTERISTICS)&info,
sizeof(NDIS_MINIPORT_CHARACTERISTICS));
if (stat != NDIS_STATUS_SUCCESS){
DBGERR(("NdisMRegisterMiniport failed in DriverEntry"));
result = STATUS_UNSUCCESSFUL;
goto _entryDone;
}
_entryDone:
DBGOUT(("<== IRMINI_Entry %s", (PUCHAR)((result == NDIS_STATUS_SUCCESS) ? "succeeded" : "failed")));
return result;
}
示例10: dump_register_dpc
void dump_register_dpc(int module)
{
#if (DUMP_REGISTER)
#define DBGOUT(args...) printk(args)
struct NX_DPC_RegisterSet *pREG =
(struct NX_DPC_RegisterSet*)NX_DPC_GetBaseAddress(module);
NX_DPC_SetBaseAddress(module, (void *)IO_ADDRESS(NX_DPC_GetPhysicalAddress(module)));
DBGOUT("DPC%d BASE ADDRESS: %p\n", module, pREG);
DBGOUT(" DPCCTRL0 = 0x%04x\r\n", pREG->DPCCTRL0);
#endif
}
示例11: MiniportSend
/*
*************************************************************************
* MiniportSend
*************************************************************************
*
*
* Transmits a packet through the network interface card onto the medium.
*
*
*
*/
NDIS_STATUS MiniportSend(
IN NDIS_HANDLE MiniportAdapterContext,
IN PNDIS_PACKET Packet,
IN UINT Flags
)
{
IrDevice *thisDev = CONTEXT_TO_DEV(MiniportAdapterContext);
NDIS_STATUS result;
DBGOUT(("MiniportSend(thisDev=0x%x)", (UINT)thisDev));
/*
* Put this packet at the end of our send queue.
* We use the packet's MiniportReserved field as the
* 'next' pointer.
*/
DBGPKT(("Queueing send packet 0x%x.", (UINT)Packet));
if (thisDev->firstSendPacket){
*(PNDIS_PACKET *)thisDev->lastSendPacket->MiniportReserved = Packet;
}
else {
thisDev->firstSendPacket = Packet;
}
thisDev->lastSendPacket = Packet;
*(PNDIS_PACKET *)Packet->MiniportReserved = NULL;
/*
* Try to send the first queued send packet.
*/
if (IsCommReadyForTransmit(thisDev)){
BOOLEAN isSynchronousSend, xmitSucceeded;
isSynchronousSend = (BOOLEAN)(Packet == thisDev->firstSendPacket);
xmitSucceeded = PortReadyForWrite(thisDev, isSynchronousSend);
if (isSynchronousSend){
result = xmitSucceeded ? NDIS_STATUS_SUCCESS : NDIS_STATUS_FAILURE;
}
else {
result = NDIS_STATUS_PENDING;
}
}
else {
result = NDIS_STATUS_PENDING;
}
DBGOUT(("MiniportSend returning %s", DBG_NDIS_RESULT_STR(result)));
return result;
}
示例12: DBGOUT
void SchedViz::Visit_Msg( const Semantics::Msg &message, TVTrace* trace ) {
std::string messageName = message.name();
DBGOUT("\tMessage: " << messageName << " -> ")
// Create a new schedulable in the traceViz
TVSchedulable* sched = new TVSchedulable( Message, messageName, true );
// Determine the sending task
Semantics::Transmits transmits = message.msgTransmitter();
Semantics::Task sendingTask = transmits.sendingTask();
// Determine the receiving tasks
ReceivesSet receivesSet = message.msgListeners();
// Loop through all of the scheduling info
ExecInfoSet execSet = message.info();
// Make sure there is one ( TTSchedule )
if (execSet.size() == 1 ) {
Semantics::ExecInfo execInfo = *execSet.begin();
// Get the children of various types
Semantics::Schedule schedChild = execInfo.Schedule_child();
Semantics::Duration durationChild = execInfo.Duration_child();
double duration = durationChild.exectimesecs();
// See if child is a TTSchedule
if ( Semantics::TTSchedule::meta == schedChild.type() ) {
// Cast to a TTSchedule
Semantics::TTSchedule ttSched = Semantics::TTSchedule::Cast( schedChild );
// Grab the schedule info
std::string schedule = ttSched.sched();
// Convert the string to a nice vector
std::vector< double > schedTimes = ConvertToVector( schedule );
// Now create visual blocks for each sending
std::vector< double >::iterator timesIter = schedTimes.begin();
for ( ; timesIter != schedTimes.end(); timesIter++ ) {
DBGOUT(*timesIter << " ")
// Add an instance to the traceViz
sched->AddInstance( trace, *timesIter, duration );
}
}
// ExecInfo type not supported
else {
std::cout << "*** Message: ExecInfo type not currently supported.\n";
}
}
// Debug some info
else {
std::cout << "*** Message: Not able to find appropriate ExecInfo.\n";
}
// Clean up the command output
DBGOUT(std::endl)
}
示例13: pb_add
static inline int pb_add(pb_buff_t *b, const void *buf, size_t count)
{
if((size_t)b->left < count)
PB_RETURN_ERROR(b, -1, "buf overflow");
DBGOUT("add(len=%u):", count);
// int i;
// for(i=0; i<count; i++) DBGOUT(" %02x", ((uint8_t*)buf)[i]);
DBGOUT("\n");
memcpy(b->ptr, buf, count);
b->ptr += count;
b->left -= count;
return 0;
}
示例14: OSPDaemon_queue_driver_send
static int OSPDaemon_queue_driver_send(struct OSPDaemon_output *out)
{
DBGOUT("Queue Driver send");
int err = 0;
if (0 == OSPDaemon_queue_isempty(&out->q)) {
err = sem_post(&osp_sync);
if (-1 == err) {
DBGOUT("Sem post failed error - %s", strerror(errno));
return err;
}
}
return 0;
}
示例15: group_path
SafeListViewGroup *SafeListView::addGroup(const QString &group_name)
{
// if the group's name is empty,
if(group_name.isEmpty())
return NULL;
// if name has zero seperators or
else {
QString group_path(group_name);
if(group_path.at(0) == '/') {
for(int i = 0; i < group_path.length(); i++) {
if(group_path.at(i) != '/') {
group_path.remove(0, i);
break;
}
}
DBGOUT("Group path: " << group_path);
}
SafeListViewGroup *group = findGroup(group_path);
if(group != NULL) {
DBGOUT("Found group " << group_path);
return group;
}
DBGOUT("adding group: " << group_path);
// FIXME: doesn't divide the group's name right if GroupSeperator
// is escaped
QString this_group = thisGroup(group_path);
QString parent_group = parentGroup(group_path);
DBGOUT("this_group = " << this_group);
if(parent_group.isEmpty()) {
return new SafeListViewGroup(this, this_group);
}
else {
DBGOUT("parent = " << parent_group);
// search for the parent
// if it doesn't exist add it
SafeListViewGroup *parent = addGroup(parent_group);
parent->setOpen(true);
return new SafeListViewGroup(parent, this_group);
}
}
return NULL;
}