https://bugs.kde.org/show_bug.cgi?id=395438

            Bug ID: 395438
           Summary: Child indicator vanishes in "Variables" tool view when
                    pointer changes value
           Product: kdevelop
           Version: 5.2.3
          Platform: Gentoo Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: CPP Debugger
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: alex.mur...@gmx.ch
                CC: niko.s...@gmail.com
  Target Milestone: ---

Created attachment 113352
  --> https://bugs.kde.org/attachment.cgi?id=113352&action=edit
Steps to reproduce

Overview
--------
Whenever pointers inside structures change while stepping through code, the
child indicators disappear, making it impossible to expand the structure to
inspect its values. The only way I know of getting the child indicators back is
to click somewhere in the stack view and then select the stack frame I was at
again. this seems to "reload" the values in the variables view.

Steps to Reproduce
------------------

1) Create a new project with the following test code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct foo_t
{
    int x, y, z;
};

struct bar_t
{
    struct foo_t* foo1;
    struct foo_t* foo2;
};

struct foo_t* create_foo(void)
{
    struct foo_t* foo = malloc(sizeof *foo);
    memset(foo, 0, sizeof *foo);
    return foo;
}

struct bar_t* create_bar(void)
{
    struct bar_t* bar = malloc(sizeof *bar);
    bar->foo1 = create_foo();
    bar->foo2 = create_foo();
    return bar;
}

int main()
{
    struct bar_t* bar = create_bar();
    printf("%d,%d,%d\n", bar->foo1->x, bar->foo1->y, bar->foo1->z);
    return 0;
}

2) Set a breakpoint on line 33: struct bar_t* bar = create_bar();
3) Start debugging (F9)
4) Once the breakpoint is reached, open the "Variables" view and expand the
"bar" variable but keep the "foo1" and "foo2" variables collapsed.
5) Step over (F10) and watch what happens to "foo1" and "foo2"

Actual Results
--------------
The child indicators on "foo1" and "foo2" will disappear. You can no longer
inspect their x, y, z values.

Expected Results
----------------
The child indicators should stay there so I can view the fields in "foo1" and
"foo2".

Build Date and Platform
-----------------------
I'm using dev-util/kdevelop-5.2.3 from Gentoo's package manager.

4.14.15-gentoo #2 SMP Thu May 17 23:46:53 CEST 2018 x86_64 AMD Ryzen
Threadripper 1950X 16-Core Processor AuthenticAMD GNU/Linux

Additional Information
----------------------
I have attached screenshots.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to