ok got the array walking working with flat and multidimensional arrays. dumping will work to any level deep. Method I used was double click on lower variable list to look up top level array object elements by name. they are dumped to separate window. If any of those elements are arrays, then you double click on those and it will look up the array element by pointer to dump its contents.
couple useful code snips
void __stdcall dbg_EnumAryVarsByPointer(pDebuggerObject pDO, VARIABLE v)
{
#pragma EXPORT
VARIABLE v2=NULL;
int low, high, i;
unsigned long sz;
char cBuffer[2050];
char buf[1025];
if(v==NULL) return;
if(TYPE(v) != VTYPE_ARRAY) return;
low = ARRAYLOW(v);
high = ARRAYHIGH(v);
for(i = low; i <= high; i++){
v2 = v->Value.aValue[i-low]; //even if lbound(v) = 3 first element is at .aValue[0]
if(v2 != NULL){
sz = 1024;
SPrintVariable(pDO, v2, buf, &sz);
sprintf(cBuffer,"Array-Variable:%d:%d:%s", i, TYPE(v2), buf);
vbStdOut(cb_debugger, cBuffer, strlen(cBuffer));
}
}
}
void __stdcall dbg_EnumCallStack(pDebuggerObject pDO)
{
#pragma EXPORT
pDebugCallStack_t p;
pDebugCallStack_t np;
pUserFunction_t uf;
char buf[1024];
long i;
if( pDO == NULL )return;
sprintf(buf, "Call-Stack:%d:%s", LineNumberForNode(pDO,pDO->lPC), "CurrentLine");
vbStdOut(cb_debugger,buf,strlen(buf));
if( pDO->StackListPointer == NULL )return;
p = pDO->StackListPointer;
if(p->pUF && p->pUF->pszFunctionName ){
sprintf(buf, "Call-Stack:%d:%s", LineNumberForNode(pDO,p->Node), p->pUF->pszFunctionName);
}else{
sprintf(buf, "Call-Stack:%d:Unknown", LineNumberForNode(pDO,p->Node) );
}
vbStdOut(cb_debugger,buf,strlen(buf));
for(i=0; i < pDO->CallStackDepth; i++){
if(p->up == NULL) return;
p = p->up;
if(p->pUF && p->pUF->pszFunctionName ){
sprintf(buf, "Call-Stack:%d:%s", LineNumberForNode(pDO,p->Node) , p->pUF->pszFunctionName);
}else{
sprintf(buf, "Call-Stack:%d:Unknown", LineNumberForNode(pDO,p->Node));
}
vbStdOut(cb_debugger,buf,strlen(buf));
}
return;
}