Skip to content

Commit

Permalink
[lldb] Remove LLDB_RECORD_CHAR_PTR_* macros
Browse files Browse the repository at this point in the history
  • Loading branch information
JDevlieghere committed Jan 10, 2022
1 parent e121269 commit 69c55d6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 34 deletions.
19 changes: 0 additions & 19 deletions lldb/include/lldb/Utility/ReproducerInstrumentation.h
Expand Up @@ -106,25 +106,6 @@ template <typename... Ts> inline std::string stringify_args(const Ts &... ts) {
#define LLDB_RECORD_STATIC_METHOD_NO_ARGS(Result, Class, Method) \
LLDB_RECORD_(Result (*)(), (&Class::Method), lldb_private::repro::EmptyArg())

#define LLDB_RECORD_CHAR_PTR_(T1, T2, StrOut, ...) \
lldb_private::repro::Recorder _recorder(LLVM_PRETTY_FUNCTION, \
stringify_args(__VA_ARGS__));

#define LLDB_RECORD_CHAR_PTR_METHOD(Result, Class, Method, Signature, StrOut, \
...) \
LLDB_RECORD_CHAR_PTR_(Result(Class::*) Signature, (&Class::Method), StrOut, \
this, __VA_ARGS__)

#define LLDB_RECORD_CHAR_PTR_METHOD_CONST(Result, Class, Method, Signature, \
StrOut, ...) \
LLDB_RECORD_CHAR_PTR_(Result(Class::*) Signature const, (&Class::Method), \
StrOut, this, __VA_ARGS__)

#define LLDB_RECORD_CHAR_PTR_STATIC_METHOD(Result, Class, Method, Signature, \
StrOut, ...) \
LLDB_RECORD_CHAR_PTR_(Result(*) Signature, (&Class::Method), StrOut, \
__VA_ARGS__)

/// The LLDB_RECORD_DUMMY macro is special because it doesn't actually record
/// anything. It's used to track API boundaries when we cannot record for
/// technical reasons.
Expand Down
5 changes: 2 additions & 3 deletions lldb/source/API/SBDebugger.cpp
Expand Up @@ -630,9 +630,8 @@ SBSourceManager SBDebugger::GetSourceManager() {
}

bool SBDebugger::GetDefaultArchitecture(char *arch_name, size_t arch_name_len) {
LLDB_RECORD_CHAR_PTR_STATIC_METHOD(bool, SBDebugger, GetDefaultArchitecture,
(char *, size_t), arch_name, "",
arch_name_len);
LLDB_RECORD_STATIC_METHOD(bool, SBDebugger, GetDefaultArchitecture,
(char *, size_t), arch_name, "", arch_name_len);

if (arch_name && arch_name_len) {
ArchSpec default_arch = Target::GetDefaultArchitecture();
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/API/SBFileSpec.cpp
Expand Up @@ -143,8 +143,8 @@ void SBFileSpec::SetDirectory(const char *directory) {
}

uint32_t SBFileSpec::GetPath(char *dst_path, size_t dst_len) const {
LLDB_RECORD_CHAR_PTR_METHOD_CONST(uint32_t, SBFileSpec, GetPath,
(char *, size_t), dst_path, "", dst_len);
LLDB_RECORD_METHOD_CONST(uint32_t, SBFileSpec, GetPath, (char *, size_t),
dst_path, "", dst_len);

uint32_t result = m_opaque_up->GetPath(dst_path, dst_len);

Expand Down
12 changes: 6 additions & 6 deletions lldb/source/API/SBProcess.cpp
Expand Up @@ -268,8 +268,8 @@ size_t SBProcess::PutSTDIN(const char *src, size_t src_len) {
}

size_t SBProcess::GetSTDOUT(char *dst, size_t dst_len) const {
LLDB_RECORD_CHAR_PTR_METHOD_CONST(size_t, SBProcess, GetSTDOUT,
(char *, size_t), dst, "", dst_len);
LLDB_RECORD_METHOD_CONST(size_t, SBProcess, GetSTDOUT, (char *, size_t), dst,
"", dst_len);

size_t bytes_read = 0;
ProcessSP process_sp(GetSP());
Expand All @@ -282,8 +282,8 @@ size_t SBProcess::GetSTDOUT(char *dst, size_t dst_len) const {
}

size_t SBProcess::GetSTDERR(char *dst, size_t dst_len) const {
LLDB_RECORD_CHAR_PTR_METHOD_CONST(size_t, SBProcess, GetSTDERR,
(char *, size_t), dst, "", dst_len);
LLDB_RECORD_METHOD_CONST(size_t, SBProcess, GetSTDERR, (char *, size_t), dst,
"", dst_len);

size_t bytes_read = 0;
ProcessSP process_sp(GetSP());
Expand All @@ -296,8 +296,8 @@ size_t SBProcess::GetSTDERR(char *dst, size_t dst_len) const {
}

size_t SBProcess::GetAsyncProfileData(char *dst, size_t dst_len) const {
LLDB_RECORD_CHAR_PTR_METHOD_CONST(size_t, SBProcess, GetAsyncProfileData,
(char *, size_t), dst, "", dst_len);
LLDB_RECORD_METHOD_CONST(size_t, SBProcess, GetAsyncProfileData,
(char *, size_t), dst, "", dst_len);

size_t bytes_read = 0;
ProcessSP process_sp(GetSP());
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/API/SBStructuredData.cpp
Expand Up @@ -196,8 +196,8 @@ bool SBStructuredData::GetBooleanValue(bool fail_value) const {
}

size_t SBStructuredData::GetStringValue(char *dst, size_t dst_len) const {
LLDB_RECORD_CHAR_PTR_METHOD_CONST(size_t, SBStructuredData, GetStringValue,
(char *, size_t), dst, "", dst_len);
LLDB_RECORD_METHOD_CONST(size_t, SBStructuredData, GetStringValue,
(char *, size_t), dst, "", dst_len);

return m_impl_up->GetStringValue(dst, dst_len);
}
4 changes: 2 additions & 2 deletions lldb/source/API/SBThread.cpp
Expand Up @@ -328,8 +328,8 @@ SBThread::GetStopReasonExtendedBacktraces(InstrumentationRuntimeType type) {
}

size_t SBThread::GetStopDescription(char *dst, size_t dst_len) {
LLDB_RECORD_CHAR_PTR_METHOD(size_t, SBThread, GetStopDescription,
(char *, size_t), dst, "", dst_len);
LLDB_RECORD_METHOD(size_t, SBThread, GetStopDescription, (char *, size_t),
dst, "", dst_len);

std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
Expand Down

0 comments on commit 69c55d6

Please sign in to comment.