[Lldb-commits] [lldb] [lldb] Fixing the python_api/block tests. (PR #184647)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 4 09:20:15 PST 2026
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/184647
Renaming the file to be unique and updating the symbols for Windows.
>From 7620acc49f61ecdeb8248315e2469a5a57474182 Mon Sep 17 00:00:00 2001
From: John Harrison <harjohn at google.com>
Date: Wed, 4 Mar 2026 09:19:03 -0800
Subject: [PATCH] [lldb] Fixing the python_api/block tests.
Renaming the file to be unique and updating the symbols for Windows.
---
.../block/{TestBlocks.py => TestFrameBlocks.py} | 2 +-
lldb/test/API/python_api/block/fn.c | 8 +++++++-
lldb/test/API/python_api/block/main.c | 4 ++++
3 files changed, 12 insertions(+), 2 deletions(-)
rename lldb/test/API/python_api/block/{TestBlocks.py => TestFrameBlocks.py} (98%)
diff --git a/lldb/test/API/python_api/block/TestBlocks.py b/lldb/test/API/python_api/block/TestFrameBlocks.py
similarity index 98%
rename from lldb/test/API/python_api/block/TestBlocks.py
rename to lldb/test/API/python_api/block/TestFrameBlocks.py
index d5e7a5eeef49e..923cc4a79462a 100644
--- a/lldb/test/API/python_api/block/TestBlocks.py
+++ b/lldb/test/API/python_api/block/TestFrameBlocks.py
@@ -8,7 +8,7 @@
from lldbsuite.test import lldbutil
-class BlockAPITestCase(TestBase):
+class FrameBlocksTestCase(TestBase):
def test_block_equality(self):
"""Exercise SBBlock equality checks across frames and functions in different dylibs."""
self.build()
diff --git a/lldb/test/API/python_api/block/fn.c b/lldb/test/API/python_api/block/fn.c
index 80ea7e5baa11e..84716517bea29 100644
--- a/lldb/test/API/python_api/block/fn.c
+++ b/lldb/test/API/python_api/block/fn.c
@@ -1,4 +1,10 @@
-extern int fn(int a, int b) {
+#ifdef _WIN32
+#define EXPORT __declspec(dllexport)
+#else
+#define EXPORT extern
+#endif
+
+EXPORT int fn(int a, int b) {
if (a < b) {
int sum = a + b;
return sum; // breakpoint 2
diff --git a/lldb/test/API/python_api/block/main.c b/lldb/test/API/python_api/block/main.c
index 8200ecf5bdf4f..7e862f0e1a3c1 100644
--- a/lldb/test/API/python_api/block/main.c
+++ b/lldb/test/API/python_api/block/main.c
@@ -1,6 +1,10 @@
#include <stdio.h>
+#ifdef _WIN32
+__declspec(dllimport) int fn(int a, int b);
+#else
extern int fn(int a, int b);
+#endif
int main(int argc, char const *argv[]) {
int a = 3;
More information about the lldb-commits
mailing list