Skip to content

🍒 Cherrypicks to allow Swift to enable LLDB tests in Windows builds #9429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
8e4971c
[lldb][test] Add --make argument to dotest.py (#93883)
dzhidzhoev Apr 13, 2024
a678a0e
[lldb][test] Fix D lang mangling test on Windows (#94196)
DavidSpickett Jun 3, 2024
3a2c6ff
[lldb][test][NFC] Add option to exclude third_party packages (#83191)
rupprecht Feb 28, 2024
cbb8b9a
[lldb][test] Clear pexpect found var before checking again
DavidSpickett Feb 29, 2024
36f9433
[lldb] Add pexpect to LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS
JDevlieghere Feb 29, 2024
9f4b3a3
[lldb][test][Windows] Don't check for pexpect with LLDB_ENFORCE_STRIC…
DavidSpickett Mar 1, 2024
376dc8c
[clang] Don't add DWARF debug info when assembling .s with clang-cl /…
mstorsjo Sep 3, 2024
8e10161
[lldb] Use SEND_ERROR instead of FATAL_ERROR in test/CMakeLists.txt (…
JDevlieghere Oct 9, 2024
6117bed
[lldb] Check for Python 'packaging' module at configuration time (#11…
weliveindetail Oct 10, 2024
d7f3d78
[lldb] Add early CMake check for 'make' tool (#111531)
weliveindetail Oct 10, 2024
66a6fd2
[lldb] Fix deps loading for lldb-python on Windows and Python3.8+
weliveindetail Oct 2, 2024
9a59e43
[lldb] Support tests with nested make invocations on Windows 1/2 (#11…
weliveindetail Oct 15, 2024
66554c4
[lldb] Support tests with nested make invocations on Windows 2/2 (#11…
weliveindetail Oct 16, 2024
13187e1
[lldb] Support swiftlang tests with nested make invocations on Windows
weliveindetail Oct 15, 2024
62b9626
Propagate SDKROOT env var in Shell tests on Windows
weliveindetail Oct 14, 2024
9b4247d
[lldb][swift] Check runtime dependencies of SwiftREPL tests in local …
weliveindetail Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8424,6 +8424,32 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
WantDebug = !A->getOption().matches(options::OPT_g0) &&
!A->getOption().matches(options::OPT_ggdb0);

// If a -gdwarf argument appeared, remember it.
bool EmitDwarf = false;
if (const Arg *A = getDwarfNArg(Args))
EmitDwarf = checkDebugInfoOption(A, Args, D, getToolChain());

bool EmitCodeView = false;
if (const Arg *A = Args.getLastArg(options::OPT_gcodeview))
EmitCodeView = checkDebugInfoOption(A, Args, D, getToolChain());

// If the user asked for debug info but did not explicitly specify -gcodeview
// or -gdwarf, ask the toolchain for the default format.
if (!EmitCodeView && !EmitDwarf && WantDebug) {
switch (getToolChain().getDefaultDebugFormat()) {
case llvm::codegenoptions::DIF_CodeView:
EmitCodeView = true;
break;
case llvm::codegenoptions::DIF_DWARF:
EmitDwarf = true;
break;
}
}

// If the arguments don't imply DWARF, don't emit any debug info here.
if (!EmitDwarf)
WantDebug = false;

llvm::codegenoptions::DebugInfoKind DebugInfoKind =
llvm::codegenoptions::NoDebugInfo;

Expand Down
18 changes: 16 additions & 2 deletions clang/test/Driver/debug-options-as.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,27 @@
// GGDB0-NOT: -debug-info-kind=

// Check to make sure clang with -g on a .s file gets passed.
// rdar://9275556
// RUN: %clang -### -c -integrated-as -g -x assembler %s 2>&1 \
// This requires a target that defaults to DWARF.
// RUN: %clang -### --target=x86_64-linux-gnu -c -integrated-as -g -x assembler %s 2>&1 \
// RUN: | FileCheck %s
//
// CHECK: "-cc1as"
// CHECK: "-debug-info-kind=constructor"

// Check that a plain -g, without any -gdwarf, for a MSVC target, doesn't
// trigger producing DWARF output.
// RUN: %clang -### --target=x86_64-windows-msvc -c -integrated-as -g -x assembler %s 2>&1 \
// RUN: | FileCheck -check-prefix=MSVC %s
//
// MSVC: "-cc1as"
// MSVC-NOT: "-debug-info-kind=constructor"

// Check that clang-cl with the -Z7 option works the same, not triggering
// any DWARF output.
//
// RUN: %clang_cl -### -c -Z7 -x assembler %s 2>&1 \
// RUN: | FileCheck -check-prefix=MSVC %s

// Check to make sure clang with -g on a .s file gets passed -dwarf-debug-producer.
// rdar://12955296
// RUN: %clang -### -c -integrated-as -g -x assembler %s 2>&1 \
Expand Down
18 changes: 18 additions & 0 deletions lldb/bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,24 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
COMMENT "Copying Python DLL to LLDB binaries directory.")
endif()

# Since Python3.8 the Windows runtime loads dependent DLLs only from the directory of the binary
# itself (and not Path). Windows has no RPATHs, so we must copy all DLLs that we depend on into
# the Python package.
if (WIN32)
# TARGET_RUNTIME_DLLS is supported in CMake 3.21+
if ("${CMAKE_VERSION}" VERSION_LESS "3.21.0")
if (LLDB_INCLUDE_TESTS)
message(SEND_ERROR
"Your CMake version is ${CMAKE_VERSION}. In order to run LLDB tests "
"on Windows please upgrade to 3.21.0 at least (or disable tests with "
"LLDB_INCLUDE_TESTS=Off)")
endif()
else()
add_custom_command(TARGET ${swig_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy -t ${lldb_python_target_dir} $<TARGET_RUNTIME_DLLS:liblldb>
COMMAND_EXPAND_LISTS)
endif()
endif()

endfunction()

Expand Down
2 changes: 2 additions & 0 deletions lldb/cmake/modules/LLDBConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ option(LLDB_SKIP_STRIP "Whether to skip stripping of binaries when installing ll
option(LLDB_SKIP_DSYM "Whether to skip generating a dSYM when installing lldb." OFF)
option(LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS
"Fail to configure if certain requirements are not met for testing." OFF)
option(LLDB_TEST_USE_VENDOR_PACKAGES
"Use packages from lldb/third_party/Python/module instead of system deps." ON)

# BEGIN SWIFT MOD
option(LLDB_ENABLE_WERROR "Fail and stop if a warning is triggered." ${LLVM_ENABLE_WERROR})
Expand Down
7 changes: 1 addition & 6 deletions lldb/packages/Python/lldbsuite/test/builders/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ def getMake(self, test_subdir, test_name):
"""Returns the invocation for GNU make.
The first argument is a tuple of the relative path to the testcase
and its filename stem."""
if platform.system() == "FreeBSD" or platform.system() == "NetBSD":
make = "gmake"
else:
make = "make"

# Construct the base make invocation.
lldb_test = os.environ["LLDB_TEST"]
if not (
Expand All @@ -66,7 +61,7 @@ def getMake(self, test_subdir, test_name):
if not os.path.isfile(makefile):
makefile = os.path.join(build_dir, "Makefile")
return [
make,
configuration.make_path,
"VPATH=" + src_dir,
"-C",
build_dir,
Expand Down
1 change: 1 addition & 0 deletions lldb/packages/Python/lldbsuite/test/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
compiler = None
dsymutil = None
sdkroot = None
make_path = None
swiftCompiler = None
swiftLibrary = None
python = sys.executable
Expand Down
3 changes: 3 additions & 0 deletions lldb/packages/Python/lldbsuite/test/dotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ def parseOptionsAndInitTestdirs():
configuration.compiler = candidate
break

if args.make:
configuration.make_path = args.make

if args.dsymutil:
configuration.dsymutil = args.dsymutil
elif platform_system == "Darwin":
Expand Down
6 changes: 6 additions & 0 deletions lldb/packages/Python/lldbsuite/test/dotest_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ def create_parser():
),
)

group.add_argument(
"--make",
metavar="make",
dest="make",
help=textwrap.dedent("Specify which make to use."),
)
group.add_argument(
"--dsymutil",
metavar="dsymutil",
Expand Down
15 changes: 15 additions & 0 deletions lldb/test/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ set(LLDB_DEFAULT_TEST_EXECUTABLE "${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb${CMAKE_EXEC

set(LLDB_DEFAULT_TEST_DSYMUTIL "${LLVM_TOOLS_BINARY_DIR}/dsymutil${CMAKE_EXECUTABLE_SUFFIX}")

if(LLDB_TEST_MAKE)
set(LLDB_DEFAULT_TEST_MAKE ${LLDB_TEST_MAKE})
else()
find_program(LLDB_DEFAULT_TEST_MAKE make gmake)
if(LLDB_DEFAULT_TEST_MAKE)
message(STATUS "Found make: ${LLDB_DEFAULT_TEST_MAKE}")
else()
message(STATUS "Not found: make")
message(SEND_ERROR
"LLDB tests require 'make' tool. Please pass via `LLDB_TEST_MAKE` "
"(or otherwise disable tests with `LLDB_INCLUDE_TESTS=OFF`)")
endif()
endif()

if (TARGET clang)
set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}")
else()
Expand All @@ -72,6 +86,7 @@ endif()
set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb executable used for testing")
set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors")
set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil used for generating dSYM bundles")
set(LLDB_TEST_MAKE "${LLDB_DEFAULT_TEST_MAKE}" CACHE PATH "make tool used for building test executables")

if ("${LLDB_TEST_COMPILER}" STREQUAL "")
message(FATAL_ERROR "LLDB test compiler not specified. Tests will not run.")
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/commands/expression/top-level/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ all: dummy
include Makefile.rules

dummy: dummy.cpp
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
CXX_SOURCES=dummy.cpp EXE=dummy

4 changes: 2 additions & 2 deletions lldb/test/API/commands/expression/weak_symbols/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ a.out: libdylib.dylib
include Makefile.rules

libdylib.dylib: dylib.c
$(MAKE) -C $(BUILDDIR) -f $(MAKEFILE_RULES) \
"$(MAKE)" -C $(BUILDDIR) -f $(MAKEFILE_RULES) \
C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
CFLAGS_EXTRAS=-DHAS_THEM LD_EXTRAS=-dynamiclib

hidden/libdylib.dylib:
mkdir hidden
$(MAKE) -C $(BUILDDIR)/hidden -f $(MAKEFILE_RULES) \
"$(MAKE)" -C $(BUILDDIR)/hidden -f $(MAKEFILE_RULES) \
C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
LD_EXTRAS=-dynamiclib
2 changes: 1 addition & 1 deletion lldb/test/API/commands/target/create-deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ a.out: libload_a
include Makefile.rules

libload_a:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_NAME=load_a DYLIB_CXX_SOURCES=a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CXX_SOURCES := main.cpp
USE_LIBDL := 1

lib_b:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=lib_b
all: lib_b

Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/completion/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ USE_LIBDL := 1
a.out: lib_shared

lib_shared:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=shared.cpp DYLIB_NAME=shared

include Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ C_SOURCES := main.c
USE_LIBDL := 1

other:
$(MAKE) -f $(MAKEFILE_RULES) C_SOURCES=other.c EXE=other
"$(MAKE)" -f $(MAKEFILE_RULES) C_SOURCES=other.c EXE=other
all: other

include Makefile.rules
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/exec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ all: secondprog
include Makefile.rules

secondprog: secondprog.cpp
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
CXX_SOURCES=secondprog.cpp EXE=secondprog
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/jitloader_gdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ all: a.out simple
include Makefile.rules

simple:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
C_SOURCES=simple.c EXE=simple
4 changes: 2 additions & 2 deletions lldb/test/API/functionalities/limit-debug-info/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ include Makefile.rules
a.out: libone libtwo

libone:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=one.cpp DYLIB_NAME=one \
CFLAGS_EXTRAS="$(ONE_CXXFLAGS)"

libtwo: libone
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=two.cpp DYLIB_NAME=two \
CFLAGS_EXTRAS="$(TWO_CXXFLAGS)" LD_EXTRAS="-L. -lone"
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/load_after_attach/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CXX_SOURCES := main.cpp
USE_LIBDL := 1

lib_b:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=lib_b
all: lib_b

Expand Down
6 changes: 3 additions & 3 deletions lldb/test/API/functionalities/load_lazy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ else
endif

t1: t2_0
$(MAKE) VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_C_SOURCES=t1.c DYLIB_NAME=t1 LD_EXTRAS="-L. $(LINKFLAGS)"

t2_0:
$(MAKE) VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_C_SOURCES=t2_0.c DYLIB_NAME=t2_0

t2_1:
$(MAKE) VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_C_SOURCES=t2_1.c DYLIB_NAME=t2_1
10 changes: 5 additions & 5 deletions lldb/test/API/functionalities/load_unload/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ a.out: lib_b lib_a lib_c lib_d hidden_lib_d
include Makefile.rules

lib_a: lib_b
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=loadunload_a \
LD_EXTRAS="-L. -lloadunload_b"

lib_b:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=loadunload_b

lib_c:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=loadunload_c

lib_d:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d
ifeq ($(OS),Darwin)
install_name_tool -id @executable_path/libloadunload_d.dylib libloadunload_d.dylib
endif

hidden_lib_d: hidden
$(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/load_using_paths/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ all: hidden_lib a.out
include Makefile.rules

hidden_lib:
$(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ all: libinvisible.dylib $(EXE)
include Makefile.rules

libinvisible.dylib: Invisible.swift
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
MAKE_DSYM=YES DYLIB_ONLY=YES DYLIB_NAME=Invisible \
DYLIB_SWIFT_SOURCES="Invisible.swift" \
SWIFTFLAGS_EXTRAS=-I$(BUILDDIR)
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/scripted_process/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ override ARCH := $(shell uname -m)
all: libbaz.dylib a.out

libbaz.dylib: baz.cpp
$(MAKE) -f $(MAKEFILE_RULES) ARCH=$(ARCH) \
"$(MAKE)" -f $(MAKEFILE_RULES) ARCH=$(ARCH) \
DYLIB_ONLY=YES DYLIB_NAME=baz DYLIB_CXX_SOURCES=baz.cpp

include Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ a.out: lib_a lib_b
include Makefile.rules

lib_a:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=load_a

lib_b:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=load_b


Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ a.out: lib_One lib_Two
lib_One: lib_Two

lib_%:
$(MAKE) VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk DSYMUTIL=$(DSYMUTIL)
"$(MAKE)" VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk DSYMUTIL=$(DSYMUTIL)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CXX_SOURCES := main.cpp

include Makefile.rules
CXX_SOURCES := main.cpp
include Makefile.rules
2 changes: 1 addition & 1 deletion lldb/test/API/lang/c/conflicting-symbol/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ include Makefile.rules
a.out: lib_One lib_Two

lib_%:
$(MAKE) VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk
"$(MAKE)" VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk
13 changes: 11 additions & 2 deletions lldb/test/API/lang/c/non-mangled/TestCNonMangled.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,14 @@ def test_functions_having_dlang_mangling_prefix(self):
"""
self.build()
_, _, thread, _ = lldbutil.run_to_name_breakpoint(self, "_Dfunction")
symbol = thread.frame[0].symbol
self.assertEqual(symbol.GetDisplayName(), "_Dfunction")
frame = thread.frame[0]

symbol = frame.symbol
# On Windows the function does not have an associated symbol.
if symbol.IsValid():
self.assertFalse(symbol.mangled)
self.assertEqual(symbol.GetDisplayName(), "_Dfunction")

function = frame.function
self.assertFalse(function.mangled)
self.assertEqual(function.GetDisplayName(), "_Dfunction")
Loading