[Lldb-commits] [lldb] [lldb] Remove more workrounds for Android that have been fixed upstream (PR #124176)

Brad Smith via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 23 11:34:53 PST 2025


https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/124176

>From 7c566663e345b9264c9bd0ae16cddfb3c8066d43 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Thu, 23 Jan 2025 13:19:06 -0500
Subject: [PATCH] [lldb] Remove more workarounds for Android that have been
 fixed upstream

Issues that were fixed 10+ years ago with Bionic libc.
---
 lldb/source/Host/posix/DomainSocket.cpp                   | 8 --------
 lldb/source/Host/posix/ProcessLauncherPosixFork.cpp       | 4 ----
 .../BSD-Archive/ObjectContainerBSDArchive.cpp             | 2 +-
 3 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/lldb/source/Host/posix/DomainSocket.cpp b/lldb/source/Host/posix/DomainSocket.cpp
index be8fcdf2c8f2c8..6c490cdda47ed7 100644
--- a/lldb/source/Host/posix/DomainSocket.cpp
+++ b/lldb/source/Host/posix/DomainSocket.cpp
@@ -20,14 +20,6 @@
 using namespace lldb;
 using namespace lldb_private;
 
-#ifdef __ANDROID__
-// Android does not have SUN_LEN
-#ifndef SUN_LEN
-#define SUN_LEN(ptr)                                                           \
-  (offsetof(struct sockaddr_un, sun_path) + strlen((ptr)->sun_path))
-#endif
-#endif // #ifdef __ANDROID__
-
 static const int kDomain = AF_UNIX;
 static const int kType = SOCK_STREAM;
 
diff --git a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
index 22bf698c71716e..7d856954684c49 100644
--- a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
+++ b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
@@ -24,10 +24,6 @@
 #include <csignal>
 #include <sstream>
 
-#ifdef __ANDROID__
-#define PT_TRACE_ME PTRACE_TRACEME
-#endif
-
 #if defined(__linux__)
 #include <sys/personality.h>
 #endif
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
index b202898ff438a6..6e5617664f7feb 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
@@ -8,7 +8,7 @@
 
 #include "ObjectContainerBSDArchive.h"
 
-#if defined(_WIN32) || defined(__ANDROID__) || defined(_AIX)
+#if defined(_WIN32) || defined(_AIX)
 // Defines from ar, missing on Windows
 #define SARMAG 8
 #define ARFMAG "`\n"



More information about the lldb-commits mailing list