summaryrefslogtreecommitdiffstats
path: root/src/dviewhelper
diff options
context:
space:
mode:
authorsagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8>2012-03-03 08:15:49 (GMT)
committersagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8>2012-03-03 08:15:49 (GMT)
commit6f47f877b7b29c6fe8169a5dd7bced5fd68e9b49 (patch)
tree9858da29076fa52e2fda1f9ab8ad16d86a40a047 /src/dviewhelper
parent839d6ecd6402d7e0f29ef02c4a25ef6904c23f38 (diff)
downloadcv2pdb-6f47f877b7b29c6fe8169a5dd7bced5fd68e9b49.zip
cv2pdb-6f47f877b7b29c6fe8169a5dd7bced5fd68e9b49.tar.gz
cv2pdb-6f47f877b7b29c6fe8169a5dd7bced5fd68e9b49.tar.bz2
tabify
Diffstat (limited to 'src/dviewhelper')
-rw-r--r--src/dviewhelper/dviewhelper.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/dviewhelper/dviewhelper.cpp b/src/dviewhelper/dviewhelper.cpp
index c9d16af..e2b295a 100644
--- a/src/dviewhelper/dviewhelper.cpp
+++ b/src/dviewhelper/dviewhelper.cpp
@@ -34,23 +34,23 @@ struct DEBUGHELPER
// possible processor types
typedef enum _MPT {
- mptix86 = 0, // Intel X86
- mptia64 = 1, // Intel Merced
- mptamd64 = 2, // AMD64
- mptUnknown = 3 // Unknown
+ mptix86 = 0, // Intel X86
+ mptia64 = 1, // Intel Merced
+ mptamd64 = 2, // AMD64
+ mptUnknown = 3 // Unknown
} MPT;
HRESULT readMem(DEBUGHELPER *pHelper, DWORDLONG qwAddr, DWORD nWant, VOID* pWhere, DWORD *nGot)
{
- if(pHelper->dwVersion < 0x20000)
- return pHelper->ReadDebuggeeMemory(pHelper, (DWORD)qwAddr, nWant, pWhere, nGot);
- return pHelper->ReadDebuggeeMemoryEx(pHelper, qwAddr, nWant, pWhere, nGot);
+ if(pHelper->dwVersion < 0x20000)
+ return pHelper->ReadDebuggeeMemory(pHelper, (DWORD)qwAddr, nWant, pWhere, nGot);
+ return pHelper->ReadDebuggeeMemoryEx(pHelper, qwAddr, nWant, pWhere, nGot);
}
struct DString
{
- DWORD length;
- DWORD data;
+ DWORD length;
+ DWORD data;
};
///////////////////////////////////////////////////////////////////////////////
@@ -58,34 +58,34 @@ struct DString
HRESULT WINAPI StringView(DWORD dwAddress, DEBUGHELPER *pHelper, int nBase, BOOL bUniStrings,
char *pResult, size_t max, DWORD sizePerChar)
{
- DWORDLONG qwAddress = dwAddress;
- if(pHelper->dwVersion >= 0x20000)
- qwAddress = pHelper->GetRealAddress(pHelper);
+ DWORDLONG qwAddress = dwAddress;
+ if(pHelper->dwVersion >= 0x20000)
+ qwAddress = pHelper->GetRealAddress(pHelper);
- int proc = 0;
- if(pHelper->dwVersion >= 0x20000)
- proc = pHelper->GetProcessorType(pHelper);
- int sizeOfPtr = proc == 0 ? 4 : 8;
+ int proc = 0;
+ if(pHelper->dwVersion >= 0x20000)
+ proc = pHelper->GetProcessorType(pHelper);
+ int sizeOfPtr = proc == 0 ? 4 : 8;
// Get the string struct
- char strdata[16];
+ char strdata[16];
DWORD read;
if (readMem(pHelper, qwAddress, 2*sizeOfPtr, strdata, &read) != S_OK)
{
- strncpy(pResult,"Cannot access struct", max);
- return S_OK;
+ strncpy(pResult,"Cannot access struct", max);
+ return S_OK;
+ }
+ DWORDLONG length, data;
+ if(sizeOfPtr > 4)
+ {
+ length = *(DWORDLONG*) strdata;
+ data = *(DWORDLONG*) (strdata + sizeOfPtr);
+ }
+ else
+ {
+ length = *(DWORD*) strdata;
+ data = *(DWORD*) (strdata + sizeOfPtr);
}
- DWORDLONG length, data;
- if(sizeOfPtr > 4)
- {
- length = *(DWORDLONG*) strdata;
- data = *(DWORDLONG*) (strdata + sizeOfPtr);
- }
- else
- {
- length = *(DWORD*) strdata;
- data = *(DWORD*) (strdata + sizeOfPtr);
- }
if (length == 0)
{
strncpy(pResult,"\"\"", max);