Jump to content

Watch Window Behaviour (Simulation Mode)

Recommended Posts

Would be nice if in a future sourceboost version, if your team give to the watch window the ability to show struct members values as it happens with normal variables, instead of showing "error".


Well.. i know we can see it through the memory bar, but when we have large apps with a lots of data structures with changing data between them, the debugging process, becomes painfull.


It happens in all versions of © sourceboost as you can see by simulating the snipet below




// This is a small example with minimal settings just for demo purposes
// It is intended to write struct data items to see watch window behaviour

#include <system.h>

// F U S E S   C O N F I G U R A T I O N

#pragma config OSC = INTOSCPLL      // Internal osc PLL can be enable/disable
#pragma config CP0 = OFF            // Program memory unprotected
#pragma config FCMEN = ON           // Enable osc monitor
#pragma config WDTEN = OFF          // Watchdog disabled, could be enable by soft
#pragma config WDTPS = 512          // 1:512
#pragma config XINST = OFF          // Disable extended instruction set
#pragma config IOL1WAY = OFF        // works either way

// T Y P E D E F   U N I O N
#define BUFFER_SIZE     4                   // buffer size

typedef union
    unsigned char ubuffer[BUFFER_SIZE];     // array
        unsigned char sitem1;               // same as ubuffer[0]
        unsigned char sitem2;               // same as ubuffer[1]
        unsigned char sitem3;               // same as ubuffer[1]
        unsigned char sitem4;               // same as ubuffer[1]

UBUF    ubuf;

#define buffer  ubuf.ubuffer
#define item1   ubuf.sbuf.sitem1
#define item2   ubuf.sbuf.sitem2
#define item3   ubuf.sbuf.sitem3
#define item4   ubuf.sbuf.sitem4

// M A I N

void main( void )
    item1 = 10;     // << moving it to watch window, it shows error, not val
    item2 = 20;     // << moving it to watch window, it shows error, not val
    item3 = 30;     // << moving it to watch window, it shows error, not val
    item4 = 40;     // << moving it to watch window, it shows error, not val
    while( 1 )
Edited by joli
Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...