version 1.2.2.6, 2009/07/28 08:31:36
|
version 1.2.2.7, 2009/07/28 15:08:09
|
|
|
#include <Pegasus/General/SetFileDescriptorToEBCDICEncoding.h> | #include <Pegasus/General/SetFileDescriptorToEBCDICEncoding.h> |
#endif | #endif |
| |
|
|
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
| |
#define SCMB_INITIAL_MEMORY_CHUNK_SIZE 4096 | #define SCMB_INITIAL_MEMORY_CHUNK_SIZE 4096 |
| |
|
#define DUMPSTR(x) ((x) == NULL ? "" : (x)) |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
_filename.append("/"); | _filename.append("/"); |
_filename.append(filename); | _filename.append(filename); |
| |
_out = fopen((const char*)_filename.getCString(),"a+"); |
_out = fopen((const char*)_filename.getCString(),"w+"); |
| |
_fileOpen = true; | _fileOpen = true; |
| |
|
|
fprintf(_out,"\nheader.magic=%08X",insthdr->header.magic); | fprintf(_out,"\nheader.magic=%08X",insthdr->header.magic); |
// Total size of the instance memory block( # bytes ) | // Total size of the instance memory block( # bytes ) |
fprintf(_out,"\nheader.totalSize=%llu",insthdr->header.totalSize); | fprintf(_out,"\nheader.totalSize=%llu",insthdr->header.totalSize); |
// The # of bytes free |
// The reference counter for this c++ class |
fprintf(_out,"\nheader.freeBytes=%llu",insthdr->header.freeBytes); |
|
// Index to the start of the free space in this insance |
|
fprintf(_out,"\nheader.StartOfFreeSpace=%llu", |
|
insthdr->header.startOfFreeSpace); |
|
// The reference counter for this class |
|
fprintf(_out,"\nrefCount=%i",insthdr->refCount.get()); | fprintf(_out,"\nrefCount=%i",insthdr->refCount.get()); |
fprintf(_out,"\ntheClass: %p",insthdr->theClass); | fprintf(_out,"\ntheClass: %p",insthdr->theClass); |
fprintf(_out,"\n\nThe Flags:"); | fprintf(_out,"\n\nThe Flags:"); |
|
|
fprintf(_out,"\n isFiltered: %s", | fprintf(_out,"\n isFiltered: %s", |
(insthdr->flags.isFiltered ? "True" : "False")); | (insthdr->flags.isFiltered ? "True" : "False")); |
fprintf(_out,"\n\nhostName: \'%s\'", | fprintf(_out,"\n\nhostName: \'%s\'", |
_getCharString(insthdr->hostName,instbase)); |
DUMPSTR(_getCharString(insthdr->hostName,instbase))); |
| |
dumpSCMOInstanceKeyBindings(testInst); | dumpSCMOInstanceKeyBindings(testInst); |
| |
|
|
SCMBDataPtr* ptr = | SCMBDataPtr* ptr = |
(SCMBDataPtr*)_resolveDataPtr(insthdr->keyBindingArray,instbase); | (SCMBDataPtr*)_resolveDataPtr(insthdr->keyBindingArray,instbase); |
| |
fprintf(_out,"\n\nInstacne Key Bindings :"); |
fprintf(_out,"\n\nInstance Key Bindings :"); |
fprintf(_out,"\n======================="); | fprintf(_out,"\n======================="); |
fprintf(_out,"\n\nNumber of Key Bindings : %u",insthdr->numberKeyBindings); | fprintf(_out,"\n\nNumber of Key Bindings : %u",insthdr->numberKeyBindings); |
| |
for (Uint32 i = 0; i < insthdr->numberKeyBindings; i++) | for (Uint32 i = 0; i < insthdr->numberKeyBindings; i++) |
{ | { |
fprintf(_out,"\n\nNo %u : '%s'",i,_getCharString(ptr[i],instbase)); |
fprintf(_out,"\n\nNo %u : '%s'",i, |
|
DUMPSTR(_getCharString(ptr[i],instbase))); |
} | } |
fprintf(_out,"\n"); | fprintf(_out,"\n"); |
} | } |
|
|
fprintf(_out,"\nheader.magic=%08X",clshdr->header.magic); | fprintf(_out,"\nheader.magic=%08X",clshdr->header.magic); |
// Total size of the instance memory block( # bytes ) | // Total size of the instance memory block( # bytes ) |
fprintf(_out,"\nheader.totalSize=%llu",clshdr->header.totalSize); | fprintf(_out,"\nheader.totalSize=%llu",clshdr->header.totalSize); |
// The # of bytes free |
// The reference counter for this c++ class |
fprintf(_out,"\nheader.freeBytes=%llu",clshdr->header.freeBytes); |
|
// Index to the start of the free space in this insance |
|
fprintf(_out,"\nheader.StartOfFreeSpace=%llu", |
|
clshdr->header.startOfFreeSpace); |
|
// The reference counter for this class |
|
fprintf(_out,"\nrefCount=%i",clshdr->refCount.get()); | fprintf(_out,"\nrefCount=%i",clshdr->refCount.get()); |
| |
fprintf(_out,"\n\nsuperClassName: \'%s\'", | fprintf(_out,"\n\nsuperClassName: \'%s\'", |
_getCharString(clshdr->superClassName,clsbase)); |
DUMPSTR(_getCharString(clshdr->superClassName,clsbase))); |
fprintf(_out,"\nnameSpace: \'%s\'", | fprintf(_out,"\nnameSpace: \'%s\'", |
_getCharString(clshdr->nameSpace,clsbase)); |
DUMPSTR(_getCharString(clshdr->nameSpace,clsbase))); |
fprintf(_out,"\nclassName: \'%s\'", | fprintf(_out,"\nclassName: \'%s\'", |
_getCharString(clshdr->className,clsbase)); |
DUMPSTR(_getCharString(clshdr->className,clsbase))); |
fprintf(_out,"\n\nTheClass qualfiers:"); | fprintf(_out,"\n\nTheClass qualfiers:"); |
_dumpQualifierArray( | _dumpQualifierArray( |
clshdr->qualifierArray.start, | clshdr->qualifierArray.start, |
|
|
| |
fprintf(_out,"\n\nHex dump of a SCMBClass:"); | fprintf(_out,"\n\nHex dump of a SCMBClass:"); |
fprintf(_out,"\n========================"); | fprintf(_out,"\n========================"); |
fprintf(_out,"\n\n Size of SCMBClass: %llu",clshdr->header.totalSize); |
fprintf(_out,"\n\n Size of SCMBClass: %llu\n\n",clshdr->header.totalSize); |
fprintf(_out,"\n cls.base = %p\n\n",clsbase); |
|
| |
_hexDump(clsbase,clshdr->header.totalSize); | _hexDump(clsbase,clshdr->header.totalSize); |
| |
|
|
} | } |
| |
fprintf(_out,"\nKey Property name: %s", | fprintf(_out,"\nKey Property name: %s", |
_getCharString(nodeArray[i].name,clsbase)); |
DUMPSTR(_getCharString(nodeArray[i].name,clsbase))); |
| |
fprintf(_out,"\nHash Tag %3u Hash Index %3u", | fprintf(_out,"\nHash Tag %3u Hash Index %3u", |
nodeArray[i].nameHashTag, | nodeArray[i].nameHashTag, |
|
|
const SCMBClassProperty& prop, | const SCMBClassProperty& prop, |
char* clsbase) const | char* clsbase) const |
{ | { |
fprintf(_out,"\nProperty name: %s",_getCharString(prop.name,clsbase)); |
fprintf(_out,"\nProperty name: %s", |
|
DUMPSTR(_getCharString(prop.name,clsbase))); |
| |
fprintf(_out,"\nHash Tag %3u Hash Index %3u", | fprintf(_out,"\nHash Tag %3u Hash Index %3u", |
prop.nameHashTag, | prop.nameHashTag, |
|
|
); | ); |
| |
fprintf(_out,"\nOrigin class name: %s", | fprintf(_out,"\nOrigin class name: %s", |
_getCharString(prop.originClassName,clsbase)); |
DUMPSTR(_getCharString(prop.originClassName,clsbase))); |
fprintf(_out,"\nReference class name: %s", | fprintf(_out,"\nReference class name: %s", |
_getCharString(prop.refClassName,clsbase)); |
DUMPSTR(_getCharString(prop.refClassName,clsbase))); |
| |
printSCMOValue(prop.defaultValue,clsbase); | printSCMOValue(prop.defaultValue,clsbase); |
| |
|
|
if(theQualifier.name == QUALNAME_USERDEFINED) | if(theQualifier.name == QUALNAME_USERDEFINED) |
{ | { |
fprintf(_out,"\n\nQualifier user defined name: \'%s\'", | fprintf(_out,"\n\nQualifier user defined name: \'%s\'", |
_getCharString(theQualifier.userDefName,clsbase)); |
DUMPSTR(_getCharString(theQualifier.userDefName,clsbase))); |
} | } |
else | else |
{ | { |
fprintf(_out,"\n\nQualifier DMTF defined name: \'%s\'", | fprintf(_out,"\n\nQualifier DMTF defined name: \'%s\'", |
_qualifierNameStrLit[theQualifier.name].str); |
DUMPSTR(_qualifierNameStrLit[theQualifier.name].str)); |
} | } |
| |
fprintf(_out,"\nPropagated : %s", | fprintf(_out,"\nPropagated : %s", |
|
|
void SCMODump::_hexDump(char* buffer,int length) const | void SCMODump::_hexDump(char* buffer,int length) const |
{ | { |
| |
char printLine[3][80]; |
unsigned char printLine[3][80]; |
int p; | int p; |
int len; | int len; |
char item; |
unsigned char item; |
| |
for (int i = 0; i < length;i=i+1) | for (int i = 0; i < length;i=i+1) |
{ | { |
|
|
fprintf(_out,"\n"); | fprintf(_out,"\n"); |
} | } |
| |
item = buffer[i]; |
item = (unsigned char)buffer[i]; |
| |
if (item < 32 || item > 125 ) | if (item < 32 || item > 125 ) |
{ | { |