Derived class members are outofscope when debugging C++

  • Hello,


    We are having a hard time debugging our code base which is primarily C++ based. Class members in derived classes are shown as "outofscope" in some cases. In the following example, a.var1, a.var2, b.var1 and b.var2 are "outofscope". If A class is not instatiated, b.var1 and b.var2 are visible as expected which is strange.


    The issue is not present if the code is compiled with Segger Embedded Studio


    Stm32F439
    Ozone 3.38f
    -O0
    GCC toolchain 12.2 (same issue on 14.2)
    https://developer.arm.com/-/media/Files/…9F9E16D17A85311

    Related issue:

    [ABANDONED] Problem with C++ and

  • Hello,

    Thank you for your inquiry and providing the reproducer.
    We have reproduced the issue in-house and will of course take a closer look.

    Kind regards,
    SebastianB

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!