Skip to content

[lldb][RPC] Upstream RPC server interface emitters #138032

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This ia a basic header file used to check that the server-side emitter
// for rpc-gen emits an expected set of includes in a generated source file.
#ifndef LLDB_API_SBRPC_CHECKBASICINCLUDE_H
#define LLDB_API_SBRPC_CHECKBASICINCLUDE_H

#endif // LLDB_API_SBRPC_CHECKBASICINCLUDE_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef LLDB_API_SBRPC_CHECKCONSTCHARPOINTER_H
#define LLDB_API_SBRPC_CHECKCONSTCHARPOINTER_H

namespace lldb {
class LLDB_API SBRPC_CHECKCONSTCHARPOINTER {
public:
// const char * parameters must decoded as rpc_common::ConstCharPointer in server side
// source files.
int CheckConstCharPointer(char *string);

}; // class SBRPC_CHECKCONSTCHARPOINTER
} // namespace lldb

#endif // LLDB_API_SBRPC_CHECKCONSTCHARPOINTER_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Disabling until the lldb-rpc-gen tool lands.
XFAIL: *
RUN: mkdir -p %t/server
RUN: mkdir -p %t/lib
RUN: %lldb-rpc-gen --output-dir=%t %S/../../Inputs/CheckBasicIncludesEmit.h

RUN: cat %t/lib/CheckBasicIncludesEmit.cpp | FileCheck %s

# All server-side source files must have these includes at the top of their files.
CHECK: #include "RPCUserServer.h"
CHECK: #include "SBAPI.h"
CHECK: #include <lldb-rpc/common/RPCArgument.h>
CHECK: #include <lldb-rpc/common/RPCCommon.h>
CHECK: #include <lldb-rpc/common/RPCFunction.h>
CHECK: #include <lldb/API/LLDB.h>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Disabling until the lldb-rpc-gen tool lands.
XFAIL: *
RUN: mkdir -p %t/server
RUN: mkdir -p %t/lib
RUN: %lldb-rpc-gen --output-dir=%t %S/../../Inputs/CheckConstCharPointer.h

RUN: cat %t/lib/CheckConstCharPointer.cpp | FileCheck %s

# const char * pointers must be decoded as rpc_common::ConstCharPointer objects
# in server side source files.
CHECK: rpc_common::ConstCharPointer string
Loading
Loading