Open Source Development Tutorials | Newsletter Signup | About Us
Search  

Go Back   Open Source Tutorials Forum > Programming Languages > C and C++ Programming
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-25-2007, 06:35 AM
jennifer123 jennifer123 is offline
Junior Member
 
Join Date: Jun 2007
Posts: 1 jennifer123 is on a distinguished road
Default #if defined INTEL_W32

Hello every one, I am using visual C++ tool to debug the following code. However, during a line by line debug, the execution flow DOES NOT move to (#if defined INTEL_W32 ). I am using visual C++ on windows XP .
Can any one kindly tell me what is the MEANING of

#if defined INTEL_W32
===============================================
Debugging following program:

#if defined INTEL_W32

static Boolean fFirstTime = FALSE;
UInt32 ulLinearAddress;
UInt32 offset;

// Always register the atexit routine at least once, so any allocated
// resources are guaranteed to be released and freed. The function
// halpFreeLinearAddress is fully reentrant, so it can be called
// multiple times, in any order, without causing any harm.
if (!fFirstTime)
{ fFirstTime = TRUE;
printf("fFirstTime = %d \n",fFirstTime); // added
atexit(halpFreeLinearAddress);
}


// Use the configured register address to retrieve the linear address.
// NOTE: for PCI the register address should be zero, causing the VxD
// to locate the S1D13A05 in PCI address space.

if (HalInfo.dwRegisterAddress > HalInfo.dwMemoryAddress)
{
gnHalErrCode = halpGetLinearAddress(HalInfo.dwMemoryAddress, &ulLinearAddress);



if (gnHalErrCode != ERR_NONE)
return FALSE;

offset = HalInfo.dwRegisterAddress - HalInfo.dwMemoryAddress;

if (offset == 0)
offset = 0x200000;

gpHalMemAddr = (pvUInt32) ulLinearAddress;
gpHalRegAddr = (pvUInt32)(ulLinearAddress + offset);


}
else
{
gnHalErrCode = halpGetLinearAddress(HalInfo.dwRegisterAddress, &ulLinearAddress);

if (gnHalErrCode != ERR_NONE)
return FALSE;

offset = HalInfo.dwMemoryAddress - HalInfo.dwRegisterAddress;

if (offset == 0)
offset = 0x200000;

gpHalRegAddr = (pvUInt32) ulLinearAddress;
gpHalMemAddr = (pvUInt32)(ulLinearAddress + offset);

printf ("<<<<<<<<<gpHalMemAddr, %d \n",gpHalMemAddr); // added
printf ("<<<<<<<<<gpHalRegAddr, %d \n",gpHalRegAddr); //added


}

if (pReg)
*pReg = (UInt32) gpHalRegAddr;

if (pMem)
*pMem = (UInt32) gpHalMemAddr;
#else

// ********DEBUGGING WILL CONTINUE FROM HERE ******

gpHalRegAddr = (pvUInt32) HalInfo.dwRegisterAddress; gpHalMemAddr = (pvUInt32) HalInfo.dwMemoryAddress;

if (pReg)
*pReg = HalInfo.dwRegisterAddress;


if (pMem)
*pMem = HalInfo.dwMemoryAddress;




#endif

return TRUE;

}
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 07:10 AM.


Powered by: vBulletin Version 3.0.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright 2004 - 2006 GrindingGears.com. All Rights Reserved.