expanding a structure in debugger with pointer

Cross-platform IDE for the rapid development of applications for the embedded world, available on Windows, Linux, and macOS.
Post Reply
Author
Message
kamputty
Posts: 31
Joined: 22 Aug 2012 21:34

expanding a structure in debugger with pointer

#1 Post by kamputty » 05 Feb 2023 09:54

Hi all,

PIC32 AI compiler

Given the following code snipped, I want to "see" the complete structure the pointer is pointing too, not just the memory location in the debugger.

Code: Select all

struct myStruct
{
    int x;
    int y;
};

struct myStruct struct1;
struct myStruct *pStruct1;

int main(void)
{
    struct1.x = 1;
    struct1.y = 2;
    pStruct1 = &struct1;   // <---- how do I see this pointer expanded to the structure?

    while (1)
    {
    }

    return 0;
}
In the debugger, I see the following under the "expressions" windows (sorry could not insert image)
struct1 --> can expand into complete structure
pStruct1 --> 0xa0 00 02 00 (address only)
pStruct1->x shows the value of x
What I need is to expand the "pStruct1" pointer to show all the values in the struct...

~Kam

Smart_Aleck
Posts: 16
Joined: 07 Feb 2023 20:45

Re: expanding a structure in debugger with pointer

#2 Post by Smart_Aleck » 07 Feb 2023 20:49

did you try something like &pStruct1 ?

frank.malik
Posts: 96
Joined: 09 Apr 2021 20:37

Re: expanding a structure in debugger with pointer

#3 Post by frank.malik » 11 Feb 2023 10:28

Hi,

for me *pStruct1 works under Necto Studio 2.5.0
Attachments
Untitled.png
Untitled.png (3.69 KiB) Viewed 492 times
Kind regards
Frank

Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2

Post Reply

Return to “IDE”