Skip to content

Conversation

lexi-nadia
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Sep 5, 2025

@llvm/pr-subscribers-lldb

Author: None (lexi-nadia)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/157150.diff

2 Files Affected:

  • (modified) lldb/tools/lldb-dap/Handler/ModuleSymbolsRequestHandler.cpp (+1-1)
  • (modified) lldb/tools/lldb-dap/Protocol/DAPTypes.h (+8-8)
diff --git a/lldb/tools/lldb-dap/Handler/ModuleSymbolsRequestHandler.cpp b/lldb/tools/lldb-dap/Handler/ModuleSymbolsRequestHandler.cpp
index 4c61138e5007e..4a9d256cfa975 100644
--- a/lldb/tools/lldb-dap/Handler/ModuleSymbolsRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/ModuleSymbolsRequestHandler.cpp
@@ -60,7 +60,7 @@ ModuleSymbolsRequestHandler::Run(const ModuleSymbolsArguments &args) const {
     if (!symbol.IsValid())
       continue;
 
-    Symbol dap_symbol = {};
+    Symbol dap_symbol;
     dap_symbol.id = symbol.GetID();
     dap_symbol.type = symbol.GetType();
     dap_symbol.isDebug = symbol.IsDebug();
diff --git a/lldb/tools/lldb-dap/Protocol/DAPTypes.h b/lldb/tools/lldb-dap/Protocol/DAPTypes.h
index 7fccf1359a737..17a25c092b8dd 100644
--- a/lldb/tools/lldb-dap/Protocol/DAPTypes.h
+++ b/lldb/tools/lldb-dap/Protocol/DAPTypes.h
@@ -50,29 +50,29 @@ llvm::json::Value toJSON(const SourceLLDBData &);
 
 struct Symbol {
   /// The symbol id, usually the original symbol table index.
-  uint32_t id;
+  uint32_t id = 0;
 
   /// True if this symbol is debug information in a symbol.
-  bool isDebug;
+  bool isDebug = false;
 
   /// True if this symbol is not actually in the symbol table, but synthesized
   /// from other info in the object file.
-  bool isSynthetic;
+  bool isSynthetic = false;
 
   /// True if this symbol is globally visible.
-  bool isExternal;
+  bool isExternal = false;
 
   /// The symbol type.
-  lldb::SymbolType type;
+  lldb::SymbolType type = lldb::eSymbolTypeInvalid;
 
   /// The symbol file address.
-  lldb::addr_t fileAddress;
+  lldb::addr_t fileAddress = 0;
 
   /// The symbol load address.
-  std::optional<lldb::addr_t> loadAddress;
+  std::optional<lldb::addr_t> loadAddress = std::nullopt;
 
   /// The symbol size.
-  lldb::addr_t size;
+  lldb::addr_t size = 0;
 
   /// The symbol name.
   std::string name;

Co-authored-by: Jonas Devlieghere <[email protected]>
Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ashgti ashgti merged commit a652979 into llvm:main Sep 5, 2025
9 checks passed
@walter-erquinigo
Copy link
Member

thanks!

JDevlieghere added a commit to swiftlang/llvm-project that referenced this pull request Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants