[lldb-dev] [Bug 15401] New: static members of structs and classes have incorrect visibility

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Feb 28 12:58:42 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15401

            Bug ID: 15401
           Summary: static members of structs and classes have incorrect
                    visibility
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: ashok.thirumurthi at intel.com
    Classification: Unclassified

Expression evaluation using static members of structs/classes such as:
  struct my_struct {
    static int my_static;
  };
  int my_struct::my_static = 2;
  my_struct test;

  expression my_struct::my_static
  expression test.my_static

results in the error 
  'no member named 'my_static' in 'my_struct'"

Reproducer:
  ./dotest.py -A x86_64 -v lang/cpp/static_members

As illustrated by the above test, an attempt to 'print my_static' (outside of
the scope of my_struct) succeeds even though it should be visible only as
my_struct::my_static.

As illustrated by the above test, the struct layout performed during expression
evaluation is 4 bytes (short + char + default alignment) rather than 24 bytes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130228/faccfa3e/attachment.html>


More information about the lldb-dev mailing list