[Lldb-commits] [lldb] 78af051 - Revert "[lldb-vscode] Creating a new flag for adjusting the behavior of evaluation repl expressions to allow users to more easily invoke lldb commands."

2023-07-11 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2023-07-11T15:16:03-07:00
New Revision: 78af051ff0e16db73201b1370e34206a6a4c1b93

URL: 
https://github.com/llvm/llvm-project/commit/78af051ff0e16db73201b1370e34206a6a4c1b93
DIFF: 
https://github.com/llvm/llvm-project/commit/78af051ff0e16db73201b1370e34206a6a4c1b93.diff

LOG: Revert "[lldb-vscode] Creating a new flag for adjusting the behavior of 
evaluation repl expressions to allow users to more easily invoke lldb commands."

This reverts commit 16317f1ced77e1d8711188f2fcc6c86a783d9c56.

Reverting because of test failures:

 TEST 'lldb-api :: 
tools/lldb-vscode/console/TestVSCode_console.py' FAILED 
Script:
--
/usr/local/Frameworks/Python.framework/Versions/3.10/bin/python3.10 
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/API/dotest.py
 -u CXXFLAGS -u CFLAGS --codesign-identity lldb_codesign --env 
LLVM_LIBS_DIR=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./lib 
--env 
LLVM_INCLUDE_DIR=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/include
 --env 
LLVM_TOOLS_DIR=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin 
--libcxx-include-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/include/c++/v1 
--libcxx-library-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lib --arch x86_64 
--build-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex
 --lldb-module-cache-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-lldb/lldb-api
 --clang-module-cache-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-clang/lldb-api
 --executable 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/lldb --compiler 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/clang 
--dsymutil 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/dsymutil 
--llvm-tools-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin --lldb-libs-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./lib --build-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex
 -t --env TERM=vt100 
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/API/tools/lldb-vscode/console
 -p TestVSCode_console.py

https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/57586/

Added: 


Modified: 
lldb/tools/lldb-vscode/Options.td
lldb/tools/lldb-vscode/README.md
lldb/tools/lldb-vscode/VSCode.cpp
lldb/tools/lldb-vscode/VSCode.h
lldb/tools/lldb-vscode/lldb-vscode.cpp

Removed: 




diff  --git a/lldb/tools/lldb-vscode/Options.td 
b/lldb/tools/lldb-vscode/Options.td
index 8c51a994ebc270..a73671ad749c47 100644
--- a/lldb/tools/lldb-vscode/Options.td
+++ b/lldb/tools/lldb-vscode/Options.td
@@ -39,7 +39,3 @@ def debugger_pid: Separate<["--", "-"], "debugger-pid">,
   MetaVarName<"">,
   HelpText<"The PID of the lldb-vscode instance that sent the launchInTerminal 
"
 "request when using --launch-target.">;
-
-def repl_mode: S<"repl-mode">,
-  MetaVarName<"">,
-  HelpText<"The mode for handling repl evaluation requests, supported modes: 
variable, command, auto.">;

diff  --git a/lldb/tools/lldb-vscode/README.md 
b/lldb/tools/lldb-vscode/README.md
index 154ccefc5f5979..cd249ed2fac7c6 100644
--- a/lldb/tools/lldb-vscode/README.md
+++ b/lldb/tools/lldb-vscode/README.md
@@ -236,22 +236,3 @@ This will launch a server and then request a child debug 
session for a client.
   ]
 }
 ```
-
-## repl-mode
-
-Inspect or adjust the behavior of lldb-vscode repl evaluation requests. The
-supported modes are `variable`, `command` and `auto`.
-
-*  `variable` - Variable mode expressions are evaluated in the context of the
-   current frame. Use a `\`` prefix on the command to run an lldb command.
-*  `command` - Command mode expressions are evaluated as lldb commands, as a
-   result, values printed by lldb are always stringified representations of the
-   expression output.
-*  `auto` - Auto mode will attempt to infer if the expression represents an 
lldb
-   command or a variable expression. A heuristic is used to infer if the input
-   represents a variable or a command. Use a `\`` prefix to ensure an 
expression
-   is evaluated as a command.
-
-The initial repl-mode can be configured with the cli flag `--repl-mode=`
-and may also be adjusted at runtime using the lldb command
-`lldb-vscode repl-mode `.

diff  --git a/lldb/tools/lldb-vscode/VSCode.cpp 
b/lldb/tools/lldb-vscode/VSCode.cpp
index f007e09eee1e1d..b1c6817c2128b9 100644
--- a/lldb/tools/lldb-vscode/VSCode.cpp
+++ b/lldb/tools/lldb-vscode/VSCode.cpp
@@ -44,8 +44,7 @@ VSCode::VSCode()
   configuration_done_sent(false), waiting_for_run_in_terminal(false),
   progress_event_reporter(
   [&](const Progress

[Lldb-commits] [lldb] df05449 - Revert "[lldb][LocateModuleCallback] Call locate module callback"

2023-07-14 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2023-07-14T11:05:01-04:00
New Revision: df054499c35cdda02b196b2ca5c0a326abdc0a29

URL: 
https://github.com/llvm/llvm-project/commit/df054499c35cdda02b196b2ca5c0a326abdc0a29
DIFF: 
https://github.com/llvm/llvm-project/commit/df054499c35cdda02b196b2ca5c0a326abdc0a29.diff

LOG: Revert "[lldb][LocateModuleCallback] Call locate module callback"

This reverts commit 7f1028e9df52b4e7246f189a24684b1ca8c9bfbe.

This is because test failures

lldb-unit.Target/_/TargetTests/LocateModuleCallbackTest.GetOrCreateModuleWithCachedModule
lldb-unit.Target/_/TargetTests/LocateModuleCallbackTest.GetOrCreateModuleWithCachedModuleAndBreakpadSymbol

Added: 


Modified: 
lldb/include/lldb/Target/Platform.h
lldb/include/lldb/Target/Target.h
lldb/source/Target/Platform.cpp
lldb/source/Target/Target.cpp
lldb/unittests/Target/CMakeLists.txt

Removed: 
lldb/unittests/Target/Inputs/AndroidModule.c
lldb/unittests/Target/Inputs/AndroidModule.so
lldb/unittests/Target/Inputs/AndroidModule.so.sym
lldb/unittests/Target/Inputs/AndroidModule.unstripped.so
lldb/unittests/Target/LocateModuleCallbackTest.cpp



diff  --git a/lldb/include/lldb/Target/Platform.h 
b/lldb/include/lldb/Target/Platform.h
index a5a78fe0f86983..35227429b126ae 100644
--- a/lldb/include/lldb/Target/Platform.h
+++ b/lldb/include/lldb/Target/Platform.h
@@ -881,19 +881,6 @@ class Platform : public PluginInterface {
   
   virtual Args GetExtraStartupCommands();
 
-  typedef std::function
-  LocateModuleCallback;
-
-  /// Set locate module callback. This allows users to implement their own
-  /// module cache system. For example, to leverage artifacts of build system,
-  /// to bypass pulling files from remote platform, or to search symbol files
-  /// from symbol servers.
-  void SetLocateModuleCallback(LocateModuleCallback callback);
-
-  LocateModuleCallback GetLocateModuleCallback() const;
-
 protected:
   /// Create a list of ArchSpecs with the given OS and a architectures. The
   /// vendor field is left as an "unspecified unknown".
@@ -941,7 +928,6 @@ class Platform : public PluginInterface {
   std::vector m_trap_handlers;
   bool m_calculated_trap_handlers;
   const std::unique_ptr m_module_cache;
-  LocateModuleCallback m_locate_module_callback;
 
   /// Ask the Platform subclass to fill in the list of trap handler names
   ///

diff  --git a/lldb/include/lldb/Target/Target.h 
b/lldb/include/lldb/Target/Target.h
index d5b4b8e18c2d2d..ed0ecbbddbf814 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -1625,12 +1625,6 @@ class Target : public 
std::enable_shared_from_this,
 
   Target(const Target &) = delete;
   const Target &operator=(const Target &) = delete;
-
-private:
-  void CallLocateModuleCallbackIfSet(const ModuleSpec &module_spec,
- lldb::ModuleSP &module_sp,
- FileSpec &symbol_file_spec,
- bool &did_create_module);
 };
 
 } // namespace lldb_private

diff  --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 11a123fb6d583d..eedf596f1977f3 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -1971,14 +1971,6 @@ Args Platform::GetExtraStartupCommands() {
   return {};
 }
 
-void Platform::SetLocateModuleCallback(LocateModuleCallback callback) {
-  m_locate_module_callback = callback;
-}
-
-Platform::LocateModuleCallback Platform::GetLocateModuleCallback() const {
-  return m_locate_module_callback;
-}
-
 PlatformSP PlatformList::GetOrCreate(llvm::StringRef name) {
   std::lock_guard guard(m_mutex);
   for (const PlatformSP &platform_sp : m_platforms) {

diff  --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index f0c57ef83c4a14..06867d359a3c0f 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -2129,46 +2129,19 @@ ModuleSP Target::GetOrCreateModule(const ModuleSpec 
&module_spec, bool notify,
  // of the library
 bool did_create_module = false;
 FileSpecList search_paths = GetExecutableSearchPaths();
-FileSpec symbol_file_spec;
-
-// Call locate module callback if set. This allows users to implement their
-// own module cache system. For example, to leverage build system 
artifacts,
-// to bypass pulling files from remote platform, or to search symbol files
-// from symbol servers.
-CallLocateModuleCallbackIfSet(module_spec, module_sp, symbol_file_spec,
-  did_create_module);
-
-// The result of this CallLocateModuleCallbackIfSet is one of the 
following.
-// 1. module_sp:loaded, symbol_file_spec:set
-//  The callback found a module file and a symbol file for the
-//  module_spec. We will call module_sp->SetSymbolFileFileSpec with
-

[Lldb-commits] [lldb] 668a3ef - Revert "[lldb][LocateModuleCallback] Fix LocateModuleCallbackTest"

2023-07-14 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2023-07-14T11:05:01-04:00
New Revision: 668a3efd42e7fea19a0d331f73345f2ac13cdf4f

URL: 
https://github.com/llvm/llvm-project/commit/668a3efd42e7fea19a0d331f73345f2ac13cdf4f
DIFF: 
https://github.com/llvm/llvm-project/commit/668a3efd42e7fea19a0d331f73345f2ac13cdf4f.diff

LOG: Revert "[lldb][LocateModuleCallback] Fix LocateModuleCallbackTest"

This reverts commit fb087c17c82309404fe0ebf3505c186642a719f7.

This is because of test failures:

lldb-unit.Target/_/TargetTests/LocateModuleCallbackTest.GetOrCreateModuleWithCachedModule
lldb-unit.Target/_/TargetTests/LocateModuleCallbackTest.GetOrCreateModuleWithCachedModuleAndBreakpadSymbol

Added: 


Modified: 
lldb/unittests/Target/LocateModuleCallbackTest.cpp

Removed: 




diff  --git a/lldb/unittests/Target/LocateModuleCallbackTest.cpp 
b/lldb/unittests/Target/LocateModuleCallbackTest.cpp
index 42a0790bca58f2..cd5eb4473473bb 100644
--- a/lldb/unittests/Target/LocateModuleCallbackTest.cpp
+++ b/lldb/unittests/Target/LocateModuleCallbackTest.cpp
@@ -22,7 +22,6 @@
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_private::platform_android;
-using namespace lldb_private::platform_linux;
 using namespace lldb_private::breakpad;
 using namespace testing;
 
@@ -191,8 +190,7 @@ ProcessSP MockProcessCreateInstance(TargetSP target_sp, 
ListenerSP listener_sp,
 
 class LocateModuleCallbackTest : public testing::Test {
   SubsystemRAII
+PlatformAndroid, SymbolFileBreakpad, SymbolFileSymtab>
   subsystems;
 
 public:
@@ -204,9 +202,6 @@ class LocateModuleCallbackTest : public testing::Test {
 m_test_dir);
 
 // Create Debugger.
-ArchSpec host_arch("i386-pc-linux");
-Platform::SetHostPlatform(
-platform_linux::PlatformLinux::CreateInstance(true, &host_arch));
 m_debugger_sp = Debugger::CreateInstance();
 EXPECT_TRUE(m_debugger_sp);
 



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] a76b3be - Revert "Revert "[lldb][LocateModuleCallback] Fix LocateModuleCallbackTest""

2023-07-14 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2023-07-14T11:19:16-04:00
New Revision: a76b3bec6c29f473fa0727c8aef01c7b31d400fd

URL: 
https://github.com/llvm/llvm-project/commit/a76b3bec6c29f473fa0727c8aef01c7b31d400fd
DIFF: 
https://github.com/llvm/llvm-project/commit/a76b3bec6c29f473fa0727c8aef01c7b31d400fd.diff

LOG: Revert "Revert "[lldb][LocateModuleCallback] Fix LocateModuleCallbackTest""

This reverts commit 668a3efd42e7fea19a0d331f73345f2ac13cdf4f.

Reverting because of build errors:

In file included from 
/Users/buildslave/jenkins/workspace/as-lldb-cmake/llvm-project/lldb/source/API/SBPlatform.cpp:19:
/Users/buildslave/jenkins/workspace/as-lldb-cmake/llvm-project/lldb/include/lldb/Target/Target.h:1035:18:
 warning: parameter 'merged' not found in the function declaration 
[-Wdocumentation]

Added: 


Modified: 
lldb/unittests/Target/LocateModuleCallbackTest.cpp

Removed: 




diff  --git a/lldb/unittests/Target/LocateModuleCallbackTest.cpp 
b/lldb/unittests/Target/LocateModuleCallbackTest.cpp
index cd5eb4473473bb..42a0790bca58f2 100644
--- a/lldb/unittests/Target/LocateModuleCallbackTest.cpp
+++ b/lldb/unittests/Target/LocateModuleCallbackTest.cpp
@@ -22,6 +22,7 @@
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_private::platform_android;
+using namespace lldb_private::platform_linux;
 using namespace lldb_private::breakpad;
 using namespace testing;
 
@@ -190,7 +191,8 @@ ProcessSP MockProcessCreateInstance(TargetSP target_sp, 
ListenerSP listener_sp,
 
 class LocateModuleCallbackTest : public testing::Test {
   SubsystemRAII
+PlatformAndroid, PlatformLinux, SymbolFileBreakpad,
+SymbolFileSymtab>
   subsystems;
 
 public:
@@ -202,6 +204,9 @@ class LocateModuleCallbackTest : public testing::Test {
 m_test_dir);
 
 // Create Debugger.
+ArchSpec host_arch("i386-pc-linux");
+Platform::SetHostPlatform(
+platform_linux::PlatformLinux::CreateInstance(true, &host_arch));
 m_debugger_sp = Debugger::CreateInstance();
 EXPECT_TRUE(m_debugger_sp);
 



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 55147ce - Revert "Revert "[lldb][LocateModuleCallback] Call locate module callback""

2023-07-14 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2023-07-14T11:19:16-04:00
New Revision: 55147ceb62020633cd7e7d403120d3915f4be3b6

URL: 
https://github.com/llvm/llvm-project/commit/55147ceb62020633cd7e7d403120d3915f4be3b6
DIFF: 
https://github.com/llvm/llvm-project/commit/55147ceb62020633cd7e7d403120d3915f4be3b6.diff

LOG: Revert "Revert "[lldb][LocateModuleCallback] Call locate module callback""

This reverts commit df054499c35cdda02b196b2ca5c0a326abdc0a29.

Reverting because of build errors

In file included from 
/Users/buildslave/jenkins/workspace/as-lldb-cmake/llvm-project/lldb/source/API/SBPlatform.cpp:19:
/Users/buildslave/jenkins/workspace/as-lldb-cmake/llvm-project/lldb/include/lldb/Target/Target.h:1035:18:
 warning: parameter 'merged' not found in the function declaration 
[-Wdocumentation]

Added: 
lldb/unittests/Target/Inputs/AndroidModule.c
lldb/unittests/Target/Inputs/AndroidModule.so
lldb/unittests/Target/Inputs/AndroidModule.so.sym
lldb/unittests/Target/Inputs/AndroidModule.unstripped.so
lldb/unittests/Target/LocateModuleCallbackTest.cpp

Modified: 
lldb/include/lldb/Target/Platform.h
lldb/include/lldb/Target/Target.h
lldb/source/Target/Platform.cpp
lldb/source/Target/Target.cpp
lldb/unittests/Target/CMakeLists.txt

Removed: 




diff  --git a/lldb/include/lldb/Target/Platform.h 
b/lldb/include/lldb/Target/Platform.h
index 35227429b126ae..a5a78fe0f86983 100644
--- a/lldb/include/lldb/Target/Platform.h
+++ b/lldb/include/lldb/Target/Platform.h
@@ -881,6 +881,19 @@ class Platform : public PluginInterface {
   
   virtual Args GetExtraStartupCommands();
 
+  typedef std::function
+  LocateModuleCallback;
+
+  /// Set locate module callback. This allows users to implement their own
+  /// module cache system. For example, to leverage artifacts of build system,
+  /// to bypass pulling files from remote platform, or to search symbol files
+  /// from symbol servers.
+  void SetLocateModuleCallback(LocateModuleCallback callback);
+
+  LocateModuleCallback GetLocateModuleCallback() const;
+
 protected:
   /// Create a list of ArchSpecs with the given OS and a architectures. The
   /// vendor field is left as an "unspecified unknown".
@@ -928,6 +941,7 @@ class Platform : public PluginInterface {
   std::vector m_trap_handlers;
   bool m_calculated_trap_handlers;
   const std::unique_ptr m_module_cache;
+  LocateModuleCallback m_locate_module_callback;
 
   /// Ask the Platform subclass to fill in the list of trap handler names
   ///

diff  --git a/lldb/include/lldb/Target/Target.h 
b/lldb/include/lldb/Target/Target.h
index ed0ecbbddbf814..d5b4b8e18c2d2d 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -1625,6 +1625,12 @@ class Target : public 
std::enable_shared_from_this,
 
   Target(const Target &) = delete;
   const Target &operator=(const Target &) = delete;
+
+private:
+  void CallLocateModuleCallbackIfSet(const ModuleSpec &module_spec,
+ lldb::ModuleSP &module_sp,
+ FileSpec &symbol_file_spec,
+ bool &did_create_module);
 };
 
 } // namespace lldb_private

diff  --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index eedf596f1977f3..11a123fb6d583d 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -1971,6 +1971,14 @@ Args Platform::GetExtraStartupCommands() {
   return {};
 }
 
+void Platform::SetLocateModuleCallback(LocateModuleCallback callback) {
+  m_locate_module_callback = callback;
+}
+
+Platform::LocateModuleCallback Platform::GetLocateModuleCallback() const {
+  return m_locate_module_callback;
+}
+
 PlatformSP PlatformList::GetOrCreate(llvm::StringRef name) {
   std::lock_guard guard(m_mutex);
   for (const PlatformSP &platform_sp : m_platforms) {

diff  --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 06867d359a3c0f..f0c57ef83c4a14 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -2129,19 +2129,46 @@ ModuleSP Target::GetOrCreateModule(const ModuleSpec 
&module_spec, bool notify,
  // of the library
 bool did_create_module = false;
 FileSpecList search_paths = GetExecutableSearchPaths();
-// If there are image search path entries, try to use them first to acquire
-// a suitable image.
-if (m_image_search_paths.GetSize()) {
-  ModuleSpec transformed_spec(module_spec);
-  ConstString transformed_dir;
-  if (m_image_search_paths.RemapPath(
-  module_spec.GetFileSpec().GetDirectory(), transformed_dir)) {
-transformed_spec.GetFileSpec().SetDirectory(transformed_dir);
-transformed_spec.GetFileSpec().SetFilename(
-  module_spec.GetFileSpec().GetFilename());
-error = ModuleList::GetSharedModule(transformed_spec, 

[Lldb-commits] [lldb] ce22598 - Disable GetOrCreateModuleWithCachedModule and GetOrCreateModuleWithCachedModuleAndSymbol tests on arm64, because of test failures

2023-07-14 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2023-07-14T13:41:27-04:00
New Revision: ce225982af734bdb68dc054017fc4411c179591c

URL: 
https://github.com/llvm/llvm-project/commit/ce225982af734bdb68dc054017fc4411c179591c
DIFF: 
https://github.com/llvm/llvm-project/commit/ce225982af734bdb68dc054017fc4411c179591c.diff

LOG: Disable GetOrCreateModuleWithCachedModule and 
GetOrCreateModuleWithCachedModuleAndSymbol tests on arm64, because of test 
failures

Added: 


Modified: 
lldb/unittests/Target/LocateModuleCallbackTest.cpp

Removed: 




diff  --git a/lldb/unittests/Target/LocateModuleCallbackTest.cpp 
b/lldb/unittests/Target/LocateModuleCallbackTest.cpp
index 42a0790bca58f2..ad96adb32a471a 100644
--- a/lldb/unittests/Target/LocateModuleCallbackTest.cpp
+++ b/lldb/unittests/Target/LocateModuleCallbackTest.cpp
@@ -263,6 +263,11 @@ class LocateModuleCallbackTest : public testing::Test {
 } // namespace
 
 TEST_F(LocateModuleCallbackTest, GetOrCreateModuleWithCachedModule) {
+  // Disable test on arm64 because of failures in the lldb incremental arm64
+  // bot.
+#if defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)
+  GTEST_SKIP() << "broken on arm64.";
+#endif
   // The module file is cached, and the locate module callback is not set.
   // GetOrCreateModule should succeed to return the module from the cache.
   FileSpec uuid_view = BuildCacheDir(m_test_dir);
@@ -281,6 +286,12 @@ TEST_F(LocateModuleCallbackTest, 
GetOrCreateModuleWithCachedModuleAndSymbol) {
   // The module and symbol files are cached, and the locate module callback is
   // not set. GetOrCreateModule should succeed to return the module from the
   // cache with the symbol.
+
+  // Disable test on arm64 because of failures in the lldb incremental arm64
+  // bot.
+#if defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)
+  GTEST_SKIP() << "broken on arm64.";
+#endif
   FileSpec uuid_view = BuildCacheDirWithSymbol(m_test_dir);
 
   CheckNoCallback();
@@ -642,4 +653,4 @@ TEST_F(LocateModuleCallbackTest,
   ModuleSP module_sp =
   m_target_sp->GetOrCreateModule(m_module_spec, /*notify=*/false);
   ASSERT_FALSE(module_sp);
-}
+}
\ No newline at end of file



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Centralize the handling of completion for simple argument lists. (PR #82085)

2024-02-19 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

Reverted with 9ed8b272c30a01c450616f0ed8b2373d5d618ebb

https://github.com/llvm/llvm-project/pull/82085
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] c63e68b - Bump the minimum LLVM version for TestTypeList.py

2024-02-21 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2024-02-21T13:42:10-08:00
New Revision: c63e68ba5fb54b69521c4f010d1c5290856c6509

URL: 
https://github.com/llvm/llvm-project/commit/c63e68ba5fb54b69521c4f010d1c5290856c6509
DIFF: 
https://github.com/llvm/llvm-project/commit/c63e68ba5fb54b69521c4f010d1c5290856c6509.diff

LOG: Bump the minimum LLVM version for TestTypeList.py

Added: 


Modified: 
lldb/test/API/python_api/type/TestTypeList.py

Removed: 




diff  --git a/lldb/test/API/python_api/type/TestTypeList.py 
b/lldb/test/API/python_api/type/TestTypeList.py
index e75affd6522115..eba5e17355c3f8 100644
--- a/lldb/test/API/python_api/type/TestTypeList.py
+++ b/lldb/test/API/python_api/type/TestTypeList.py
@@ -18,6 +18,7 @@ def setUp(self):
 self.source = "main.cpp"
 self.line = line_number(self.source, "// Break at this line")
 
+@skipIf(compiler="clang", compiler_version=["<", "17.0"])
 def test(self):
 """Exercise SBType and SBTypeList API."""
 d = {"EXE": self.exe_name}



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Increase timeout to reduce test failure rate. (PR #83312)

2024-02-28 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham created 
https://github.com/llvm/llvm-project/pull/83312

The timeout for this test was set to 1.0s which is very low, it should be a 
default of 10s and be increased by a factor of 10 if ASAN is enabled. This will 
help reduce the falkiness of the test, especially in ASAN builds.

>From 53c507046527e04b7faa70ea17cd59b45e724f55 Mon Sep 17 00:00:00 2001
From: Shubham Sandeep Rastogi 
Date: Wed, 28 Feb 2024 10:28:55 -0800
Subject: [PATCH] Increase timeout to reduce test failure rate.

The timeout for this test was set to 1.0s which is very low, it should
be a default of 10s and be increased by a factor of 10 if ASAN is
enabled. This will help reduce the falkiness of the test, especially in
ASAN builds.
---
 .../API/tools/lldb-dap/launch/TestDAP_launch.py   | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
index 04d741c1d47201..635ec4f0baf190 100644
--- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
+++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
@@ -44,7 +44,8 @@ def test_termination(self):
 self.dap_server.request_disconnect()
 
 # Wait until the underlying lldb-dap process dies.
-self.dap_server.process.wait(timeout=10)
+timeoutval = 10 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
+self.dap_server.process.wait(timeout=timeoutval)
 
 # Check the return code
 self.assertEqual(self.dap_server.process.poll(), 0)
@@ -334,14 +335,15 @@ def test_commands(self):
 # Get output from the console. This should contain both the
 # "stopCommands" that were run after the first breakpoint was hit
 self.continue_to_breakpoints(breakpoint_ids)
-output = self.get_console(timeout=1.0)
+timeoutval = 10 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
+output = self.get_console(timeout=timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue again and hit the second breakpoint.
 # Get output from the console. This should contain both the
 # "stopCommands" that were run after the second breakpoint was hit
 self.continue_to_breakpoints(breakpoint_ids)
-output = self.get_console(timeout=1.0)
+output = self.get_console(timeout=timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue until the program exits
@@ -402,21 +404,22 @@ def test_extra_launch_commands(self):
 self.verify_commands("launchCommands", output, launchCommands)
 # Verify the "stopCommands" here
 self.continue_to_next_stop()
-output = self.get_console(timeout=1.0)
+timeoutval = 10 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
+output = self.get_console(timeout=timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue and hit the second breakpoint.
 # Get output from the console. This should contain both the
 # "stopCommands" that were run after the first breakpoint was hit
 self.continue_to_next_stop()
-output = self.get_console(timeout=1.0)
+output = self.get_console(timeout=timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue until the program exits
 self.continue_to_exit()
 # Get output from the console. This should contain both the
 # "exitCommands" that were run after the second breakpoint was hit
-output = self.get_console(timeout=1.0)
+output = self.get_console(timeout=timeoutval)
 self.verify_commands("exitCommands", output, exitCommands)
 
 @skipIfWindows

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Increase timeout to reduce test failure rate. (PR #83312)

2024-02-28 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham updated 
https://github.com/llvm/llvm-project/pull/83312

>From 563ef808aa3b06e97b89e7b52d518705e97d9e14 Mon Sep 17 00:00:00 2001
From: Shubham Sandeep Rastogi 
Date: Wed, 28 Feb 2024 10:28:55 -0800
Subject: [PATCH] Increase timeout to reduce test failure rate.

The timeout for this test was set to 1.0s which is very low, it should
be a default of 10s and be increased by a factor of 10 if ASAN is
enabled. This will help reduce the falkiness of the test, especially in
ASAN builds.
---
 .../test/tools/lldb-dap/lldbdap_testcase.py  |  1 +
 .../test/API/tools/lldb-dap/launch/TestDAP_launch.py | 12 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py 
b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
index 288cc8cf9a48c8..f586a28f511a45 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
@@ -6,6 +6,7 @@
 
 
 class DAPTestCaseBase(TestBase):
+timeoutval = 10 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
 NO_DEBUG_INFO_TESTCASE = True
 
 def create_debug_adaptor(self, lldbDAPEnv=None):
diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
index 04d741c1d47201..0760d358d9c0b3 100644
--- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
+++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
@@ -44,7 +44,7 @@ def test_termination(self):
 self.dap_server.request_disconnect()
 
 # Wait until the underlying lldb-dap process dies.
-self.dap_server.process.wait(timeout=10)
+
self.dap_server.process.wait(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 
 # Check the return code
 self.assertEqual(self.dap_server.process.poll(), 0)
@@ -334,14 +334,14 @@ def test_commands(self):
 # Get output from the console. This should contain both the
 # "stopCommands" that were run after the first breakpoint was hit
 self.continue_to_breakpoints(breakpoint_ids)
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue again and hit the second breakpoint.
 # Get output from the console. This should contain both the
 # "stopCommands" that were run after the second breakpoint was hit
 self.continue_to_breakpoints(breakpoint_ids)
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue until the program exits
@@ -402,21 +402,21 @@ def test_extra_launch_commands(self):
 self.verify_commands("launchCommands", output, launchCommands)
 # Verify the "stopCommands" here
 self.continue_to_next_stop()
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue and hit the second breakpoint.
 # Get output from the console. This should contain both the
 # "stopCommands" that were run after the first breakpoint was hit
 self.continue_to_next_stop()
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue until the program exits
 self.continue_to_exit()
 # Get output from the console. This should contain both the
 # "exitCommands" that were run after the second breakpoint was hit
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("exitCommands", output, exitCommands)
 
 @skipIfWindows

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Increase timeout to reduce test failure rate. (PR #83312)

2024-02-29 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham updated 
https://github.com/llvm/llvm-project/pull/83312

>From cef723783edd5ba89fd5b9b0ec800fa1439ffb90 Mon Sep 17 00:00:00 2001
From: Shubham Sandeep Rastogi 
Date: Wed, 28 Feb 2024 10:28:55 -0800
Subject: [PATCH] Increase timeout to reduce test failure rate.

The timeout for this test was set to 1.0s which is very low, it should
be a default of 10s and be increased by a factor of 10 if ASAN is
enabled. This will help reduce the falkiness of the test, especially in
ASAN builds.
---
 .../test/tools/lldb-dap/lldbdap_testcase.py  |  3 +++
 .../test/API/tools/lldb-dap/launch/TestDAP_launch.py | 12 ++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git 
a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py 
b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
index 288cc8cf9a48c8..23f650d2d36fdd 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
@@ -6,6 +6,9 @@
 
 
 class DAPTestCaseBase(TestBase):
+# set timeout based on whether ASAN was enabled or not. Increase
+# timeout by a factor of 10 if ASAN is enabled.
+timeoutval = 10 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
 NO_DEBUG_INFO_TESTCASE = True
 
 def create_debug_adaptor(self, lldbDAPEnv=None):
diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py 
b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
index 04d741c1d47201..0760d358d9c0b3 100644
--- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
+++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
@@ -44,7 +44,7 @@ def test_termination(self):
 self.dap_server.request_disconnect()
 
 # Wait until the underlying lldb-dap process dies.
-self.dap_server.process.wait(timeout=10)
+
self.dap_server.process.wait(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 
 # Check the return code
 self.assertEqual(self.dap_server.process.poll(), 0)
@@ -334,14 +334,14 @@ def test_commands(self):
 # Get output from the console. This should contain both the
 # "stopCommands" that were run after the first breakpoint was hit
 self.continue_to_breakpoints(breakpoint_ids)
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue again and hit the second breakpoint.
 # Get output from the console. This should contain both the
 # "stopCommands" that were run after the second breakpoint was hit
 self.continue_to_breakpoints(breakpoint_ids)
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue until the program exits
@@ -402,21 +402,21 @@ def test_extra_launch_commands(self):
 self.verify_commands("launchCommands", output, launchCommands)
 # Verify the "stopCommands" here
 self.continue_to_next_stop()
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue and hit the second breakpoint.
 # Get output from the console. This should contain both the
 # "stopCommands" that were run after the first breakpoint was hit
 self.continue_to_next_stop()
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("stopCommands", output, stopCommands)
 
 # Continue until the program exits
 self.continue_to_exit()
 # Get output from the console. This should contain both the
 # "exitCommands" that were run after the second breakpoint was hit
-output = self.get_console(timeout=1.0)
+output = 
self.get_console(timeout=lldbdap_testcase.DAPTestCaseBase.timeoutval)
 self.verify_commands("exitCommands", output, exitCommands)
 
 @skipIfWindows

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Increase timeout to reduce test failure rate. (PR #83312)

2024-02-29 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham closed 
https://github.com/llvm/llvm-project/pull/83312
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Debuginfod Testing & fixes: 3rd times the charm? (PR #87676)

2024-04-04 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

Hi @kevinfrei it seems like this patch broke greendragon

https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/812/

https://github.com/llvm/llvm-project/pull/87676
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Debuginfod Testing & fixes: 3rd times the charm? (PR #87676)

2024-04-04 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

To make sure green dragon stays green, I reverted this change with 
ca55ee88263e5b190965c3f14fd3b2647efab26a

https://github.com/llvm/llvm-project/pull/87676
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] cd31763 - Disable TestLldbGdbServer on Dwarf2 and clang versions below 14

2022-01-27 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-01-27T13:29:34-08:00
New Revision: cd317637708decd8faf34dd9773a8b2dec424010

URL: 
https://github.com/llvm/llvm-project/commit/cd317637708decd8faf34dd9773a8b2dec424010
DIFF: 
https://github.com/llvm/llvm-project/commit/cd317637708decd8faf34dd9773a8b2dec424010.diff

LOG: Disable TestLldbGdbServer on Dwarf2 and clang versions below 14

We have been noticing issues with the lldb bots on builds using versions below 
clang 14 and dwarf 2, so to make sure we can get clean builds for a while, we 
are disabling the tests for those versions

Differential Revision: https://reviews.llvm.org/D118395

Added: 


Modified: 
lldb/test/API/tools/lldb-server/TestLldbGdbServer.py

Removed: 




diff  --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py 
b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index 18461568c02ce..94b6123e0a4fd 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -28,6 +28,8 @@ class 
LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
 
 mydir = TestBase.compute_mydir(__file__)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_thread_suffix_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -41,6 +43,8 @@ def test_thread_suffix_supported(self):
 self.expect_gdbremote_sequence()
 
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_list_threads_in_stop_reply_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -52,6 +56,8 @@ def test_list_threads_in_stop_reply_supported(self):
 True)
 self.expect_gdbremote_sequence()
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<'3 '4'])
 def test_c_packet_works(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -63,6 +69,8 @@ def test_c_packet_works(self):
 self.expect_gdbremote_sequence()
 
 @skipIfWindows # No pty support to test any inferior output
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_inferior_print_exit(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior(
@@ -76,6 +84,8 @@ def test_inferior_print_exit(self):
 context = self.expect_gdbremote_sequence()
 self.assertIsNotNone(context)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_first_launch_stop_reply_thread_matches_first_qC(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -91,6 +101,8 @@ def 
test_first_launch_stop_reply_thread_matches_first_qC(self):
 context = self.expect_gdbremote_sequence()
 self.assertEqual(context.get("thread_id_QC"), 
context.get("thread_id_?"))
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_attach_commandline_continue_app_exits(self):
 self.build()
 self.set_inferior_startup_attach()
@@ -116,6 +128,8 @@ def test_attach_commandline_continue_app_exits(self):
 lldbgdbserverutils.process_is_running(
 procs["inferior"].pid, False))
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_one_valid_result(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -133,6 +147,8 @@ def test_qRegisterInfo_returns_one_valid_result(self):
 self.assert_valid_reg_info(
 lldbgdbserverutils.parse_reg_info_response(reg_info_packet))
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_all_valid_results(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -146,6 +162,8 @@ def test_qRegisterInfo_returns_all_valid_results(self):
 for reg_info in self.parse_register_info_packets(context):
 self.assert_valid_reg_info(reg_info)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_contains_required_generics_debugserver(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -175,6 +193,8 @@ def 
test_qRegisterInfo_contains_required_generics_debugserver(self):
 # Ensure we have a flags register.
 self.assertIn('flags', generic_regs)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_co

[Lldb-commits] [lldb] ee54868 - Revert "Disable TestLldbGdbServer on Dwarf2 and clang versions below 14"

2022-01-27 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-01-27T13:36:21-08:00
New Revision: ee54868a76e32fdfa8d1efe5e418460e54246a4e

URL: 
https://github.com/llvm/llvm-project/commit/ee54868a76e32fdfa8d1efe5e418460e54246a4e
DIFF: 
https://github.com/llvm/llvm-project/commit/ee54868a76e32fdfa8d1efe5e418460e54246a4e.diff

LOG: Revert "Disable TestLldbGdbServer on Dwarf2 and clang versions below 14"

This reverts commit cd317637708decd8faf34dd9773a8b2dec424010.

Added: 


Modified: 
lldb/test/API/tools/lldb-server/TestLldbGdbServer.py

Removed: 




diff  --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py 
b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index 94b6123e0a4fd..18461568c02ce 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -28,8 +28,6 @@ class 
LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
 
 mydir = TestBase.compute_mydir(__file__)
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_thread_suffix_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -43,8 +41,6 @@ def test_thread_suffix_supported(self):
 self.expect_gdbremote_sequence()
 
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_list_threads_in_stop_reply_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -56,8 +52,6 @@ def test_list_threads_in_stop_reply_supported(self):
 True)
 self.expect_gdbremote_sequence()
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<'3 '4'])
 def test_c_packet_works(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -69,8 +63,6 @@ def test_c_packet_works(self):
 self.expect_gdbremote_sequence()
 
 @skipIfWindows # No pty support to test any inferior output
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_inferior_print_exit(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior(
@@ -84,8 +76,6 @@ def test_inferior_print_exit(self):
 context = self.expect_gdbremote_sequence()
 self.assertIsNotNone(context)
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_first_launch_stop_reply_thread_matches_first_qC(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -101,8 +91,6 @@ def 
test_first_launch_stop_reply_thread_matches_first_qC(self):
 context = self.expect_gdbremote_sequence()
 self.assertEqual(context.get("thread_id_QC"), 
context.get("thread_id_?"))
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_attach_commandline_continue_app_exits(self):
 self.build()
 self.set_inferior_startup_attach()
@@ -128,8 +116,6 @@ def test_attach_commandline_continue_app_exits(self):
 lldbgdbserverutils.process_is_running(
 procs["inferior"].pid, False))
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_one_valid_result(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -147,8 +133,6 @@ def test_qRegisterInfo_returns_one_valid_result(self):
 self.assert_valid_reg_info(
 lldbgdbserverutils.parse_reg_info_response(reg_info_packet))
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_all_valid_results(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -162,8 +146,6 @@ def test_qRegisterInfo_returns_all_valid_results(self):
 for reg_info in self.parse_register_info_packets(context):
 self.assert_valid_reg_info(reg_info)
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_contains_required_generics_debugserver(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -193,8 +175,6 @@ def 
test_qRegisterInfo_contains_required_generics_debugserver(self):
 # Ensure we have a flags register.
 self.assertIn('flags', generic_regs)
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_contains_at_least_one_register_set(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -235,8 +215,6 @@ def targetHasAVX(self):
 @expectedFailureAll(oslist=["

[Lldb-commits] [lldb] 867fdec - Disable TestLldbGdbServer on Dwarf2 and clang versions below 14

2022-01-27 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-01-27T14:02:35-08:00
New Revision: 867fdec1945df3c1031d3cefdc97903131a3482b

URL: 
https://github.com/llvm/llvm-project/commit/867fdec1945df3c1031d3cefdc97903131a3482b
DIFF: 
https://github.com/llvm/llvm-project/commit/867fdec1945df3c1031d3cefdc97903131a3482b.diff

LOG: Disable TestLldbGdbServer on Dwarf2 and clang versions below 14

We have been noticing issues with the lldb bots on builds using versions below 
clang 14 and dwarf 2, so to make sure we can get clean builds for a while, we 
are disabling the tests for those versions

Differential Revision: https://reviews.llvm.org/D118395

Added: 


Modified: 
lldb/test/API/tools/lldb-server/TestLldbGdbServer.py

Removed: 




diff  --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py 
b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index 18461568c02ce..c6ecaf88b1be8 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -28,6 +28,8 @@ class 
LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
 
 mydir = TestBase.compute_mydir(__file__)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_thread_suffix_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -41,6 +43,8 @@ def test_thread_suffix_supported(self):
 self.expect_gdbremote_sequence()
 
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_list_threads_in_stop_reply_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -52,6 +56,8 @@ def test_list_threads_in_stop_reply_supported(self):
 True)
 self.expect_gdbremote_sequence()
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_c_packet_works(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -63,6 +69,8 @@ def test_c_packet_works(self):
 self.expect_gdbremote_sequence()
 
 @skipIfWindows # No pty support to test any inferior output
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_inferior_print_exit(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior(
@@ -76,6 +84,8 @@ def test_inferior_print_exit(self):
 context = self.expect_gdbremote_sequence()
 self.assertIsNotNone(context)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_first_launch_stop_reply_thread_matches_first_qC(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -91,6 +101,8 @@ def 
test_first_launch_stop_reply_thread_matches_first_qC(self):
 context = self.expect_gdbremote_sequence()
 self.assertEqual(context.get("thread_id_QC"), 
context.get("thread_id_?"))
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_attach_commandline_continue_app_exits(self):
 self.build()
 self.set_inferior_startup_attach()
@@ -116,6 +128,8 @@ def test_attach_commandline_continue_app_exits(self):
 lldbgdbserverutils.process_is_running(
 procs["inferior"].pid, False))
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_one_valid_result(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -133,6 +147,8 @@ def test_qRegisterInfo_returns_one_valid_result(self):
 self.assert_valid_reg_info(
 lldbgdbserverutils.parse_reg_info_response(reg_info_packet))
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_all_valid_results(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -146,6 +162,8 @@ def test_qRegisterInfo_returns_all_valid_results(self):
 for reg_info in self.parse_register_info_packets(context):
 self.assert_valid_reg_info(reg_info)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_contains_required_generics_debugserver(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -175,6 +193,8 @@ def 
test_qRegisterInfo_contains_required_generics_debugserver(self):
 # Ensure we have a flags register.
 self.assertIn('flags', generic_regs)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_co

[Lldb-commits] [lldb] cf93a08 - Fixed typos in TestLldbGdbServer.py

2022-01-27 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-01-27T14:12:24-08:00
New Revision: cf93a085754e221f73a2877c946dcb2beb6039d7

URL: 
https://github.com/llvm/llvm-project/commit/cf93a085754e221f73a2877c946dcb2beb6039d7
DIFF: 
https://github.com/llvm/llvm-project/commit/cf93a085754e221f73a2877c946dcb2beb6039d7.diff

LOG: Fixed typos in TestLldbGdbServer.py

Fixed more typos

Added: 


Modified: 
lldb/test/API/tools/lldb-server/TestLldbGdbServer.py

Removed: 




diff  --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py 
b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index c6ecaf88b1be..12f3b5886d38 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -1044,7 +1044,7 @@ def test_qSupported_returns_known_stub_features(self):
 self.assertTrue(len(supported_dict) > 0)
 
 @skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<',3'4'])
+@skipIf(dwarf_version=['<','3'])
 def test_qSupported_auvx(self):
 expected = ('+' if lldbplatformutil.getPlatform()
 in ["freebsd", "linux", "netbsd"] else '-')
@@ -1350,7 +1350,7 @@ def test_P_and_p_thread_suffix_work(self):
 @skipIfWindows # No pty support to test any inferior output
 @add_test_categories(["llgs"])
 @skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['3', '4'])
+@skipIf(dwarf_version=['<', '3'])
 def test_launch_via_A(self):
 self.build()
 exe_path = self.getBuildArtifact("a.out")
@@ -1377,7 +1377,7 @@ def test_launch_via_A(self):
 @skipIfWindows # No pty support to test any inferior output
 @add_test_categories(["llgs"])
 @skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<',3'4'])
+@skipIf(dwarf_version=['<','3'])
 def test_launch_via_vRun(self):
 self.build()
 exe_path = self.getBuildArtifact("a.out")
@@ -1421,7 +1421,7 @@ def test_launch_via_vRun_no_args(self):
 @skipIfWindows # No pty support to test any inferior output
 @add_test_categories(["llgs"])
 @skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['3', '4'])
+@skipIf(dwarf_version=['<', '3'])
 def test_QEnvironment(self):
 self.build()
 exe_path = self.getBuildArtifact("a.out")



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb][test] Remove expectedFailureIfFn (PR #81703)

2024-02-15 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

Hi @rupprecht,

It seems like this patch has still not fixed the issue in greendragon and the 
test is still flaky

https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-sanitized/

@JDevlieghere Do you have any idea as to why that is still happening?

https://github.com/llvm/llvm-project/pull/81703
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Fix `FindDirectNestedType` not working with class templates (PR #81666)

2024-02-16 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

I am going to revert this patch for now, to make sure that green dragon is up 
and running again

https://github.com/llvm/llvm-project/pull/81666
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 831ba95 - Revert "[lldb] Fix `FindDirectNestedType` not working with class templates (#81666)"

2024-02-16 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2024-02-16T11:00:35-08:00
New Revision: 831ba9540089350b740c5db61159fe23ab6872d3

URL: 
https://github.com/llvm/llvm-project/commit/831ba9540089350b740c5db61159fe23ab6872d3
DIFF: 
https://github.com/llvm/llvm-project/commit/831ba9540089350b740c5db61159fe23ab6872d3.diff

LOG: Revert "[lldb] Fix `FindDirectNestedType` not working with class templates 
(#81666)"

This reverts commit 7b7d411de9f731d2bcf6b093f6cee2cf57a5196e.

Added: 


Modified: 
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
lldb/test/API/python_api/type/TestTypeList.py
lldb/test/API/python_api/type/main.cpp

Removed: 




diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 0652ac0e134f53..a41e2c690853d2 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -2165,7 +2165,6 @@ PrintingPolicy TypeSystemClang::GetTypePrintingPolicy() {
   // (and we then would have suppressed them from the type name) and also 
setups
   // where LLDB wasn't able to reconstruct the default arguments.
   printing_policy.SuppressDefaultTemplateArgs = false;
-  printing_policy.AlwaysIncludeTypeForTemplateArgument = true;
   return printing_policy;
 }
 
@@ -9266,13 +9265,8 @@ ConstString TypeSystemClang::DeclContextGetName(void 
*opaque_decl_ctx) {
   if (opaque_decl_ctx) {
 clang::NamedDecl *named_decl =
 llvm::dyn_cast((clang::DeclContext 
*)opaque_decl_ctx);
-if (named_decl) {
-  std::string name;
-  llvm::raw_string_ostream stream{name};
-  named_decl->getNameForDiagnostic(stream, GetTypePrintingPolicy(),
-   /*qualified=*/false);
-  return ConstString(name);
-}
+if (named_decl)
+  return ConstString(named_decl->getName());
   }
   return ConstString();
 }

diff  --git a/lldb/test/API/python_api/type/TestTypeList.py 
b/lldb/test/API/python_api/type/TestTypeList.py
index 63ab958193574b..c267defb58edf9 100644
--- a/lldb/test/API/python_api/type/TestTypeList.py
+++ b/lldb/test/API/python_api/type/TestTypeList.py
@@ -150,23 +150,6 @@ def test(self):
 invalid_type = task_type.FindDirectNestedType(None)
 self.assertFalse(invalid_type)
 
-# Check that FindDirectNestedType works with types from AST
-pointer = frame0.FindVariable("pointer")
-pointer_type = pointer.GetType()
-self.assertTrue(pointer_type)
-self.DebugSBType(pointer_type)
-pointer_info_type = pointer_type.template_args[1]
-self.assertTrue(pointer_info_type)
-self.DebugSBType(pointer_info_type)
-
-pointer_masks1_type = pointer_info_type.FindDirectNestedType("Masks1")
-self.assertTrue(pointer_masks1_type)
-self.DebugSBType(pointer_masks1_type)
-
-pointer_masks2_type = pointer_info_type.FindDirectNestedType("Masks2")
-self.assertTrue(pointer_masks2_type)
-self.DebugSBType(pointer_masks2_type)
-
 # We'll now get the child member 'id' from 'task_head'.
 id = task_head.GetChildMemberWithName("id")
 self.DebugSBValue(id)

diff  --git a/lldb/test/API/python_api/type/main.cpp 
b/lldb/test/API/python_api/type/main.cpp
index 391f58e3e5871c..98de9707d88654 100644
--- a/lldb/test/API/python_api/type/main.cpp
+++ b/lldb/test/API/python_api/type/main.cpp
@@ -34,14 +34,6 @@ class Task {
 {}
 };
 
-template  struct PointerInfo {
-  enum Masks1 { pointer_mask };
-  enum class Masks2 { pointer_mask };
-};
-
-template >
-struct Pointer {};
-
 enum EnumType {};
 enum class ScopedEnumType {};
 enum class EnumUChar : unsigned char {};
@@ -79,9 +71,5 @@ int main (int argc, char const *argv[])
 ScopedEnumType scoped_enum_type;
 EnumUChar scoped_enum_type_uchar;
 
-Pointer<3> pointer;
-PointerInfo<3>::Masks1 mask1 = PointerInfo<3>::Masks1::pointer_mask;
-PointerInfo<3>::Masks2 mask2 = PointerInfo<3>::Masks2::pointer_mask;
-
 return 0; // Break at this line
 }



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Fix `FindDirectNestedType` not working with class templates (PR #81666)

2024-02-16 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

Hi @Endilll this patch has been reverted with 
831ba9540089350b740c5db61159fe23ab6872d3 to make sure the lldb bots are green.

https://github.com/llvm/llvm-project/pull/81666
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Centralize the handling of completion for simple argument lists. (PR #82085)

2024-02-19 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

@jimingham It seems like this change broke greendragon TestCompletion.py

https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/66519/

https://github.com/llvm/llvm-project/pull/82085
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 9ed8b27 - Revert "Centralize the handling of completion for simple argument lists. (#82085)"

2024-02-19 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2024-02-19T18:19:59-08:00
New Revision: 9ed8b272c30a01c450616f0ed8b2373d5d618ebb

URL: 
https://github.com/llvm/llvm-project/commit/9ed8b272c30a01c450616f0ed8b2373d5d618ebb
DIFF: 
https://github.com/llvm/llvm-project/commit/9ed8b272c30a01c450616f0ed8b2373d5d618ebb.diff

LOG: Revert "Centralize the handling of completion for simple argument lists. 
(#82085)"

This reverts commit 21631494b068d9364b8dc8f18e59adee9131a0a5.

Reverted because of greendragon failure:

 TEST 'lldb-api :: 
functionalities/completion/TestCompletion.py' FAILED 
Script:

Added: 


Modified: 
lldb/include/lldb/Interpreter/CommandObject.h
lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h
lldb/include/lldb/lldb-enumerations.h
lldb/source/Commands/CommandObjectCommands.cpp
lldb/source/Commands/CommandObjectDWIMPrint.cpp
lldb/source/Commands/CommandObjectDWIMPrint.h
lldb/source/Commands/CommandObjectFrame.cpp
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectPlugin.cpp
lldb/source/Commands/CommandObjectProcess.cpp
lldb/source/Commands/CommandObjectRegister.cpp
lldb/source/Commands/CommandObjectSession.cpp
lldb/source/Commands/CommandObjectSettings.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Commands/CommandObjectType.cpp
lldb/source/Commands/CommandObjectWatchpoint.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/test/API/commands/help/TestHelp.py

Removed: 




diff  --git a/lldb/include/lldb/Interpreter/CommandObject.h 
b/lldb/include/lldb/Interpreter/CommandObject.h
index a326c6dc38a37a..b99de56f534469 100644
--- a/lldb/include/lldb/Interpreter/CommandObject.h
+++ b/lldb/include/lldb/Interpreter/CommandObject.h
@@ -242,13 +242,6 @@ class CommandObject : public 
std::enable_shared_from_this {
   ///The completion request that needs to be answered.
   virtual void HandleCompletion(CompletionRequest &request);
 
-  /// The default version handles argument definitions that have only one
-  /// argument type, and use one of the argument types that have an entry in
-  /// the CommonCompletions.  Override this if you have a more complex
-  /// argument setup.
-  /// FIXME: we should be able to extend this to more complex argument
-  /// definitions provided we have completers for all the argument types.
-  ///
   /// The input array contains a parsed version of the line.
   ///
   /// We've constructed the map of options and their arguments as well if that
@@ -258,7 +251,7 @@ class CommandObject : public 
std::enable_shared_from_this {
   ///The completion request that needs to be answered.
   virtual void
   HandleArgumentCompletion(CompletionRequest &request,
-   OptionElementVector &opt_element_vector);
+   OptionElementVector &opt_element_vector) {}
 
   bool HelpTextContainsWord(llvm::StringRef search_word,
 bool search_short_help = true,

diff  --git a/lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h 
b/lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h
index ab5eff699b4cf0..d0cf54c31ca73f 100644
--- a/lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h
+++ b/lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h
@@ -243,7 +243,7 @@ static constexpr CommandObject::ArgumentTableEntry 
g_argument_table[] = {
 { lldb::eArgTypeLogCategory, "log-category", 
lldb::CompletionType::eNoCompletion, {}, { nullptr, false }, "The name of a 
category within a log channel, e.g. all (try \"log list\" to see a list of all 
channels and their categories." },
 { lldb::eArgTypeLogChannel, "log-channel", 
lldb::CompletionType::eNoCompletion, {}, { nullptr, false }, "The name of a log 
channel, e.g. process.gdb-remote (try \"log list\" to see a list of all 
channels and their categories)." },
 { lldb::eArgTypeMethod, "method", lldb::CompletionType::eNoCompletion, {}, 
{ nullptr, false }, "A C++ method name." },
-{ lldb::eArgTypeName, "name", lldb::eTypeCategoryNameCompletion, {}, { 
nullptr, false }, "The name of a type category." },
+{ lldb::eArgTypeName, "name", lldb::eTypeCategoryNameCompletion, {}, { 
nullptr, false }, "Help text goes here." },
 { lldb::eArgTypeNewPathPrefix, "new-path-prefix", 
lldb::CompletionType::eNoCompletion, {}, { nullptr, false }, "Help text goes 
here." },
 { lldb::eArgTypeNumLines, "num-lines", 
lldb::CompletionType::eNoCompletion, {}, { nullptr, false }, "The number of 
lines to use." },
 { lldb::eArgTypeNumberPerLine, "number-per-line", 
lldb::CompletionType::eNoCompletion, {}, { nullptr, false }, "The number of 
items per line to display." },
@@ -262,7 +262,7 @@ static constexpr CommandObject::ArgumentTableEntry 
g_argument_table[] = {
 { 

[Lldb-commits] [lldb] 7dde942 - Remove the dependency between lib/DebugInfoDWARF and MC.

2022-12-14 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-12-14T18:16:46-08:00
New Revision: 7dde94251e1c9e4634f5d51d41f2d4a191258fb3

URL: 
https://github.com/llvm/llvm-project/commit/7dde94251e1c9e4634f5d51d41f2d4a191258fb3
DIFF: 
https://github.com/llvm/llvm-project/commit/7dde94251e1c9e4634f5d51d41f2d4a191258fb3.diff

LOG: Remove the dependency between lib/DebugInfoDWARF and MC.

Differential Revision: https://reviews.llvm.org/D134817

Added: 


Modified: 
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Symbol/UnwindPlan.cpp
lldb/unittests/Symbol/PostfixExpressionTest.cpp
lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
llvm/include/llvm/DebugInfo/DIContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
llvm/lib/DebugInfo/DWARF/CMakeLists.txt
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
llvm/lib/DebugInfo/LogicalView/Readers/LVELFReader.cpp
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
llvm/tools/llvm-objdump/SourcePrinter.cpp
llvm/tools/llvm-objdump/SourcePrinter.h
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Removed: 




diff  --git a/lldb/source/Expression/DWARFExpression.cpp 
b/lldb/source/Expression/DWARFExpression.cpp
index d6029aa137092..6842c7a11bcdb 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -70,8 +70,7 @@ void DWARFExpression::UpdateValue(uint64_t const_value,
 void DWARFExpression::DumpLocation(Stream *s, lldb::DescriptionLevel level,
ABI *abi) const {
   llvm::DWARFExpression(m_data.GetAsLLVM(), m_data.GetAddressByteSize())
-  .print(s->AsRawOstream(), llvm::DIDumpOptions(),
- abi ? &abi->GetMCRegisterInfo() : nullptr, nullptr);
+  .print(s->AsRawOstream(), llvm::DIDumpOptions(), nullptr);
 }
 
 RegisterKind DWARFExpression::GetRegisterKind() const { return m_reg_kind; }

diff  --git a/lldb/source/Symbol/UnwindPlan.cpp 
b/lldb/source/Symbol/UnwindPlan.cpp
index 51301e4ee43fb..eace7c4f32466 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -84,7 +84,7 @@ static void DumpDWARFExpr(Stream &s, llvm::ArrayRef 
expr, Thread *threa
 llvm::DataExtractor data(expr, order_and_width->first == eByteOrderLittle,
  order_and_width->second);
 llvm::DWARFExpression(data, order_and_width->second, llvm::dwarf::DWARF32)
-.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr, nullptr);
+.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr);
   } else
 s.PutCString("dwarf-expr");
 }

diff  --git a/lldb/unittests/Symbol/PostfixExpressionTest.cpp 
b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
index 4d4706d60602d..0eaa9d829a656 100644
--- a/lldb/unittests/Symbol/PostfixExpressionTest.cpp
+++ b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
@@ -159,7 +159,7 @@ static std::string ParseAndGenerateDWARF(llvm::StringRef 
expr) {
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, addr_size, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr, nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr);
   return std::move(os.str());
 }
 

diff  --git 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
index 730afb3fbedee..270cc8e56b7a0 100644
--- 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
+++ 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
@@ -40,7 +40,7 @@ CheckValidProgramTranslation(llvm::StringRef fpo_program,
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, /*AddressSize=*/4, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr, nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr);
 
   // actual check
   ASSERT_EQ(expected_dwarf_expression, os.str());

diff  --git a/llvm/include/llvm/DebugInfo/DIContext.h 
b/llvm/include/llvm/DebugInfo/DIContext.h
index afc2d5176ebcb..6866a6614b56b 100644
--- a/llvm/include/llvm/DebugInfo/DIContext.h
+++ b/llvm/include/llvm/DebugInfo/DIContext.h
@@ -199,6 +199,9 @@ struct DIDumpOptions {
   bool SummarizeTypes = false;
   bool Verbose = false;
   bool DisplayRawContents

[Lldb-commits] [lldb] 4283cfd - Revert "Remove the dependency between lib/DebugInfoDWARF and MC."

2022-12-14 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-12-14T18:32:18-08:00
New Revision: 4283cfdc1116725d951660a01104cf4cd98e8453

URL: 
https://github.com/llvm/llvm-project/commit/4283cfdc1116725d951660a01104cf4cd98e8453
DIFF: 
https://github.com/llvm/llvm-project/commit/4283cfdc1116725d951660a01104cf4cd98e8453.diff

LOG: Revert "Remove the dependency between lib/DebugInfoDWARF and MC."

This reverts commit 7dde94251e1c9e4634f5d51d41f2d4a191258fb3.

Because of test failures:

  lldb-shell :: SymbolFile/DWARF/x86/DW_AT_loclists_base.s
  lldb-shell :: SymbolFile/DWARF/x86/debug_loc.s
  lldb-shell :: SymbolFile/DWARF/x86/debug_loc_and_loclists.s
  lldb-shell :: SymbolFile/DWARF/x86/debug_loclists-dwo.s
  lldb-shell :: SymbolFile/DWARF/x86/debug_loclists-dwp.s
  lldb-shell :: SymbolFile/DWARF/x86/dwp.s
  lldb-shell :: SymbolFile/DWARF/x86/unused-inlined-params.test
  lldb-shell :: SymbolFile/NativePDB/inline_sites.test
  lldb-shell :: SymbolFile/NativePDB/local-variables-registers.s
  lldb-shell :: SymbolFile/NativePDB/nested-blocks-same-address.s

Added: 


Modified: 
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Symbol/UnwindPlan.cpp
lldb/unittests/Symbol/PostfixExpressionTest.cpp
lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
llvm/include/llvm/DebugInfo/DIContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
llvm/lib/DebugInfo/DWARF/CMakeLists.txt
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
llvm/lib/DebugInfo/LogicalView/Readers/LVELFReader.cpp
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
llvm/tools/llvm-objdump/SourcePrinter.cpp
llvm/tools/llvm-objdump/SourcePrinter.h
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Removed: 




diff  --git a/lldb/source/Expression/DWARFExpression.cpp 
b/lldb/source/Expression/DWARFExpression.cpp
index 6842c7a11bcdb..d6029aa137092 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -70,7 +70,8 @@ void DWARFExpression::UpdateValue(uint64_t const_value,
 void DWARFExpression::DumpLocation(Stream *s, lldb::DescriptionLevel level,
ABI *abi) const {
   llvm::DWARFExpression(m_data.GetAsLLVM(), m_data.GetAddressByteSize())
-  .print(s->AsRawOstream(), llvm::DIDumpOptions(), nullptr);
+  .print(s->AsRawOstream(), llvm::DIDumpOptions(),
+ abi ? &abi->GetMCRegisterInfo() : nullptr, nullptr);
 }
 
 RegisterKind DWARFExpression::GetRegisterKind() const { return m_reg_kind; }

diff  --git a/lldb/source/Symbol/UnwindPlan.cpp 
b/lldb/source/Symbol/UnwindPlan.cpp
index eace7c4f32466..51301e4ee43fb 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -84,7 +84,7 @@ static void DumpDWARFExpr(Stream &s, llvm::ArrayRef 
expr, Thread *threa
 llvm::DataExtractor data(expr, order_and_width->first == eByteOrderLittle,
  order_and_width->second);
 llvm::DWARFExpression(data, order_and_width->second, llvm::dwarf::DWARF32)
-.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr);
+.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr, nullptr);
   } else
 s.PutCString("dwarf-expr");
 }

diff  --git a/lldb/unittests/Symbol/PostfixExpressionTest.cpp 
b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
index 0eaa9d829a656..4d4706d60602d 100644
--- a/lldb/unittests/Symbol/PostfixExpressionTest.cpp
+++ b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
@@ -159,7 +159,7 @@ static std::string ParseAndGenerateDWARF(llvm::StringRef 
expr) {
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, addr_size, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr, nullptr);
   return std::move(os.str());
 }
 

diff  --git 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
index 270cc8e56b7a0..730afb3fbedee 100644
--- 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
+++ 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
@@ -40,7 +40,7 @@ CheckValidProgramTranslation(llvm::StringRef fpo_program,
   std::string result;
   llvm::raw_string_ostream os(resul

[Lldb-commits] [lldb] 617ed4f - Remove the dependency between lib/DebugInfoDWARF and MC.

2022-12-15 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-12-15T18:23:27-08:00
New Revision: 617ed4f061999025287b424c39fd99c5fe1e5126

URL: 
https://github.com/llvm/llvm-project/commit/617ed4f061999025287b424c39fd99c5fe1e5126
DIFF: 
https://github.com/llvm/llvm-project/commit/617ed4f061999025287b424c39fd99c5fe1e5126.diff

LOG: Remove the dependency between lib/DebugInfoDWARF and MC.

Differential Revision: https://reviews.llvm.org/D134817

Added: 


Modified: 
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Symbol/UnwindPlan.cpp
lldb/unittests/Symbol/PostfixExpressionTest.cpp
lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
llvm/include/llvm/DebugInfo/DIContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
llvm/lib/DebugInfo/DWARF/CMakeLists.txt
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
llvm/lib/DebugInfo/LogicalView/Readers/LVELFReader.cpp
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
llvm/tools/llvm-objdump/SourcePrinter.cpp
llvm/tools/llvm-objdump/SourcePrinter.h
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Removed: 




diff  --git a/lldb/source/Expression/DWARFExpression.cpp 
b/lldb/source/Expression/DWARFExpression.cpp
index d6029aa137092..a60ac41b32922 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -69,9 +69,21 @@ void DWARFExpression::UpdateValue(uint64_t const_value,
 
 void DWARFExpression::DumpLocation(Stream *s, lldb::DescriptionLevel level,
ABI *abi) const {
+  auto *MCRegInfo = abi ? &abi->GetMCRegisterInfo() : nullptr;
+  auto GetRegName = [&MCRegInfo](uint64_t DwarfRegNum,
+ bool IsEH) -> llvm::StringRef {
+if (!MCRegInfo)
+  return {};
+if (std::optional LLVMRegNum =
+MCRegInfo->getLLVMRegNum(DwarfRegNum, IsEH))
+  if (const char *RegName = MCRegInfo->getName(*LLVMRegNum))
+return llvm::StringRef(RegName);
+return {};
+  };
+  llvm::DIDumpOptions DumpOpts;
+  DumpOpts.GetNameForDWARFReg = GetRegName;
   llvm::DWARFExpression(m_data.GetAsLLVM(), m_data.GetAddressByteSize())
-  .print(s->AsRawOstream(), llvm::DIDumpOptions(),
- abi ? &abi->GetMCRegisterInfo() : nullptr, nullptr);
+  .print(s->AsRawOstream(), DumpOpts, nullptr);
 }
 
 RegisterKind DWARFExpression::GetRegisterKind() const { return m_reg_kind; }

diff  --git a/lldb/source/Symbol/UnwindPlan.cpp 
b/lldb/source/Symbol/UnwindPlan.cpp
index 51301e4ee43fb..eace7c4f32466 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -84,7 +84,7 @@ static void DumpDWARFExpr(Stream &s, llvm::ArrayRef 
expr, Thread *threa
 llvm::DataExtractor data(expr, order_and_width->first == eByteOrderLittle,
  order_and_width->second);
 llvm::DWARFExpression(data, order_and_width->second, llvm::dwarf::DWARF32)
-.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr, nullptr);
+.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr);
   } else
 s.PutCString("dwarf-expr");
 }

diff  --git a/lldb/unittests/Symbol/PostfixExpressionTest.cpp 
b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
index 4d4706d60602d..0eaa9d829a656 100644
--- a/lldb/unittests/Symbol/PostfixExpressionTest.cpp
+++ b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
@@ -159,7 +159,7 @@ static std::string ParseAndGenerateDWARF(llvm::StringRef 
expr) {
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, addr_size, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr, nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr);
   return std::move(os.str());
 }
 

diff  --git 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
index 730afb3fbedee..270cc8e56b7a0 100644
--- 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
+++ 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
@@ -40,7 +40,7 @@ CheckValidProgramTranslation(llvm::StringRef fpo_program,
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, /*AddressSize=*/4, llvm::dwarf::DWARF32)
-  .print(os, llvm::

[Lldb-commits] [lldb] 0008990 - Remove the dependency between lib/DebugInfoDWARF and MC.

2022-10-06 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-10-06T09:25:57-07:00
New Revision: 0008990479a2daf587c2a4f274384b2fb87247fb

URL: 
https://github.com/llvm/llvm-project/commit/0008990479a2daf587c2a4f274384b2fb87247fb
DIFF: 
https://github.com/llvm/llvm-project/commit/0008990479a2daf587c2a4f274384b2fb87247fb.diff

LOG: Remove the dependency between lib/DebugInfoDWARF and MC.

Differential Revision: https://reviews.llvm.org/D134817

Added: 


Modified: 
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Symbol/UnwindPlan.cpp
lldb/unittests/Symbol/PostfixExpressionTest.cpp
lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
llvm/include/llvm/DebugInfo/DIContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
llvm/lib/DebugInfo/DWARF/CMakeLists.txt
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
llvm/tools/llvm-objdump/SourcePrinter.cpp
llvm/tools/llvm-objdump/SourcePrinter.h
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Removed: 




diff  --git a/lldb/source/Expression/DWARFExpression.cpp 
b/lldb/source/Expression/DWARFExpression.cpp
index 1ccda944cd013..5284d946dac84 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -69,9 +69,21 @@ void DWARFExpression::UpdateValue(uint64_t const_value,
 
 void DWARFExpression::DumpLocation(Stream *s, lldb::DescriptionLevel level,
ABI *abi) const {
+  std::function GetRegName;
+  if (abi) {
+auto RegInfo = abi->GetMCRegisterInfo();
+GetRegName = [RegInfo](uint64_t DwarfRegNum, bool IsEH) -> llvm::StringRef 
{
+  if (llvm::Optional LLVMRegNum =
+  RegInfo.getLLVMRegNum(DwarfRegNum, IsEH))
+if (const char *RegName = RegInfo.getName(*LLVMRegNum))
+  return llvm::StringRef(RegName);
+  return {};
+};
+  }
+  auto DumpOpts = llvm::DIDumpOptions();
+  DumpOpts.GetNameForDWARFReg = GetRegName;
   llvm::DWARFExpression(m_data.GetAsLLVM(), m_data.GetAddressByteSize())
-  .print(s->AsRawOstream(), llvm::DIDumpOptions(),
- abi ? &abi->GetMCRegisterInfo() : nullptr, nullptr);
+  .print(s->AsRawOstream(), DumpOpts, nullptr);
 }
 
 RegisterKind DWARFExpression::GetRegisterKind() const { return m_reg_kind; }

diff  --git a/lldb/source/Symbol/UnwindPlan.cpp 
b/lldb/source/Symbol/UnwindPlan.cpp
index bd4690547c6bd..8ca03344d43a4 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -84,7 +84,7 @@ static void DumpDWARFExpr(Stream &s, llvm::ArrayRef 
expr, Thread *threa
 llvm::DataExtractor data(expr, order_and_width->first == eByteOrderLittle,
  order_and_width->second);
 llvm::DWARFExpression(data, order_and_width->second, llvm::dwarf::DWARF32)
-.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr, nullptr);
+.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr);
   } else
 s.PutCString("dwarf-expr");
 }

diff  --git a/lldb/unittests/Symbol/PostfixExpressionTest.cpp 
b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
index 4d4706d60602d..0eaa9d829a656 100644
--- a/lldb/unittests/Symbol/PostfixExpressionTest.cpp
+++ b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
@@ -159,7 +159,7 @@ static std::string ParseAndGenerateDWARF(llvm::StringRef 
expr) {
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, addr_size, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr, nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr);
   return std::move(os.str());
 }
 

diff  --git 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
index 730afb3fbedee..270cc8e56b7a0 100644
--- 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
+++ 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
@@ -40,7 +40,7 @@ CheckValidProgramTranslation(llvm::StringRef fpo_program,
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, /*AddressSize=*/4, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr, nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr);
 
  

[Lldb-commits] [lldb] 870b74d - Revert "Remove the dependency between lib/DebugInfoDWARF and MC."

2022-10-06 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-10-06T09:30:46-07:00
New Revision: 870b74d59052143c6e3a3e70d6e5c17cd43ff58f

URL: 
https://github.com/llvm/llvm-project/commit/870b74d59052143c6e3a3e70d6e5c17cd43ff58f
DIFF: 
https://github.com/llvm/llvm-project/commit/870b74d59052143c6e3a3e70d6e5c17cd43ff58f.diff

LOG: Revert "Remove the dependency between lib/DebugInfoDWARF and MC."

This reverts commit 0008990479a2daf587c2a4f274384b2fb87247fb.

Added: 


Modified: 
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Symbol/UnwindPlan.cpp
lldb/unittests/Symbol/PostfixExpressionTest.cpp
lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
llvm/include/llvm/DebugInfo/DIContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
llvm/lib/DebugInfo/DWARF/CMakeLists.txt
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
llvm/tools/llvm-objdump/SourcePrinter.cpp
llvm/tools/llvm-objdump/SourcePrinter.h
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Removed: 




diff  --git a/lldb/source/Expression/DWARFExpression.cpp 
b/lldb/source/Expression/DWARFExpression.cpp
index 5284d946dac84..1ccda944cd013 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -69,21 +69,9 @@ void DWARFExpression::UpdateValue(uint64_t const_value,
 
 void DWARFExpression::DumpLocation(Stream *s, lldb::DescriptionLevel level,
ABI *abi) const {
-  std::function GetRegName;
-  if (abi) {
-auto RegInfo = abi->GetMCRegisterInfo();
-GetRegName = [RegInfo](uint64_t DwarfRegNum, bool IsEH) -> llvm::StringRef 
{
-  if (llvm::Optional LLVMRegNum =
-  RegInfo.getLLVMRegNum(DwarfRegNum, IsEH))
-if (const char *RegName = RegInfo.getName(*LLVMRegNum))
-  return llvm::StringRef(RegName);
-  return {};
-};
-  }
-  auto DumpOpts = llvm::DIDumpOptions();
-  DumpOpts.GetNameForDWARFReg = GetRegName;
   llvm::DWARFExpression(m_data.GetAsLLVM(), m_data.GetAddressByteSize())
-  .print(s->AsRawOstream(), DumpOpts, nullptr);
+  .print(s->AsRawOstream(), llvm::DIDumpOptions(),
+ abi ? &abi->GetMCRegisterInfo() : nullptr, nullptr);
 }
 
 RegisterKind DWARFExpression::GetRegisterKind() const { return m_reg_kind; }

diff  --git a/lldb/source/Symbol/UnwindPlan.cpp 
b/lldb/source/Symbol/UnwindPlan.cpp
index 8ca03344d43a4..bd4690547c6bd 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -84,7 +84,7 @@ static void DumpDWARFExpr(Stream &s, llvm::ArrayRef 
expr, Thread *threa
 llvm::DataExtractor data(expr, order_and_width->first == eByteOrderLittle,
  order_and_width->second);
 llvm::DWARFExpression(data, order_and_width->second, llvm::dwarf::DWARF32)
-.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr);
+.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr, nullptr);
   } else
 s.PutCString("dwarf-expr");
 }

diff  --git a/lldb/unittests/Symbol/PostfixExpressionTest.cpp 
b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
index 0eaa9d829a656..4d4706d60602d 100644
--- a/lldb/unittests/Symbol/PostfixExpressionTest.cpp
+++ b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
@@ -159,7 +159,7 @@ static std::string ParseAndGenerateDWARF(llvm::StringRef 
expr) {
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, addr_size, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr, nullptr);
   return std::move(os.str());
 }
 

diff  --git 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
index 270cc8e56b7a0..730afb3fbedee 100644
--- 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
+++ 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
@@ -40,7 +40,7 @@ CheckValidProgramTranslation(llvm::StringRef fpo_program,
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, /*AddressSize=*/4, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr,

[Lldb-commits] [lldb] d96ade0 - Remove the dependency between lib/DebugInfoDWARF and MC.

2022-10-06 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-10-06T14:46:01-07:00
New Revision: d96ade00c3c96bd451c60e34a17e613cdd5fdc38

URL: 
https://github.com/llvm/llvm-project/commit/d96ade00c3c96bd451c60e34a17e613cdd5fdc38
DIFF: 
https://github.com/llvm/llvm-project/commit/d96ade00c3c96bd451c60e34a17e613cdd5fdc38.diff

LOG: Remove the dependency between lib/DebugInfoDWARF and MC.

This patch had to be reverted because on gcc 7.5.0 we see an error converting 
from std::unique_ptr to 
Expected> as the return type for the function 
createRegInfo. This has now been fixed.

Added: 


Modified: 
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Symbol/UnwindPlan.cpp
lldb/unittests/Symbol/PostfixExpressionTest.cpp
lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
llvm/include/llvm/DebugInfo/DIContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
llvm/lib/DebugInfo/DWARF/CMakeLists.txt
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
llvm/tools/llvm-objdump/SourcePrinter.cpp
llvm/tools/llvm-objdump/SourcePrinter.h
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Removed: 




diff  --git a/lldb/source/Expression/DWARFExpression.cpp 
b/lldb/source/Expression/DWARFExpression.cpp
index 1ccda944cd013..5284d946dac84 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -69,9 +69,21 @@ void DWARFExpression::UpdateValue(uint64_t const_value,
 
 void DWARFExpression::DumpLocation(Stream *s, lldb::DescriptionLevel level,
ABI *abi) const {
+  std::function GetRegName;
+  if (abi) {
+auto RegInfo = abi->GetMCRegisterInfo();
+GetRegName = [RegInfo](uint64_t DwarfRegNum, bool IsEH) -> llvm::StringRef 
{
+  if (llvm::Optional LLVMRegNum =
+  RegInfo.getLLVMRegNum(DwarfRegNum, IsEH))
+if (const char *RegName = RegInfo.getName(*LLVMRegNum))
+  return llvm::StringRef(RegName);
+  return {};
+};
+  }
+  auto DumpOpts = llvm::DIDumpOptions();
+  DumpOpts.GetNameForDWARFReg = GetRegName;
   llvm::DWARFExpression(m_data.GetAsLLVM(), m_data.GetAddressByteSize())
-  .print(s->AsRawOstream(), llvm::DIDumpOptions(),
- abi ? &abi->GetMCRegisterInfo() : nullptr, nullptr);
+  .print(s->AsRawOstream(), DumpOpts, nullptr);
 }
 
 RegisterKind DWARFExpression::GetRegisterKind() const { return m_reg_kind; }

diff  --git a/lldb/source/Symbol/UnwindPlan.cpp 
b/lldb/source/Symbol/UnwindPlan.cpp
index bd4690547c6bd..8ca03344d43a4 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -84,7 +84,7 @@ static void DumpDWARFExpr(Stream &s, llvm::ArrayRef 
expr, Thread *threa
 llvm::DataExtractor data(expr, order_and_width->first == eByteOrderLittle,
  order_and_width->second);
 llvm::DWARFExpression(data, order_and_width->second, llvm::dwarf::DWARF32)
-.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr, nullptr);
+.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr);
   } else
 s.PutCString("dwarf-expr");
 }

diff  --git a/lldb/unittests/Symbol/PostfixExpressionTest.cpp 
b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
index 4d4706d60602d..0eaa9d829a656 100644
--- a/lldb/unittests/Symbol/PostfixExpressionTest.cpp
+++ b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
@@ -159,7 +159,7 @@ static std::string ParseAndGenerateDWARF(llvm::StringRef 
expr) {
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, addr_size, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr, nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr);
   return std::move(os.str());
 }
 

diff  --git 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
index 730afb3fbedee..270cc8e56b7a0 100644
--- 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
+++ 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
@@ -40,7 +40,7 @@ CheckValidProgramTranslation(llvm::StringRef fpo_program,
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, /*AddressSize=*/4, ll

[Lldb-commits] [lldb] f491b89 - Revert "Remove the dependency between lib/DebugInfoDWARF and MC."

2022-10-06 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2022-10-06T14:58:34-07:00
New Revision: f491b898c5d1312112d14f02d9cbdea7a4b4dc9d

URL: 
https://github.com/llvm/llvm-project/commit/f491b898c5d1312112d14f02d9cbdea7a4b4dc9d
DIFF: 
https://github.com/llvm/llvm-project/commit/f491b898c5d1312112d14f02d9cbdea7a4b4dc9d.diff

LOG: Revert "Remove the dependency between lib/DebugInfoDWARF and MC."

This reverts commit d96ade00c3c96bd451c60e34a17e613cdd5fdc38.

Added: 


Modified: 
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Symbol/UnwindPlan.cpp
lldb/unittests/Symbol/PostfixExpressionTest.cpp
lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
llvm/include/llvm/DebugInfo/DIContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
llvm/lib/DebugInfo/DWARF/CMakeLists.txt
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
llvm/tools/llvm-objdump/SourcePrinter.cpp
llvm/tools/llvm-objdump/SourcePrinter.h
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Removed: 




diff  --git a/lldb/source/Expression/DWARFExpression.cpp 
b/lldb/source/Expression/DWARFExpression.cpp
index 5284d946dac84..1ccda944cd013 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -69,21 +69,9 @@ void DWARFExpression::UpdateValue(uint64_t const_value,
 
 void DWARFExpression::DumpLocation(Stream *s, lldb::DescriptionLevel level,
ABI *abi) const {
-  std::function GetRegName;
-  if (abi) {
-auto RegInfo = abi->GetMCRegisterInfo();
-GetRegName = [RegInfo](uint64_t DwarfRegNum, bool IsEH) -> llvm::StringRef 
{
-  if (llvm::Optional LLVMRegNum =
-  RegInfo.getLLVMRegNum(DwarfRegNum, IsEH))
-if (const char *RegName = RegInfo.getName(*LLVMRegNum))
-  return llvm::StringRef(RegName);
-  return {};
-};
-  }
-  auto DumpOpts = llvm::DIDumpOptions();
-  DumpOpts.GetNameForDWARFReg = GetRegName;
   llvm::DWARFExpression(m_data.GetAsLLVM(), m_data.GetAddressByteSize())
-  .print(s->AsRawOstream(), DumpOpts, nullptr);
+  .print(s->AsRawOstream(), llvm::DIDumpOptions(),
+ abi ? &abi->GetMCRegisterInfo() : nullptr, nullptr);
 }
 
 RegisterKind DWARFExpression::GetRegisterKind() const { return m_reg_kind; }

diff  --git a/lldb/source/Symbol/UnwindPlan.cpp 
b/lldb/source/Symbol/UnwindPlan.cpp
index 8ca03344d43a4..bd4690547c6bd 100644
--- a/lldb/source/Symbol/UnwindPlan.cpp
+++ b/lldb/source/Symbol/UnwindPlan.cpp
@@ -84,7 +84,7 @@ static void DumpDWARFExpr(Stream &s, llvm::ArrayRef 
expr, Thread *threa
 llvm::DataExtractor data(expr, order_and_width->first == eByteOrderLittle,
  order_and_width->second);
 llvm::DWARFExpression(data, order_and_width->second, llvm::dwarf::DWARF32)
-.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr);
+.print(s.AsRawOstream(), llvm::DIDumpOptions(), nullptr, nullptr);
   } else
 s.PutCString("dwarf-expr");
 }

diff  --git a/lldb/unittests/Symbol/PostfixExpressionTest.cpp 
b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
index 0eaa9d829a656..4d4706d60602d 100644
--- a/lldb/unittests/Symbol/PostfixExpressionTest.cpp
+++ b/lldb/unittests/Symbol/PostfixExpressionTest.cpp
@@ -159,7 +159,7 @@ static std::string ParseAndGenerateDWARF(llvm::StringRef 
expr) {
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, addr_size, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr, nullptr);
   return std::move(os.str());
 }
 

diff  --git 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
index 270cc8e56b7a0..730afb3fbedee 100644
--- 
a/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
+++ 
b/lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
@@ -40,7 +40,7 @@ CheckValidProgramTranslation(llvm::StringRef fpo_program,
   std::string result;
   llvm::raw_string_ostream os(result);
   llvm::DWARFExpression(extractor, /*AddressSize=*/4, llvm::dwarf::DWARF32)
-  .print(os, llvm::DIDumpOptions(), nullptr);
+  .print(os, llvm::DIDumpOptions(), nullptr,

[Lldb-commits] [lldb] [lldb] Improve unwinding for discontinuous functions (PR #111409)

2024-10-14 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

Hi this patch broke Unwind/trap_frame_sym_ctx.test in greendragon, you can see 
the link to the failing build here: 
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/6724/consoleFull#-1880437047d6fdb6cb-f376-4f2e-8bce-d31c7304698b

I will be reverting this change to make sure green dragon is up and running 
again

https://github.com/llvm/llvm-project/pull/111409
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] d8de239 - Revert "[lldb] Improve unwinding for discontinuous functions (#111409)"

2024-10-14 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2024-10-14T15:27:05-07:00
New Revision: d8de2391eb014fb3f750f4c38abc101edc1e2cc2

URL: 
https://github.com/llvm/llvm-project/commit/d8de2391eb014fb3f750f4c38abc101edc1e2cc2
DIFF: 
https://github.com/llvm/llvm-project/commit/d8de2391eb014fb3f750f4c38abc101edc1e2cc2.diff

LOG: Revert "[lldb] Improve unwinding for discontinuous functions (#111409)"

This reverts commit a89e01634fe2e6ce0b967ead24280b6693b523dc.

This is being reverted because it broke the test:

Unwind/trap_frame_sym_ctx.test

/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake/llvm-project/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test:21:10:
 error: CHECK: expected string not found in input
 CHECK: frame #2: {{.*}}`main

Added: 


Modified: 
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Symbol/UnwindTable.cpp

Removed: 
lldb/test/Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s
lldb/test/Shell/Unwind/Inputs/linux-x86_64.yaml
lldb/test/Shell/Unwind/basic-block-sections-with-dwarf-static.test
lldb/test/Shell/Unwind/basic-block-sections-with-dwarf.test



diff  --git a/lldb/source/Commands/CommandObjectTarget.cpp 
b/lldb/source/Commands/CommandObjectTarget.cpp
index 9a4a17eaa124ce..e950fb346c253b 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -3583,12 +3583,10 @@ class CommandObjectTargetModulesShowUnwind : public 
CommandObjectParsed {
   addr_t start_addr = range.GetBaseAddress().GetLoadAddress(target);
   if (abi)
 start_addr = abi->FixCodeAddress(start_addr);
-  range.GetBaseAddress().SetLoadAddress(start_addr, target);
 
   FuncUnwindersSP func_unwinders_sp(
   sc.module_sp->GetUnwindTable()
-  
.GetUncachedFuncUnwindersContainingAddress(range.GetBaseAddress(),
- sc));
+  .GetUncachedFuncUnwindersContainingAddress(start_addr, sc));
   if (!func_unwinders_sp)
 continue;
 

diff  --git a/lldb/source/Symbol/UnwindTable.cpp 
b/lldb/source/Symbol/UnwindTable.cpp
index 42ab7ba95b9e6c..da88b0c9c4ea19 100644
--- a/lldb/source/Symbol/UnwindTable.cpp
+++ b/lldb/source/Symbol/UnwindTable.cpp
@@ -99,6 +99,12 @@ UnwindTable::GetAddressRange(const Address &addr, const 
SymbolContext &sc) {
   m_object_file_unwind_up->GetAddressRange(addr, range))
 return range;
 
+  // Check the symbol context
+  if (sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, 0,
+ false, range) &&
+  range.GetBaseAddress().IsValid())
+return range;
+
   // Does the eh_frame unwind info has a function bounds for this addr?
   if (m_eh_frame_up && m_eh_frame_up->GetAddressRange(addr, range))
 return range;
@@ -107,12 +113,6 @@ UnwindTable::GetAddressRange(const Address &addr, const 
SymbolContext &sc) {
   if (m_debug_frame_up && m_debug_frame_up->GetAddressRange(addr, range))
 return range;
 
-  // Check the symbol context
-  if (sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, 0,
- false, range) &&
-  range.GetBaseAddress().IsValid())
-return range;
-
   return std::nullopt;
 }
 

diff  --git a/lldb/test/Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s 
b/lldb/test/Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s
deleted file mode 100644
index c405e51c227cb6..00
--- a/lldb/test/Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s
+++ /dev/null
@@ -1,256 +0,0 @@
-# An example of a function which has been split into two parts. Roughly
-# corresponds to this C code.
-# int baz() { return 47; }
-# int bar() { return foo(0); }
-# int foo(int flag) { return flag ? bar() : baz(); }
-# int main() { return foo(1); }
-# The function bar has been placed "in the middle" of foo.
-
-.text
-
-.type   baz,@function
-baz:
-.cfi_startproc
-movl$47, %eax
-retq
-.cfi_endproc
-.Lbaz_end:
-.size   baz, .Lbaz_end-baz
-
-.type   foo,@function
-foo:
-.cfi_startproc
-pushq   %rbp
-.cfi_def_cfa_offset 16
-.cfi_offset %rbp, -16
-movq%rsp, %rbp
-.cfi_def_cfa_register %rbp
-subq$16, %rsp
-movl%edi, -8(%rbp)
-cmpl$0, -8(%rbp)
-je  foo.__part.2
-jmp foo.__part.1
-.cfi_endproc
-.Lfoo_end:
-.size   foo, .Lfoo_end-foo
-
-foo.__part.1:
-.cfi_startproc
-.cfi_def_cfa %rbp, 16
-.cfi_offset %rbp, -16
-callq   bar
-movl%eax, -4(%rbp)
-jmp foo.__part.3
-.Lfoo.__part.1_end:
-.size   foo.__part.1, .Lfoo.__part.1_end-foo.__part.1
-.cfi_endproc
-
-bar:
-.cfi_startproc
-# NB: Decrease the stack pointer to make the unwind info for this function
-# 
diff erent from the surroun

[Lldb-commits] [lldb] [lldb] Fix crash missing MSInheritanceAttr on CXXRecordDecl with DWARF on Windows (PR #112928)

2024-10-24 Thread Shubham Sandeep Rastogi via lldb-commits
Stefan =?utf-8?q?Gränitz?= ,
Stefan =?utf-8?q?Gränitz?= ,
Stefan =?utf-8?q?Gränitz?= ,
Stefan =?utf-8?q?Gränitz?= ,
Stefan =?utf-8?q?Gränitz?= ,
Stefan =?utf-8?q?Gränitz?= 
Message-ID:
In-Reply-To: 


rastogishubham wrote:

@weliveindetail thanks for the fix! I was at the llvm dev meeting so I was slow 
to respond. The bots are still green so we are good!

https://github.com/llvm/llvm-project/pull/112928
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Fix crash missing MSInheritanceAttr on CXXRecordDecl with DWARF on Windows (PR #112928)

2024-10-23 Thread Shubham Sandeep Rastogi via lldb-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= 
Message-ID:
In-Reply-To: 


rastogishubham wrote:

I reverted this change with https://github.com/llvm/llvm-project/pull/113498

https://github.com/llvm/llvm-project/pull/112928
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Revert "[lldb] Fix crash missing MSInheritanceAttr on CXXRecordDecl with DWARF on Windows" (PR #113498)

2024-10-23 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham closed 
https://github.com/llvm/llvm-project/pull/113498
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Revert "[lldb] Fix crash missing MSInheritanceAttr on CXXRecordDecl with DWARF on Windows" (PR #113498)

2024-10-23 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham created 
https://github.com/llvm/llvm-project/pull/113498

Reverts llvm/llvm-project#112928

This is because it broke greendragon: SymbolFile/DWARF/x86/member-pointers.cpp

>From 565b370162888c91e82bd5c9a8787bbc4942219c Mon Sep 17 00:00:00 2001
From: Shubham Sandeep Rastogi 
Date: Wed, 23 Oct 2024 14:30:35 -0700
Subject: [PATCH] =?UTF-8?q?Revert=20"[lldb]=20Fix=20crash=20missing=20MSIn?=
 =?UTF-8?q?heritanceAttr=20with=20DWARF=20on=20Windows=20(#11=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 699ce16b6284377e0cd9969b9f95e7367632a622.
---
 .../TypeSystem/Clang/TypeSystemClang.cpp  |  3 ---
 .../SymbolFile/DWARF/x86/member-pointers.cpp  | 24 ---
 2 files changed, 27 deletions(-)
 delete mode 100644 lldb/test/Shell/SymbolFile/DWARF/x86/member-pointers.cpp

diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index f5063175d6e070..a57cd8efce8a11 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -2771,9 +2771,6 @@ static bool GetCompleteQualType(clang::ASTContext *ast,
 ast, llvm::cast(qual_type)->getModifiedType(),
 allow_completion);
 
-  case clang::Type::MemberPointer:
-return !qual_type.getTypePtr()->isIncompleteType();
-
   default:
 break;
   }
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/member-pointers.cpp 
b/lldb/test/Shell/SymbolFile/DWARF/x86/member-pointers.cpp
deleted file mode 100644
index 817833d4fa7515..00
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/member-pointers.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// REQUIRES: lld
-
-// Itanium ABI:
-// RUN: %clang --target=x86_64-pc-linux -gdwarf -c -o %t_linux.o %s
-// RUN: %lldb -f %t_linux.o -b -o "target variable mp" | FileCheck %s
-//
-// CHECK: (char SI::*) mp = 0x
-
-// Microsoft ABI:
-// RUN: %clang_cl --target=x86_64-windows-msvc -c -gdwarf %s -o %t_win.obj
-// RUN: lld-link /out:%t_win.exe %t_win.obj /nodefaultlib /entry:main /debug
-// RUN: %lldb -f %t_win.exe -b -o "target variable mp" | FileCheck 
--check-prefix=CHECK-MSVC %s
-//
-// DWARF has no representation of MSInheritanceAttr, so we cannot determine 
the size
-// of member-pointers yet. For the moment, make sure we don't crash on such 
variables.
-// CHECK-MSVC: error: Unable to determine byte size.
-
-struct SI {
-  char si;
-};
-
-char SI::*mp = &SI::si;
-
-int main() { return 0; }

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Fix crash missing MSInheritanceAttr on CXXRecordDecl with DWARF on Windows (PR #112928)

2024-10-23 Thread Shubham Sandeep Rastogi via lldb-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= 
Message-ID:
In-Reply-To: 


rastogishubham wrote:

Hi, this patch broke green dragon:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/13936/



https://github.com/llvm/llvm-project/pull/112928
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Add support for reading the dynamic symbol table from PT_DYNAMIC (PR #112596)

2024-11-18 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

It seems like this patch is responsible for breaking greendragon 

https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/15470/

https://github.com/llvm/llvm-project/pull/112596
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Add support for reading the dynamic symbol table from PT_DYNAMIC (PR #112596)

2024-11-18 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

I have reverted this change with f14e1a8597f83fa5bbc78befcb7059144d58ff5c

https://github.com/llvm/llvm-project/pull/112596
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] f14e1a8 - Revert "Add support for reading the dynamic symbol table from PT_DYNAMIC (#112596)"

2024-11-18 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2024-11-18T11:09:58-08:00
New Revision: f14e1a8597f83fa5bbc78befcb7059144d58ff5c

URL: 
https://github.com/llvm/llvm-project/commit/f14e1a8597f83fa5bbc78befcb7059144d58ff5c
DIFF: 
https://github.com/llvm/llvm-project/commit/f14e1a8597f83fa5bbc78befcb7059144d58ff5c.diff

LOG: Revert "Add support for reading the dynamic symbol table from PT_DYNAMIC 
(#112596)"

This reverts commit a7b2e73bcaa91255a20f1f2e692bec9eb6c17022.

This patch broke the greendragon bot

Failed Tests (10):
  lldb-api :: python_api/sbplatform/TestLocateModuleCallback.py
  lldb-unit :: 
Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithModuleAndSymbol
  lldb-unit :: 
Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithOnlySymbol
  lldb-unit :: 
Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithSymbolAsModule
  lldb-unit :: 
Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithSymbolAsModuleAndSymbol
  lldb-unit :: 
Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleCallbackSuccessWithSymbolByPlatformUUID
  lldb-unit :: 
Target/./TargetTests/LocateModuleCallbackTest/GetOrCreateModuleWithCachedModuleAndSymbol
  lldb-unit :: Target/./TargetTests/ModuleCacheTest/GetAndPut
  lldb-unit :: Target/./TargetTests/ModuleCacheTest/GetAndPutStrangeHostname
  lldb-unit :: Target/./TargetTests/ModuleCacheTest/GetAndPutUuidExists

Added: 


Modified: 
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h

Removed: 
lldb/test/Shell/ObjectFile/ELF/elf-dynsym.test



diff  --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp 
b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 8df226817326dd..9c7dff8127f473 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -44,7 +44,6 @@
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/MipsABIFlags.h"
-#include "lldb/Target/Process.h"
 
 #define CASE_AND_STREAM(s, def, width) 
\
   case def:
\
@@ -3008,10 +3007,9 @@ void ObjectFileELF::ParseSymtab(Symtab &lldb_symtab) {
   // section, nomatter if .symtab was already parsed or not. This is because
   // minidebuginfo normally removes the .symtab symbols which have their
   // matching .dynsym counterparts.
-  Section *dynsym = nullptr;
   if (!symtab ||
   GetSectionList()->FindSectionByName(ConstString(".gnu_debugdata"))) {
-dynsym =
+Section *dynsym =
 section_list->FindSectionByType(eSectionTypeELFDynamicSymbols, true)
 .get();
 if (dynsym) {
@@ -3021,20 +3019,6 @@ void ObjectFileELF::ParseSymtab(Symtab &lldb_symtab) {
   m_address_class_map.merge(address_class_map);
 }
   }
-  if (!dynsym) {
-// Try and read the dynamic symbol table from the .dynamic section.
-uint32_t num_symbols = 0;
-std::optional symtab_data =
-GetDynsymDataFromDynamic(num_symbols);
-std::optional strtab_data = GetDynstrData();
-if (symtab_data && strtab_data) {
-  auto [num_symbols_parsed, address_class_map] =
-  ParseSymbols(&lldb_symtab, symbol_id, section_list, num_symbols,
-symtab_data.value(), strtab_data.value());
-  symbol_id += num_symbols_parsed;
-  m_address_class_map.merge(address_class_map);
-}
-  }
 
   // DT_JMPREL
   //  If present, this entry's d_ptr member holds the address of
@@ -3844,33 +3828,6 @@ ObjectFileELF::MapFileDataWritable(const FileSpec &file, 
uint64_t Size,
  Offset);
 }
 
-std::optional
-ObjectFileELF::ReadDataFromDynamic(const ELFDynamic *dyn, uint64_t length,
-   uint64_t offset) {
-  // ELFDynamic values contain a "d_ptr" member that will be a load address if
-  // we have an ELF file read from memory, or it will be a file address if it
-  // was read from a ELF file. This function will correctly fetch data pointed
-  // to by the ELFDynamic::d_ptr, or return std::nullopt if the data isn't
-  // available.
-  const lldb::addr_t d_ptr_addr = dyn->d_ptr + offset;
-  if (ProcessSP process_sp = m_process_wp.lock()) {
-if (DataBufferSP data_sp = ReadMemory(process_sp, d_ptr_addr, length))
-  return DataExtractor(data_sp, GetByteOrder(), GetAddressByteSize());
-  } else {
-// We have an ELF file with no section headers or we didn't find the
-// .dynamic section. Try and find the .dynstr section.
-Address addr;
-if (!addr.ResolveAddressUsingFileSections(d_ptr_addr, GetSectionList()))
-  return std::nullopt;
-DataExtractor data;
-addr.GetSection()->GetSectionData(

[Lldb-commits] [lldb] disable test on older compilers (PR #136186)

2025-04-17 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham created 
https://github.com/llvm/llvm-project/pull/136186

None

>From fc70ee11fe2122c646ec20a61ae4b691902b1ce9 Mon Sep 17 00:00:00 2001
From: Shubham Sandeep Rastogi 
Date: Thu, 17 Apr 2025 12:31:03 -0700
Subject: [PATCH] disable test on older compilers

---
 .../TestDataFormatterLibcxxInvalidVectorSimulator.py| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py
 
b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py
index 3f58018b0fbd9..1a23d9a19fe19 100644
--- 
a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py
+++ 
b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py
@@ -14,7 +14,7 @@ class 
LibcxxInvalidVectorDataFormatterSimulatorTestCase(TestBase):
 NO_DEBUG_INFO_TESTCASE = True
 
 
-@skipIf(compiler="clang", compiler_version=['<', '15.0.1'])
+@skipIf(compiler="clang", compiler_version=['<', '18.0'])
 def test(self):
 self.build()
 lldbutil.run_to_source_breakpoint(self, "return 0", 
lldb.SBFileSpec("main.cpp"))

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] disable test on older compilers (PR #136186)

2025-04-17 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham closed 
https://github.com/llvm/llvm-project/pull/136186
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] disable test on older compilers (PR #136037)

2025-04-16 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham created 
https://github.com/llvm/llvm-project/pull/136037

None

>From 58c4bcec97c984ba43a5d141d8a5bf0bb53714b5 Mon Sep 17 00:00:00 2001
From: Shubham Sandeep Rastogi 
Date: Wed, 16 Apr 2025 14:40:49 -0700
Subject: [PATCH] disable test on older compilers

---
 .../TestDataFormatterLibcxxInvalidVectorSimulator.py| 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py
 
b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py
index 8788ea7be882d..3f58018b0fbd9 100644
--- 
a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py
+++ 
b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py
@@ -13,6 +13,8 @@
 class LibcxxInvalidVectorDataFormatterSimulatorTestCase(TestBase):
 NO_DEBUG_INFO_TESTCASE = True
 
+
+@skipIf(compiler="clang", compiler_version=['<', '15.0.1'])
 def test(self):
 self.build()
 lldbutil.run_to_source_breakpoint(self, "return 0", 
lldb.SBFileSpec("main.cpp"))

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] disable test on older compilers (PR #136037)

2025-04-16 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham closed 
https://github.com/llvm/llvm-project/pull/136037
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Disable test on older compilers. (PR #136322)

2025-04-18 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham created 
https://github.com/llvm/llvm-project/pull/136322

None

>From f6fb1bcb7d6c05bc32a58d00f3bbdffb1c45ec94 Mon Sep 17 00:00:00 2001
From: Shubham Sandeep Rastogi 
Date: Fri, 18 Apr 2025 09:20:28 -0700
Subject: [PATCH] Disable test on older compilers.

---
 .../TestDbgInfoContentDequeFromStdModule.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
 
b/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
index 24b1e00de67c7..762f06140e27a 100644
--- 
a/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
+++ 
b/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
@@ -10,7 +10,7 @@
 class TestDbgInfoContentDeque(TestBase):
 @add_test_categories(["libc++"])
 @skipIf(compiler=no_match("clang"))
-@skipIf(compiler="clang", compiler_version=["<", "12.0"])
+@skipIf(compiler="clang", compiler_version=["<", "18.0"])
 def test(self):
 self.build()
 

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Disable test on older compilers. (PR #136322)

2025-04-18 Thread Shubham Sandeep Rastogi via lldb-commits

https://github.com/rastogishubham closed 
https://github.com/llvm/llvm-project/pull/136322
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

Hi, this patch broke green dragon lldb tests

https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/24375/changes#d5b40c71f6be972f677de5d9886f91866df007b5

Failed Tests (1):
  lldb-api :: commands/statistics/basic/TestStats.py 

I am reverting this change to make sure the bot is green

https://github.com/llvm/llvm-project/pull/136236
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 08b4c52 - Revert "[lldb] Avoid force loading symbols in statistics collection (#136236)"

2025-04-21 Thread Shubham Sandeep Rastogi via lldb-commits

Author: Shubham Sandeep Rastogi
Date: 2025-04-21T17:19:54-07:00
New Revision: 08b4c52540727455194b0cf0f6310f391e87c2a5

URL: 
https://github.com/llvm/llvm-project/commit/08b4c52540727455194b0cf0f6310f391e87c2a5
DIFF: 
https://github.com/llvm/llvm-project/commit/08b4c52540727455194b0cf0f6310f391e87c2a5.diff

LOG: Revert "[lldb] Avoid force loading symbols in statistics collection 
(#136236)"

This reverts commit d5b40c71f6be972f677de5d9886f91866df007b5.

This change broke greendragon lldb test:

lldb-api :: commands/statistics/basic/TestStats.py

And is therefore being reverted.

Added: 


Modified: 
lldb/include/lldb/Symbol/ObjectFile.h
lldb/include/lldb/Symbol/SymbolFile.h
lldb/include/lldb/Symbol/SymbolFileOnDemand.h
lldb/source/Core/Module.cpp
lldb/source/Symbol/ObjectFile.cpp
lldb/source/Symbol/SymbolFile.cpp
lldb/test/API/commands/statistics/basic/TestStats.py
lldb/unittests/Symbol/LineTableTest.cpp
lldb/unittests/Symbol/SymtabTest.cpp

Removed: 




diff  --git a/lldb/include/lldb/Symbol/ObjectFile.h 
b/lldb/include/lldb/Symbol/ObjectFile.h
index 7fca6383fa9f3..cfcca04a76de8 100644
--- a/lldb/include/lldb/Symbol/ObjectFile.h
+++ b/lldb/include/lldb/Symbol/ObjectFile.h
@@ -319,7 +319,7 @@ class ObjectFile : public 
std::enable_shared_from_this,
   ///
   /// \return
   /// The symbol table for this object file.
-  Symtab *GetSymtab(bool can_create = true);
+  Symtab *GetSymtab();
 
   /// Parse the symbol table into the provides symbol table object.
   ///

diff  --git a/lldb/include/lldb/Symbol/SymbolFile.h 
b/lldb/include/lldb/Symbol/SymbolFile.h
index df2f263b18e17..f35d3ee9f22ae 100644
--- a/lldb/include/lldb/Symbol/SymbolFile.h
+++ b/lldb/include/lldb/Symbol/SymbolFile.h
@@ -144,7 +144,7 @@ class SymbolFile : public PluginInterface {
   virtual uint32_t GetNumCompileUnits() = 0;
   virtual lldb::CompUnitSP GetCompileUnitAtIndex(uint32_t idx) = 0;
 
-  virtual Symtab *GetSymtab(bool can_create = true) = 0;
+  virtual Symtab *GetSymtab() = 0;
 
   virtual lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) = 0;
   /// Return the Xcode SDK comp_unit was compiled against.
@@ -533,7 +533,7 @@ class SymbolFileCommon : public SymbolFile {
 return m_abilities;
   }
 
-  Symtab *GetSymtab(bool can_create = true) override;
+  Symtab *GetSymtab() override;
 
   ObjectFile *GetObjectFile() override { return m_objfile_sp.get(); }
   const ObjectFile *GetObjectFile() const override {

diff  --git a/lldb/include/lldb/Symbol/SymbolFileOnDemand.h 
b/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
index 6ed389a48880c..7a366bfabec86 100644
--- a/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
+++ b/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
@@ -186,9 +186,7 @@ class SymbolFileOnDemand : public lldb_private::SymbolFile {
 
   uint32_t GetAbilities() override;
 
-  Symtab *GetSymtab(bool can_create = true) override {
-return m_sym_file_impl->GetSymtab(can_create);
-  }
+  Symtab *GetSymtab() override { return m_sym_file_impl->GetSymtab(); }
 
   ObjectFile *GetObjectFile() override {
 return m_sym_file_impl->GetObjectFile();

diff  --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 625c14e4a2153..ad7046e596278 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -997,7 +997,7 @@ SymbolFile *Module::GetSymbolFile(bool can_create, Stream 
*feedback_strm) {
 
 Symtab *Module::GetSymtab(bool can_create) {
   if (SymbolFile *symbols = GetSymbolFile(can_create))
-return symbols->GetSymtab(can_create);
+return symbols->GetSymtab();
   return nullptr;
 }
 

diff  --git a/lldb/source/Symbol/ObjectFile.cpp 
b/lldb/source/Symbol/ObjectFile.cpp
index afd0d298e675e..2f2c59d6af620 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -734,9 +734,10 @@ void llvm::format_provider::format(
   }
 }
 
-Symtab *ObjectFile::GetSymtab(bool can_create) {
+
+Symtab *ObjectFile::GetSymtab() {
   ModuleSP module_sp(GetModule());
-  if (module_sp && can_create) {
+  if (module_sp) {
 // We can't take the module lock in ObjectFile::GetSymtab() or we can
 // deadlock in DWARF indexing when any file asks for the symbol table from
 // an object file. This currently happens in the preloading of symbols in

diff  --git a/lldb/source/Symbol/SymbolFile.cpp 
b/lldb/source/Symbol/SymbolFile.cpp
index 870d778dca740..94e32b55572dd 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -152,10 +152,10 @@ void SymbolFile::AssertModuleLock() {
 
 SymbolFile::RegisterInfoResolver::~RegisterInfoResolver() = default;
 
-Symtab *SymbolFileCommon::GetSymtab(bool can_create) {
+Symtab *SymbolFileCommon::GetSymtab() {
   std::lock_guard guard(GetModuleMutex());
   // Fetch the symtab from the main object file.
-  auto *symtab = GetMainObjectFile()->GetSymtab(can_create);
+  auto *symtab =

[Lldb-commits] [lldb] [lldb] Avoid force loading symbols in statistics collection (PR #136236)

2025-04-21 Thread Shubham Sandeep Rastogi via lldb-commits

rastogishubham wrote:

Change reverted with 08b4c52540727455194b0cf0f6310f391e87c2a5

https://github.com/llvm/llvm-project/pull/136236
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits