[all-commits] [llvm/llvm-project] 0ae4bd: [lldb] Reformat OptionGroupVariable.{h, cpp}, NFC.

Aman LaChapelle via All-commits all-commits at lists.llvm.org
Wed Apr 15 22:52:33 PDT 2026


  Branch: refs/heads/users/bzcheeseman/stack/9
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ae4bdc75a0c2180d900948717f59255e11588c6
      https://github.com/llvm/llvm-project/commit/0ae4bdc75a0c2180d900948717f59255e11588c6
  Author: bzcheeseman <aman.lachapelle at gmail.com>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M lldb/include/lldb/Interpreter/OptionGroupVariable.h
    M lldb/source/Interpreter/OptionGroupVariable.cpp

  Log Message:
  -----------
  [lldb] Reformat OptionGroupVariable.{h,cpp}, NFC.

This patch runs clang-format on OptionGroupVariable.{h,cpp}.


  Commit: 26223c0c1c6f45cce147b76c27af1b1adac4c27a
      https://github.com/llvm/llvm-project/commit/26223c0c1c6f45cce147b76c27af1b1adac4c27a
  Author: bzcheeseman <aman.lachapelle at gmail.com>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M lldb/include/lldb/API/SBVariablesOptions.h
    M lldb/include/lldb/Interpreter/OptionGroupVariable.h
    A lldb/include/lldb/Utility/ValueType.h
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/source/API/SBVariablesOptions.cpp
    M lldb/source/Interpreter/OptionGroupVariable.cpp

  Log Message:
  -----------
  [lldb] Scaffolding for synthetic variable support.

This patch handles most of the scaffolding for synthetic variable support that isn't directly tied to functional changes. This patch will be used by one following patch that actually modifies the lldb_private::StackFrame API to allow us to fetch synthetic variables.

There were a couple important/interesting decisions made in this patch that should be noted:
- Any value type may be synthetic, which is why it's a mask applied over the top of another value type.
- When printing frame variables with `fr v`, default to showing synthetic variables.

This new value type mask makes some of the ValueType handling more interesting, but since nothing generates objects with this mask until the next patch, we can land the concept in this patch in some amount of isolation.

stack-info: PR: https://github.com/llvm/llvm-project/pull/181500, branch: users/bzcheeseman/stack/8


  Commit: f81c770d137e2bf9d89fc82258d5e2c5a955eb76
      https://github.com/llvm/llvm-project/commit/f81c770d137e2bf9d89fc82258d5e2c5a955eb76
  Author: bzcheeseman <aman.lachapelle at gmail.com>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M lldb/include/lldb/Target/BorrowedStackFrame.h
    M lldb/include/lldb/Target/StackFrame.h
    M lldb/source/API/SBFrame.cpp
    M lldb/source/Commands/CommandObjectFrame.cpp
    M lldb/source/Core/IOHandlerCursesGUI.cpp
    M lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
    M lldb/source/Plugins/Process/scripted/ScriptedFrame.cpp
    M lldb/source/Plugins/Process/scripted/ScriptedFrame.h
    M lldb/source/Symbol/Variable.cpp
    M lldb/source/Target/BorrowedStackFrame.cpp
    M lldb/source/Target/StackFrame.cpp
    M lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py
    M lldb/test/API/functionalities/scripted_frame_provider/test_frame_providers.py

  Log Message:
  -----------
  [lldb] Add synthetic variable support to Get*VariableList.

This patch adds a new flag to the lldb_private::StackFrame API to get variable lists: `include_synthetic_vars`.  This allows ScriptedFrame (and other future synthetic frames) to construct 'fake' variables and return them in the VariableList, so that commands like `fr v` and `SBFrame::GetVariables` can show them to the user as requested.

This patch includes all changes necessary to call the API the new way - I tried to use my best judgement on when to include synthetic variables or not and leave comments explaining the decision.

As a consequence of producing synthetic variables, this patch means that ScriptedFrame can produce Variable objects with ValueType that contains a ValueTypeExtendedMask in a high bit. This necessarily complicates some of the switch/case handling in places where we would expect to find such variables, and this patch makes best effort to address all such cases as well. From experience, they tend to show up whenever we're dealing with checking if a Variable is in a specified scope, which means we basically have to check the high bit against some user input saying "yes/no synthetic variables".

stack-info: PR: https://github.com/llvm/llvm-project/pull/181501, branch: users/bzcheeseman/stack/9


Compare: https://github.com/llvm/llvm-project/compare/03471de061a6...f81c770d137e

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list