[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 10 16:56:52 PST 2024


dyung wrote:

@adrian-prantl at least one bot still seems to be failing (more missing explicit type conversions?):
https://lab.llvm.org/buildbot/#/builders/181/builds/10128
```
FAILED: tools/lldb/source/DataFormatters/CMakeFiles/lldbDataFormatters.dir/FormatterBytecode.cpp.o 
/opt/ccache/bin/g++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/source/DataFormatters -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include -I/usr/include/python3.8 -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/source -isystem /usr/include/libxml2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/lldb/source/DataFormatters/CMakeFiles/lldbDataFormatters.dir/FormatterBytecode.cpp.o -MF tools/lldb/source/DataFormatters/CMakeFiles/lldbDataFormatters.dir/FormatterBytecode.cpp.o.d -o tools/lldb/source/DataFormatters/CMakeFiles/lldbDataFormatters.dir/FormatterBytecode.cpp.o -c /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters/FormatterBytecode.cpp
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters/FormatterBytecode.cpp: In function ‘llvm::Error lldb_private::FormatterBytecode::Interpret(std::vector<llvm::StringRef>&, lldb_private::FormatterBytecode::DataStack&, lldb_private::FormatterBytecode::Selectors)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters/FormatterBytecode.cpp:342:43: error: cannot convert ‘long long unsigned int’ to ‘lldb_private::FormatterBytecode::DataStackElement’ {aka ‘std::variant<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long unsigned int, long int, std::shared_ptr<lldb_private::ValueObject>, lldb_private::CompilerType, lldb_private::FormatterBytecode::Selectors>’}
  342 |       data.Push(data.Pop<ValueObjectSP>() ? 0ULL : 1ULL);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      |                                           |
      |                                           long long unsigned int
In file included from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters/FormatterBytecode.cpp:9:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters/FormatterBytecode.h:44:30: note:   initializing argument 1 of ‘void lldb_private::FormatterBytecode::DataStack::Push(lldb_private::FormatterBytecode::DataStackElement)’
   44 |   void Push(DataStackElement el) { push_back(el); }
      |             ~~~~~~~~~~~~~~~~~^~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters/FormatterBytecode.cpp:395:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  395 |       if (y < 0)                                                               \
      |           ~~^~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters/FormatterBytecode.cpp:401:7: note: in expansion of macro ‘SHIFTOP’
  401 |       SHIFTOP(<<);
      |       ^~~~~~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters/FormatterBytecode.cpp:395:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  395 |       if (y < 0)                                                               \
      |           ~~^~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/DataFormatters/FormatterBytecode.cpp:404:7: note: in expansion of macro ‘SHIFTOP’
  404 |       SHIFTOP(<<);
      |       ^~~~~~~
```

https://github.com/llvm/llvm-project/pull/114333


More information about the lldb-commits mailing list