Skip to content

Conversation

JDevlieghere
Copy link

No description provided.

chelcassanova and others added 8 commits September 11, 2025 10:46
…pt 2 (llvm#148996)

Second attempt at relanding the lldb-rpc-gen tool. This should fix 2
issues:

- An assert that was hitting when building on Linux. The assert would
hit in the server source emitter, specifically when attemping to
determine the storage size for a return type is that is a pointer, but
isn't a const char *, const char ** or void pointer.

The assert would hit when attempting to generate
SBAttachInfo::GetProcessPluginName, which returns a const char *
(meaning it shouldn't have been in the code block for the assert at
all). The reason that it was hitting the assert when generating this
function is that lldb_rpc_gen::TypeIsConstCharPtr was returning false
for this function even though it did return a const char *. This was
happening because when checking the return type for a const char *,
TypeIsConstCharPtr would only check that the underlying type was a
signed char. This failed on Linux (but was fine on Darwin), as the
underlying type also needs to be checked for being an unsigned char.

- Cross compiling support

The build for lldb-rpc-gen had no support for cross compiling and as
such, the sources generated for lldb-rpc-gen would get compiled too
early in phase 2 when cross compiling, before the Clang toolchain was
built and this led to an error when trying to include stdlib files. This
reland splits this build into 2 by building the tool first and then
compiling the sources in the second stage of the cross-compiled build.

Original PR Description:
This commit upstreams the lldb-rpc-gen tool, a ClangTool that generates
the LLDB RPC client and server interfaces. This tool, as well as LLDB
RPC itself is built by default. If it needs to be disabled, put
-DLLDB_BUILD_LLDBRPC=OFF in your CMake invocation.

https://discourse.llvm.org/t/rfc-upstreaming-lldb-rpc/85804

Original PR Link:
github.com/llvm/pull/138031

(cherry picked from commit 68c8c8c)
This commit fixes the target that stages headers in the build dir's
include directory so that the headers are staged correctly so that the
target for liblldbrpc-headers can depend on it properly

(cherry picked from commit dfe9fcc)
The instructions to build LLDB standalone contain a CMake configure step
to build LLVM standalone. This configure step needs to also have the
CMake build type in order to work.

(cherry picked from commit 4396c87)
Disabling the lldb-rpc-gen tool while issues with certain builds are
solved: llvm#148996

(cherry picked from commit 67b5195)
The LLDB standalone build using Xcode currently fails due to the headers
being attached to multiple targets, but none of these targets depending
on each other. This commit resolves this by creating those dependencies.

(cherry picked from commit c162846)
Removes the U that comes before the guards passed into the framework
fixup script.

(cherry picked from commit cade1e2)
The original version of the framework fixup script is no longer being
used and should be able to be removed.

(cherry picked from commit 9815210)
@JDevlieghere JDevlieghere merged commit ab98fa0 into stable/21.x Sep 11, 2025
@JDevlieghere JDevlieghere deleted the cherrypick-missing-rpc-commits branch September 11, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants