Jump to content
joli

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

 

ty,

br

////////////////////////////////////////////////////////////////////////////////
// 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
    struct
    {
        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]
    }sbuf;
}UBUF;

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

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
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.

Loading...

×