Topic
  • 7 replies
  • Latest Post - ‏2012-03-13T13:54:16Z by SystemAdmin
JoePluta
JoePluta
4 Posts

Pinned topic Are there defined limits to nested data structures in the debugger?

‏2012-02-27T20:00:31Z |
I've run across a few strange behaviors when attempting to view the contents of nested data structures in the debugger. Unfortunately the most annoying one is the hardest to nail down; it seems to happen when I have the same name at different levels in my structure with different attributes. But I can't definitely describe the probem, so instead let me explain one that I do have: I have an array of data structures named Component, and component has an array of data structures named Operation. The following cannot be shown:

Component(x).Operation(y)

Hovering over the expression causes a popup saying "Component(x).Operation" too complex. If I mark it and select Monitor Expression, I get an error:

CRRDG3137 Failed to monitor given expression.
CRRDG3002E Connection with the debug engine was lost

This error actually terminates the debug job I had running.
Updated on 2012-03-13T13:54:16Z at 2012-03-13T13:54:16Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    225 Posts

    Re: Are there defined limits to nested data structures in the debugger?

    ‏2012-02-28T21:43:51Z  
    There are no limits on nested data structures. I created a simple program to test the scenario described, and I'm able to successfully monitor Component[x].Operation[y]. Here is my program:

    int main() {
    struct {
    struct {
    int mem;
    } Operation10;
    } Component10;

    for (int i=0; i<10; i++) {
    for (int j=0; j<10; j++) {
    Component[i].Operation[j].mem = i*10 + j;
    }
    }

    return Component[4].Operation[6].mem;
    }

    Is this what you are trying to do?
  • SystemAdmin
    SystemAdmin
    225 Posts

    Re: Are there defined limits to nested data structures in the debugger?

    ‏2012-02-28T21:58:25Z  
    The code wasn't formatted correctly in my previous post. Here it is again.

    
    
    
    int main() 
    { struct 
    { struct 
    { 
    
    int mem; 
    } Operation[10]; 
    } Component[10];   
    
    for (
    
    int i=0; i<10; i++) 
    { 
    
    for (
    
    int j=0; j<10; j++) 
    { Component[i].Operation[j].mem = i*10 + j; 
    } 
    }   
    
    return Component[4].Operation[6].mem; 
    }
    
  • JoePluta
    JoePluta
    4 Posts

    Re: Are there defined limits to nested data structures in the debugger?

    ‏2012-02-29T04:25:44Z  
    The code wasn't formatted correctly in my previous post. Here it is again.

    <pre class="jive-pre"> int main() { struct { struct { int mem; } Operation[10]; } Component[10]; for ( int i=0; i<10; i++) { for ( int j=0; j<10; j++) { Component[i].Operation[j].mem = i*10 + j; } } return Component[4].Operation[6].mem; } </pre>
    Sorry, Alan, I have to remember to be more specific. I was using the RPG tooling; it doesn't seem to do well with nested data structures.
  • SystemAdmin
    SystemAdmin
    225 Posts

    Re: Are there defined limits to nested data structures in the debugger?

    ‏2012-02-29T15:51:06Z  
    Hi Joe,
    Could you please open a PMR so that we can look more into it? Thanks.
  • JoePluta
    JoePluta
    4 Posts

    Re: Are there defined limits to nested data structures in the debugger?

    ‏2012-02-29T16:35:51Z  
    Hi Joe,
    Could you please open a PMR so that we can look more into it? Thanks.
    I will as soon as I can. In order to open a PMR I'll have to get a test case set up. I have at least one other problem I'd like to address as well, so maybe I can create a test scenario that will address all of these.

    Joe
  • SystemAdmin
    SystemAdmin
    225 Posts

    Re: Are there defined limits to nested data structures in the debugger?

    ‏2012-03-07T19:56:46Z  
    • JoePluta
    • ‏2012-02-29T16:35:51Z
    I will as soon as I can. In order to open a PMR I'll have to get a test case set up. I have at least one other problem I'd like to address as well, so maybe I can create a test scenario that will address all of these.

    Joe
    I get the same message CRRDG3002E with the Debug Tool plugin for RD System Z when I try to monitor a large COBOL structure.
  • SystemAdmin
    SystemAdmin
    225 Posts

    Re: Are there defined limits to nested data structures in the debugger?

    ‏2012-03-13T13:54:16Z  
    • JoePluta
    • ‏2012-02-29T16:35:51Z
    I will as soon as I can. In order to open a PMR I'll have to get a test case set up. I have at least one other problem I'd like to address as well, so maybe I can create a test scenario that will address all of these.

    Joe
    When you submit the PMR please append an engine trace.
    The engine trace must be enabled BEFORE a debug session is started. Once enabled it will capture every debug session until it is turned off.
    You can enable the trace by going to Window->Preferences->Run/Debug->Compiled Debug
    check "Trace engine connection". I recommend that you give the trace file name a meaningful name (helps to find it too)
    When tracing is enabled each debug session will generate a trace file. When the maximum of 100 trace files is reached each new debug session will overwrite the oldest file.