[Lldb-commits] [lldb] [lldb][docs] Added LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS for macOS configuration (PR #130381)

2025-03-08 Thread Julius Alexandre via lldb-commits

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


[Lldb-commits] [lldb] [lldb][docs] Added LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS for macOS configuration (PR #130381)

2025-03-08 Thread Julius Alexandre via lldb-commits


@@ -371,6 +372,7 @@ LLVM `_):
   -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake \
   -DLLVM_ENABLE_PROJECTS="clang;lldb" \
   -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
+  -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \

wizardengineer wrote:

Ah I see, that makes sense. The idea behind adding the 
`LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS` in `build.rst` was to help subside 
issues with certain test suites. After reading what you said, I think it might 
be beneficial to at least add it as an option? Rather than making it a default 
like you said.

I'll make sure to remove it.

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


[Lldb-commits] [lldb] [lldb] fix set SBLineEntryColumn (PR #130435)

2025-03-08 Thread Jonas Devlieghere via lldb-commits

https://github.com/JDevlieghere approved this pull request.

LGTM

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


[Lldb-commits] [lldb] [lldb] Remove an extraneous `printf` statement. (PR #130453)

2025-03-08 Thread John Harrison via lldb-commits

https://github.com/ashgti created 
https://github.com/llvm/llvm-project/pull/130453

This was missed in review but is showing up in lldb-dap output.

>From 317ab3778f56f7d32c6f3687981b5b87a8392915 Mon Sep 17 00:00:00 2001
From: John Harrison 
Date: Sat, 8 Mar 2025 18:50:30 -0800
Subject: [PATCH] [lldb] Remove an extraneous `printf` statement.

This was missed in review but is showing up in lldb-dap output.
---
 lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm 
b/lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm
index cb6c2457df1e3..c3a430bda7fa5 100644
--- a/lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm
@@ -32,7 +32,6 @@ void Start() override {
   }
 });
 dispatch_activate(m_memory_pressure_source);
-printf("Started\n");
   }
 
   void Stop() override {

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


[Lldb-commits] [lldb] [lldb-dap] Migrating terminated statistics to the event body. (PR #130454)

2025-03-08 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: John Harrison (ashgti)


Changes

Per the DAP spec, the event 'body' field should contain any additional data 
related to the event. I updated the lldb-dap 'statistics' extension into the 
terminated event's body like:

```
{
  "type": "event",
  "seq": 0,
  "event": "terminated",
  "body": {
"$__lldb_statistics": {...}
  }
}
```

This allows us to more uniformly handle event messages.

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


2 Files Affected:

- (modified) 
lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py (+1-1) 
- (modified) lldb/tools/lldb-dap/JSONUtils.cpp (+2-1) 


``diff
diff --git 
a/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py 
b/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py
index 6d1c25e8e4534..b0abe2a38dac4 100644
--- a/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py
+++ b/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py
@@ -43,7 +43,7 @@ def test_terminated_event(self):
 self.continue_to_breakpoints(breakpoint_ids)
 self.continue_to_exit()
 
-statistics = self.dap_server.wait_for_terminated()["statistics"]
+statistics = 
self.dap_server.wait_for_terminated()["body"]["$__lldb_statistics"]
 self.assertGreater(statistics["totalDebugInfoByteSize"], 0)
 self.assertGreater(statistics["totalDebugInfoEnabled"], 0)
 self.assertGreater(statistics["totalModuleCountHasDebugInfo"], 0)
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp 
b/lldb/tools/lldb-dap/JSONUtils.cpp
index 7094bf60bfbc2..932145b1799bd 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -1526,7 +1526,8 @@ static void addStatistic(lldb::SBTarget &target, 
llvm::json::Object &event) {
 const char *key = keys.GetStringAtIndex(i);
 FilterAndGetValueForKey(statistics, key, stats_body);
   }
-  event.try_emplace("statistics", std::move(stats_body));
+  llvm::json::Object body{{"$__lldb_statistics", std::move(stats_body)}};
+  event.try_emplace("body", std::move(body));
 }
 
 llvm::json::Object CreateTerminatedEventObject(lldb::SBTarget &target) {

``




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


[Lldb-commits] [lldb] [lldb] Remove an extraneous `printf` statement. (PR #130453)

2025-03-08 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: John Harrison (ashgti)


Changes

This was missed in review but is showing up in lldb-dap output.

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


1 Files Affected:

- (modified) lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm (-1) 


``diff
diff --git a/lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm 
b/lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm
index cb6c2457df1e3..c3a430bda7fa5 100644
--- a/lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/MemoryMonitorMacOSX.mm
@@ -32,7 +32,6 @@ void Start() override {
   }
 });
 dispatch_activate(m_memory_pressure_source);
-printf("Started\n");
   }
 
   void Stop() override {

``




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


[Lldb-commits] [lldb] [lldb] Remove an extraneous `printf` statement. (PR #130453)

2025-03-08 Thread John Harrison via lldb-commits

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


[Lldb-commits] [lldb] [lldb-dap] Migrating terminated statistics to the event body. (PR #130454)

2025-03-08 Thread John Harrison via lldb-commits

ashgti wrote:

This is split off from #130026


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


[Lldb-commits] [lldb] [lldb-dap] Migrating terminated statistics to the event body. (PR #130454)

2025-03-08 Thread John Harrison via lldb-commits

https://github.com/ashgti created 
https://github.com/llvm/llvm-project/pull/130454

Per the DAP spec, the event 'body' field should contain any additional data 
related to the event. I updated the lldb-dap 'statistics' extension into the 
terminated event's body like:

```
{
  "type": "event",
  "seq": 0,
  "event": "terminated",
  "body": {
"$__lldb_statistics": {...}
  }
}
```

This allows us to more uniformly handle event messages.

>From 7d2d7c27de92a1e6193fade6ea776526337b91b9 Mon Sep 17 00:00:00 2001
From: John Harrison 
Date: Sat, 8 Mar 2025 18:47:04 -0800
Subject: [PATCH] [lldb-dap] Migrating terminated statistics to the event body.

Per the DAP spec, the event 'body' field should contain any additional data 
related to the event. I updated the lldb-dap 'statistics' extension into the 
terminated event's body like:

```
{
  "type": "event",
  "seq": 0,
  "event": "terminated",
  "body": {
"$__lldb_statistics": {...}
  }
}
```

This allows us to more uniformly handle event messages.
---
 .../tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py | 2 +-
 lldb/tools/lldb-dap/JSONUtils.cpp  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py 
b/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py
index 6d1c25e8e4534..b0abe2a38dac4 100644
--- a/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py
+++ b/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py
@@ -43,7 +43,7 @@ def test_terminated_event(self):
 self.continue_to_breakpoints(breakpoint_ids)
 self.continue_to_exit()
 
-statistics = self.dap_server.wait_for_terminated()["statistics"]
+statistics = 
self.dap_server.wait_for_terminated()["body"]["$__lldb_statistics"]
 self.assertGreater(statistics["totalDebugInfoByteSize"], 0)
 self.assertGreater(statistics["totalDebugInfoEnabled"], 0)
 self.assertGreater(statistics["totalModuleCountHasDebugInfo"], 0)
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp 
b/lldb/tools/lldb-dap/JSONUtils.cpp
index 7094bf60bfbc2..932145b1799bd 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -1526,7 +1526,8 @@ static void addStatistic(lldb::SBTarget &target, 
llvm::json::Object &event) {
 const char *key = keys.GetStringAtIndex(i);
 FilterAndGetValueForKey(statistics, key, stats_body);
   }
-  event.try_emplace("statistics", std::move(stats_body));
+  llvm::json::Object body{{"$__lldb_statistics", std::move(stats_body)}};
+  event.try_emplace("body", std::move(body));
 }
 
 llvm::json::Object CreateTerminatedEventObject(lldb::SBTarget &target) {

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


[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-08 Thread Adrian Vogelsgesang via lldb-commits

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


[Lldb-commits] [lldb] [lldb][docs] Added LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS for macOS configuration (PR #130381)

2025-03-08 Thread Jonas Devlieghere via lldb-commits


@@ -340,7 +340,8 @@ On macOS the LLDB test suite requires libc++. Either add
   code-signed with identity ``lldb_codesign`` (see :ref:`CodeSigning`).
 * ``LLDB_USE_SYSTEM_DEBUGSERVER:BOOL``: Use the system's debugserver, so lldb 
is
   functional without setting up code-signing.
-
+* ``LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL``: This helps with determining 
missing
+  packages or modules at configuration time.

JDevlieghere wrote:

The descriptions above all use the imperative mood, let's do the same here:
```suggestion
* ``LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL``: Detect missing packages or 
modules at configuration time.
```

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


[Lldb-commits] [lldb] [lldb] fix set SBLineEntryColumn (PR #130435)

2025-03-08 Thread Jonas Devlieghere via lldb-commits

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


[Lldb-commits] [lldb] [lldb][docs] Added LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS for macOS configuration (PR #130381)

2025-03-08 Thread Julius Alexandre via lldb-commits

https://github.com/wizardengineer updated 
https://github.com/llvm/llvm-project/pull/130381

>From 3a8005bcf9780b51e7afbfba17e7bd43e7638cbc Mon Sep 17 00:00:00 2001
From: medievalghoul <61852278+medievalgh...@users.noreply.github.com>
Date: Fri, 7 Mar 2025 21:15:46 -0500
Subject: [PATCH 1/2] added LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS in macOS
 configuration

---
 lldb/docs/resources/build.rst | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index 214c5f63f2c73..53d749da6bb5a 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -340,7 +340,8 @@ On macOS the LLDB test suite requires libc++. Either add
   code-signed with identity ``lldb_codesign`` (see :ref:`CodeSigning`).
 * ``LLDB_USE_SYSTEM_DEBUGSERVER:BOOL``: Use the system's debugserver, so lldb 
is
   functional without setting up code-signing.
-
+* ``LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL``: This helps with determining 
missing
+  packages or modules at configuration time.
 
 .. _CMakeCaches:
 
@@ -371,6 +372,7 @@ LLVM `_):
   -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake \
   -DLLVM_ENABLE_PROJECTS="clang;lldb" \
   -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
+  -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
   llvm-project/llvm
 
   $ DESTDIR=/path/to/lldb-install ninja -C /path/to/lldb-build check-lldb 
install-distribution
@@ -387,6 +389,7 @@ Build LLDB standalone for development with Xcode:
   -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-base.cmake \
   -DLLVM_ENABLE_PROJECTS="clang" \
   -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
+  -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
   llvm-project/llvm
   $ ninja -C /path/to/llvm-build
 

>From 85c9e877d3b03bf6f2d0bdd159aaf871f98e6965 Mon Sep 17 00:00:00 2001
From: medievalghoul <61852278+medievalgh...@users.noreply.github.com>
Date: Sat, 8 Mar 2025 16:17:55 -0500
Subject: [PATCH 2/2] fix placement and text

---
 lldb/docs/resources/build.rst | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index 53d749da6bb5a..9ba2405fc9628 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -340,8 +340,7 @@ On macOS the LLDB test suite requires libc++. Either add
   code-signed with identity ``lldb_codesign`` (see :ref:`CodeSigning`).
 * ``LLDB_USE_SYSTEM_DEBUGSERVER:BOOL``: Use the system's debugserver, so lldb 
is
   functional without setting up code-signing.
-* ``LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL``: This helps with determining 
missing
-  packages or modules at configuration time.
+* ``LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL``: Detect missing packages or 
modules at configuration time.
 
 .. _CMakeCaches:
 
@@ -372,7 +371,6 @@ LLVM `_):
   -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake \
   -DLLVM_ENABLE_PROJECTS="clang;lldb" \
   -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-  -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
   llvm-project/llvm
 
   $ DESTDIR=/path/to/lldb-install ninja -C /path/to/lldb-build check-lldb 
install-distribution
@@ -389,7 +387,6 @@ Build LLDB standalone for development with Xcode:
   -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-base.cmake \
   -DLLVM_ENABLE_PROJECTS="clang" \
   -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-  -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
   llvm-project/llvm
   $ ninja -C /path/to/llvm-build
 

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


[Lldb-commits] [lldb] [lldb][docs] Added LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS for macOS configuration (PR #130381)

2025-03-08 Thread Julius Alexandre via lldb-commits


@@ -340,7 +340,8 @@ On macOS the LLDB test suite requires libc++. Either add
   code-signed with identity ``lldb_codesign`` (see :ref:`CodeSigning`).
 * ``LLDB_USE_SYSTEM_DEBUGSERVER:BOOL``: Use the system's debugserver, so lldb 
is
   functional without setting up code-signing.
-
+* ``LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL``: This helps with determining 
missing
+  packages or modules at configuration time.

wizardengineer wrote:

done :)

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


[Lldb-commits] [lldb] 1d763f3 - Revert "Modify the localCache API to require an explicit commit on CachedFile… (#115331)"

2025-03-08 Thread Douglas Yung via lldb-commits

Author: Douglas Yung
Date: 2025-03-08T23:54:57Z
New Revision: 1d763f383380ec629ee6d5053fd41322efcbc6bd

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

LOG: Revert "Modify the localCache API to require an explicit commit on 
CachedFile… (#115331)"

This reverts commit ce9e1d3c15ed6290f1cb07b482939976fa8115cd.

The unittest added in this commit seems to be flaky causing random failure on 
buildbots:
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13235
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13232
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13228
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13224
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13220
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13210
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13208
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13207
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13202
 - https://lab.llvm.org/buildbot/#/builders/46/builds/13196
and
 - https://lab.llvm.org/buildbot/#/builders/180/builds/14266
 - https://lab.llvm.org/buildbot/#/builders/180/builds/14254
 - https://lab.llvm.org/buildbot/#/builders/180/builds/14250
 - https://lab.llvm.org/buildbot/#/builders/180/builds/14245
 - https://lab.llvm.org/buildbot/#/builders/180/builds/14244
 - https://lab.llvm.org/buildbot/#/builders/180/builds/14226

Added: 


Modified: 
lldb/source/Core/DataFileCache.cpp
llvm/include/llvm/Support/Caching.h
llvm/lib/CGData/CodeGenData.cpp
llvm/lib/Debuginfod/Debuginfod.cpp
llvm/lib/LTO/LTOBackend.cpp
llvm/lib/Support/Caching.cpp
llvm/tools/gold/gold-plugin.cpp
llvm/tools/llvm-lto2/llvm-lto2.cpp
llvm/unittests/Support/CMakeLists.txt

Removed: 
llvm/unittests/Support/Caching.cpp



diff  --git a/lldb/source/Core/DataFileCache.cpp 
b/lldb/source/Core/DataFileCache.cpp
index 9109269711231..ef0e07a8b0342 100644
--- a/lldb/source/Core/DataFileCache.cpp
+++ b/lldb/source/Core/DataFileCache.cpp
@@ -132,11 +132,6 @@ bool DataFileCache::SetCachedData(llvm::StringRef key,
   if (file_or_err) {
 llvm::CachedFileStream *cfs = file_or_err->get();
 cfs->OS->write((const char *)data.data(), data.size());
-if (llvm::Error err = cfs->commit()) {
-  Log *log = GetLog(LLDBLog::Modules);
-  LLDB_LOG_ERROR(log, std::move(err),
- "failed to commit to the cache for key: {0}");
-}
 return true;
   } else {
 Log *log = GetLog(LLDBLog::Modules);

diff  --git a/llvm/include/llvm/Support/Caching.h 
b/llvm/include/llvm/Support/Caching.h
index 9a82921e6ffc7..cf45145619d95 100644
--- a/llvm/include/llvm/Support/Caching.h
+++ b/llvm/include/llvm/Support/Caching.h
@@ -24,32 +24,15 @@ class MemoryBuffer;
 /// This class wraps an output stream for a file. Most clients should just be
 /// able to return an instance of this base class from the stream callback, but
 /// if a client needs to perform some action after the stream is written to,
-/// that can be done by deriving from this class and overriding the destructor
-/// or the commit() method.
+/// that can be done by deriving from this class and overriding the destructor.
 class CachedFileStream {
 public:
   CachedFileStream(std::unique_ptr OS,
std::string OSPath = "")
   : OS(std::move(OS)), ObjectPathName(OSPath) {}
-
-  /// Must be called exactly once after the writes to OS have been completed
-  /// but before the CachedFileStream object is destroyed.
-  virtual Error commit() {
-if (Committed)
-  return createStringError(make_error_code(std::errc::invalid_argument),
-   Twine("CacheStream already committed."));
-Committed = true;
-
-return Error::success();
-  }
-
-  bool Committed = false;
   std::unique_ptr OS;
   std::string ObjectPathName;
-  virtual ~CachedFileStream() {
-if (!Committed)
-  report_fatal_error("CachedFileStream was not committed.\n");
-  }
+  virtual ~CachedFileStream() = default;
 };
 
 /// This type defines the callback to add a file that is generated on the fly.

diff  --git a/llvm/lib/CGData/CodeGenData.cpp b/llvm/lib/CGData/CodeGenData.cpp
index 7b9c584d64867..02de528c4d007 100644
--- a/llvm/lib/CGData/CodeGenData.cpp
+++ b/llvm/lib/CGData/CodeGenData.cpp
@@ -233,9 +233,6 @@ void saveModuleForTwoRounds(const Module &TheModule, 
unsigned Task,
 
   WriteBitcodeToFile(TheModule, *Stream->OS,
  /*ShouldPreserveUseListOrder=*/true);
-
-  if (Error Err = Stream->commit())
-report_fatal_error(std::move(Err));
 }
 
 std::unique_ptr loadModuleForTwoRounds(BitcodeModule &OrigModule,

diff  --git a/llvm/lib/Debuginfod/Debuginfod.cpp 
b/llvm/lib/Debuginfod/Debuginfod.cpp
index e570

[Lldb-commits] [lldb] [llvm] Modify the localCache API to require an explicit commit on CachedFile… (PR #115331)

2025-03-08 Thread via lldb-commits

dyung wrote:

I've reverted this change as well as two follow-up changes 
(df79000896101acc9b8d7435e59f767b36c00ac8 and 
b0baa1d8bd68a2ce2f7c5f2b62333e410e9122a1) since the added test seems to be very 
flaky. Please address this issue before relanding.

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


[Lldb-commits] [lldb] [lldb] Remove progress report coalescing (PR #130329)

2025-03-08 Thread Jonas Devlieghere via lldb-commits

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


[Lldb-commits] [lldb] a1b14db - [lldb] Remove progress report coalescing (#130329)

2025-03-08 Thread via lldb-commits

Author: Jonas Devlieghere
Date: 2025-03-08T09:10:46-08:00
New Revision: a1b14dbc4740fe49dfb2af44907a195597474556

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

LOG: [lldb] Remove progress report coalescing (#130329)

Remove support for coalescing progress reports in LLDB. This
functionality was motivated by Xcode, which wanted to listen for less
frequent, aggregated progress events at the cost of losing some detail.
See the original RFC [1] for more details. Since then, they've
reevaluated this trade-off and opted to listen for the regular, full
fidelity progress events and do any post processing on their end.

rdar://146425487

Added: 


Modified: 
lldb/include/lldb/Core/Progress.h
lldb/include/lldb/lldb-enumerations.h
lldb/source/API/SystemInitializerFull.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/Progress.cpp
lldb/source/Host/CMakeLists.txt
lldb/test/API/python_api/sbprogress/TestSBProgress.py
lldb/unittests/Callback/TestBreakpointSetCallback.cpp
lldb/unittests/Core/ProgressReportTest.cpp
lldb/unittests/Host/CMakeLists.txt

Removed: 
lldb/include/lldb/Host/Alarm.h
lldb/source/Host/common/Alarm.cpp
lldb/unittests/Host/AlarmTest.cpp



diff  --git a/lldb/include/lldb/Core/Progress.h 
b/lldb/include/lldb/Core/Progress.h
index 5876eae717e96..3003568e8946b 100644
--- a/lldb/include/lldb/Core/Progress.h
+++ b/lldb/include/lldb/Core/Progress.h
@@ -9,7 +9,6 @@
 #ifndef LLDB_CORE_PROGRESS_H
 #define LLDB_CORE_PROGRESS_H
 
-#include "lldb/Host/Alarm.h"
 #include "lldb/Utility/Timeout.h"
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-types.h"
@@ -18,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace lldb_private {
 
@@ -115,21 +115,6 @@ class Progress {
   /// Used to indicate a non-deterministic progress report
   static constexpr uint64_t kNonDeterministicTotal = UINT64_MAX;
 
-  /// Data belonging to this Progress event that is used for bookkeeping by
-  /// ProgressManager.
-  struct ProgressData {
-/// The title of the progress activity, also used as a category.
-std::string title;
-/// A unique integer identifier for progress reporting.
-uint64_t progress_id;
-/// The optional debugger ID to report progress to. If this has no value
-/// then all debuggers will receive this event.
-std::optional debugger_id;
-
-/// The origin of the progress event, wheter it is internal or external.
-Origin origin;
-  };
-
 private:
   void ReportProgress();
   static std::atomic g_id;
@@ -141,8 +126,18 @@ class Progress {
   // Minimum amount of time between two progress reports.
   const Timeout m_minimum_report_time;
 
-  /// Data needed by the debugger to broadcast a progress event.
-  const ProgressData m_progress_data;
+  /// The title of the progress activity, also used as a category.
+  const std::string m_title;
+
+  /// A unique integer identifier for progress reporting.
+  const uint64_t m_progress_id;
+
+  /// The optional debugger ID to report progress to. If this has no value
+  /// then all debuggers will receive this event.
+  const std::optional m_debugger_id;
+
+  /// The origin of the progress event, whether it is internal or external.
+  const Origin m_origin;
 
   /// How much work ([0...m_total]) that has been completed.
   std::atomic m_completed = 0;
@@ -161,60 +156,6 @@ class Progress {
   std::optional m_prev_completed;
 };
 
-/// A class used to group progress reports by category. This is done by using a
-/// map that maintains a refcount of each category of progress reports that 
have
-/// come in. Keeping track of progress reports this way will be done if a
-/// debugger is listening to the eBroadcastBitProgressByCategory broadcast bit.
-class ProgressManager {
-public:
-  ProgressManager();
-  ~ProgressManager();
-
-  /// Control the refcount of the progress report category as needed.
-  void Increment(const Progress::ProgressData &);
-  void Decrement(const Progress::ProgressData &);
-
-  static void Initialize();
-  static void Terminate();
-  static bool Enabled();
-  static ProgressManager &Instance();
-
-protected:
-  enum class EventType {
-Begin,
-End,
-  };
-  static void ReportProgress(const Progress::ProgressData &progress_data,
- EventType type);
-
-  static std::optional &InstanceImpl();
-
-  /// Helper function for reporting progress when the alarm in the 
corresponding
-  /// entry in the map expires.
-  void Expire(llvm::StringRef key);
-
-  /// Entry used for bookkeeping.
-  struct Entry {
-/// Reference count used for overlapping events.
-uint64_t refcount = 0;
-
-/// Data used to emit progress events.
-Progress::ProgressData data;
-
-/// Alarm handle used when the refcount reaches ze

[Lldb-commits] [lldb] [lldb][docs] Added LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS for macOS configuration (PR #130381)

2025-03-08 Thread Jonas Devlieghere via lldb-commits


@@ -371,6 +372,7 @@ LLVM `_):
   -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake \
   -DLLVM_ENABLE_PROJECTS="clang;lldb" \
   -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
+  -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \

JDevlieghere wrote:

I don't think we should add the flag here. If we wanted to make it the default, 
we could add it to the CMake cache (i.e. `Apple-lldb-macOS.cmake`) but I don't 
think it belongs there either. The motivation for the flag was to catch missing 
dependencies in CI. At desk, we want to streamline the development process. For 
example, if someone working on another LLVM subproject want to make sure their 
API change doesn't break building LLDB, they shouldn't be forced to install all 
the dependencies of our test suite. 

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


[Lldb-commits] [lldb] [lldb] fix set SBLineEntryColumn (PR #130435)

2025-03-08 Thread via lldb-commits

https://github.com/Da-Viper created 
https://github.com/llvm/llvm-project/pull/130435

Calling the public API `SBLineEntry::SetColumn()` sets the row instead of the 
column. 

This probably should be backported as it has been since version 3.4. 

>From 02c34e87db59a0b87887aba479afbab70925241b Mon Sep 17 00:00:00 2001
From: Ezike Ebuka 
Date: Sat, 8 Mar 2025 19:47:17 +
Subject: [PATCH] [lldb] fix set SBLineEntryColumn

---
 lldb/source/API/SBLineEntry.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/source/API/SBLineEntry.cpp b/lldb/source/API/SBLineEntry.cpp
index 216ea6d18eab8..0f4936f32a074 100644
--- a/lldb/source/API/SBLineEntry.cpp
+++ b/lldb/source/API/SBLineEntry.cpp
@@ -137,7 +137,7 @@ void SBLineEntry::SetLine(uint32_t line) {
 void SBLineEntry::SetColumn(uint32_t column) {
   LLDB_INSTRUMENT_VA(this, column);
 
-  ref().line = column;
+  ref().column = column;
 }
 
 bool SBLineEntry::operator==(const SBLineEntry &rhs) const {

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


[Lldb-commits] [lldb] [lldb] fix set SBLineEntryColumn (PR #130435)

2025-03-08 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: None (Da-Viper)


Changes

Calling the public API `SBLineEntry::SetColumn()` sets the row instead of the 
column. 

This probably should be backported as it has been since version 3.4. 

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


1 Files Affected:

- (modified) lldb/source/API/SBLineEntry.cpp (+1-1) 


``diff
diff --git a/lldb/source/API/SBLineEntry.cpp b/lldb/source/API/SBLineEntry.cpp
index 216ea6d18eab8..0f4936f32a074 100644
--- a/lldb/source/API/SBLineEntry.cpp
+++ b/lldb/source/API/SBLineEntry.cpp
@@ -137,7 +137,7 @@ void SBLineEntry::SetLine(uint32_t line) {
 void SBLineEntry::SetColumn(uint32_t column) {
   LLDB_INSTRUMENT_VA(this, column);
 
-  ref().line = column;
+  ref().column = column;
 }
 
 bool SBLineEntry::operator==(const SBLineEntry &rhs) const {

``




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