Skip to content

Commit 5223217

Browse files
committed
Try to fix Windows CI
1 parent 6b573f1 commit 5223217

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

libcxx/include/__config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
15681568
# define _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
15691569
# endif
15701570

1571-
# if (defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__) || defined(_WIN32)) && \
1571+
# if (defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__) || defined(_LIBCPP_WIN32API)) && \
15721572
!defined(__PICOLIBC__) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_DEBUGGING)
15731573
# define _LIBCPP_HAS_DEBUGGING
15741574
# endif

libcxx/src/debugging.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ bool __is_debugger_present() noexcept {
102102
# elif defined(__linux__)
103103

104104
bool __is_debugger_present() noexcept {
105+
# if defined(_LIBCPP_HAS_NO_FILESYSTEM)
106+
_LIBCPP_ASSERT_INTERNAL(false,
107+
"Function is not available. Could not open '/proc/self/status' for reading, libc++ was "
108+
"compiled with _LIBCPP_HAS_NO_FILESYSTEM.");
109+
return false;
110+
# elif defined(_LIBCPP_HAS_NO_LOCALIZATION)
111+
_LIBCPP_ASSERT_INTERNAL(false,
112+
"Function is not available. Could not open '/proc/self/status' for reading, libc++ was "
113+
"compiled with _LIBCPP_HAS_NO_LOCALIZATION.");
114+
return false;
115+
# else
105116
// https://docs.kernel.org/filesystems/proc.html
106117

107118
// Get the status information of a process by reading the file /proc/PID/status.
@@ -124,6 +135,7 @@ bool __is_debugger_present() noexcept {
124135
}
125136

126137
return false;
138+
# endif // _LIBCPP_HAS_NO_FILESYSTEM
127139
}
128140

129141
# else

libcxx/test/std/utilities/debugging/is_debugger_present_with_debugger_gdb.sh.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
1010
// REQUIRES: host-has-gdb-with-python
11-
// UNSUPPORTED: android
11+
// The Android libc++ tests are run on a non-Android host, connected to an
12+
// Android device over adb. gdb needs special support to make this work (e.g.
13+
// gdbclient.py, ndk-gdb.py, gdbserver), and the Android organization doesn't
14+
// support gdb anymore, favoring lldb instead.
15+
// UNSUPPORTED: android, linux && no-filesystem && no-localization
1216
// XFAIL: LIBCXX-AIX-FIXME, LIBCXX-PICOLIBC-FIXME
1317

1418
// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} -g %{link_flags}
15-
// RUN: %{gdb} %t.exe -ex "source %S/is_debugger_present_with_debugger_gdb.py" --silent
19+
// RUN: "%{gdb}" %t.exe -ex "source %S/is_debugger_present_with_debugger_gdb.py" --silent
1620

1721
// <debugging>
1822

libcxx/test/std/utilities/debugging/is_debugger_present_with_debugger_lldb.sh.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
1010
// REQUIRES: host-has-lldb-with-python
11-
// UNSUPPORTED: android
11+
// The Android libc++ tests are run on a non-Android host, connected to an
12+
// Android device over adb.
13+
// UNSUPPORTED: android, linux && no-filesystem && no-localization
1214
// XFAIL: LIBCXX-AIX-FIXME, LIBCXX-PICOLIBC-FIXME
1315

1416
// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} -g %{link_flags}
15-
// RUN: %{lldb} %t.exe -o "command script import %S/is_debugger_present_with_debugger_lldb.py"
17+
// RUN: "%{lldb}" %t.exe -o "command script import %S/is_debugger_present_with_debugger_lldb.py"
1618

1719
// <debugging>
1820

0 commit comments

Comments
 (0)