[Lldb-commits] [PATCH] D124409: Filter non-external static members from SBType::GetFieldAtIndex.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 27 05:32:36 PDT 2022

labath added a comment.

For future reference, it's better to generate a full diff when uploading a patch manually. Here <https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface> are some ways to do that.

Apart from the inline comment this patch seems fine. We should also add a test case with the non-external static member. I think the test case could be as simple as declaring a global variable of the given type, printing it, and making sure the output is correct. You can use one of the assembly tests in `test/Shell/SymbolFile/DWARF/x86/` for inspiration. Or you can wait until I get a bit of time to create one...

Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2672
   // Handle static members
-  if (attrs.is_external && attrs.member_byte_offset == UINT32_MAX) {
+  if (attrs.member_byte_offset == UINT32_MAX) {
     Type *var_type = die.ResolveTypeUID(attrs.encoding_form.Reference());
Have you run the test suite? I'd guess that you'd need to check for DW_AT_data_bit_offset here as well.

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list