Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for anonymous fields #3084

Open
ttreyer opened this issue Mar 21, 2024 · 0 comments
Open

Missing support for anonymous fields #3084

ttreyer opened this issue Mar 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ttreyer
Copy link
Contributor

ttreyer commented Mar 21, 2024

A structure can have multiple nested anonymous fields, as demonstrated by struct Foo2 in "tests/data/data_source.c":

struct Foo2 {
  int a;
  union {
    struct Foo1 f;
    struct {
      char g;
    };
  };
};

However, bpftrace reports only two fields being in struct Foo2 and there is no way for the user to access the content of the anonymous records.
We should enable the following syntax for the user to access these fields: foo2->g.

What reproduces the bug? Provide code if possible.

Remove the GTEST_SKIP() at the top of the test "field_analyser_dwarf.parse_struct_anonymous_fields".

@ttreyer ttreyer added the bug Something isn't working label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant