[Lldb-commits] [lldb] da4b743 - [lldb] Remove LLDB_RECORD_DUMMY_* macros
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 10 12:06:09 PST 2022
Author: Jonas Devlieghere
Date: 2022-01-10T12:05:54-08:00
New Revision: da4b7437f932570227b9debecc031a40875445fa
URL: https://github.com/llvm/llvm-project/commit/da4b7437f932570227b9debecc031a40875445fa
DIFF: https://github.com/llvm/llvm-project/commit/da4b7437f932570227b9debecc031a40875445fa.diff
LOG: [lldb] Remove LLDB_RECORD_DUMMY_* macros
Added:
Modified:
lldb/source/API/SBBreakpoint.cpp
lldb/source/API/SBBreakpointName.cpp
lldb/source/API/SBCommandInterpreter.cpp
lldb/source/API/SBCommandReturnObject.cpp
lldb/source/API/SBCommunication.cpp
lldb/source/API/SBData.cpp
lldb/source/API/SBDebugger.cpp
lldb/source/API/SBExpressionOptions.cpp
lldb/source/API/SBHostOS.cpp
lldb/source/API/SBProcess.cpp
lldb/source/API/SBTypeSummary.cpp
Removed:
################################################################################
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index fc0c61c17a6a..709895e8bbc9 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -601,8 +601,8 @@ SBStructuredData SBBreakpoint::SerializeToStructuredData() {
}
void SBBreakpoint::SetCallback(SBBreakpointHitCallback callback, void *baton) {
- LLDB_RECORD_DUMMY(void, SBBreakpoint, SetCallback,
- (lldb::SBBreakpointHitCallback, void *), callback, baton);
+ LLDB_RECORD_METHOD(void, SBBreakpoint, SetCallback,
+ (lldb::SBBreakpointHitCallback, void *), callback, baton);
BreakpointSP bkpt_sp = GetSP();
diff --git a/lldb/source/API/SBBreakpointName.cpp b/lldb/source/API/SBBreakpointName.cpp
index a8b6f33ce997..2937cb9e03d8 100644
--- a/lldb/source/API/SBBreakpointName.cpp
+++ b/lldb/source/API/SBBreakpointName.cpp
@@ -550,8 +550,8 @@ bool SBBreakpointName::GetDescription(SBStream &s) {
void SBBreakpointName::SetCallback(SBBreakpointHitCallback callback,
void *baton) {
- LLDB_RECORD_DUMMY(void, SBBreakpointName, SetCallback,
- (lldb::SBBreakpointHitCallback, void *), callback, baton);
+ LLDB_RECORD_METHOD(void, SBBreakpointName, SetCallback,
+ (lldb::SBBreakpointHitCallback, void *), callback, baton);
BreakpointName *bp_name = GetBreakpointName();
if (!bp_name)
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index 02370607daad..d543246edcb4 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -551,9 +551,9 @@ bool SBCommandInterpreter::EventIsCommandInterpreterEvent(
bool SBCommandInterpreter::SetCommandOverrideCallback(
const char *command_name, lldb::CommandOverrideCallback callback,
void *baton) {
- LLDB_RECORD_DUMMY(bool, SBCommandInterpreter, SetCommandOverrideCallback,
- (const char *, lldb::CommandOverrideCallback, void *),
- command_name, callback, baton);
+ LLDB_RECORD_METHOD(bool, SBCommandInterpreter, SetCommandOverrideCallback,
+ (const char *, lldb::CommandOverrideCallback, void *),
+ command_name, callback, baton);
if (command_name && command_name[0] && IsValid()) {
llvm::StringRef command_name_str = command_name;
diff --git a/lldb/source/API/SBCommandReturnObject.cpp b/lldb/source/API/SBCommandReturnObject.cpp
index f88f0007a143..505145d75ce8 100644
--- a/lldb/source/API/SBCommandReturnObject.cpp
+++ b/lldb/source/API/SBCommandReturnObject.cpp
@@ -114,7 +114,7 @@ size_t SBCommandReturnObject::GetErrorSize() {
}
size_t SBCommandReturnObject::PutOutput(FILE *fh) {
- LLDB_RECORD_DUMMY(size_t, SBCommandReturnObject, PutOutput, (FILE *), fh);
+ LLDB_RECORD_METHOD(size_t, SBCommandReturnObject, PutOutput, (FILE *), fh);
if (fh) {
size_t num_bytes = GetOutputSize();
if (num_bytes)
@@ -139,7 +139,7 @@ size_t SBCommandReturnObject::PutOutput(SBFile file) {
}
size_t SBCommandReturnObject::PutError(FILE *fh) {
- LLDB_RECORD_DUMMY(size_t, SBCommandReturnObject, PutError, (FILE *), fh);
+ LLDB_RECORD_METHOD(size_t, SBCommandReturnObject, PutError, (FILE *), fh);
if (fh) {
size_t num_bytes = GetErrorSize();
if (num_bytes)
@@ -252,31 +252,31 @@ bool SBCommandReturnObject::GetDescription(SBStream &description) {
}
void SBCommandReturnObject::SetImmediateOutputFile(FILE *fh) {
- LLDB_RECORD_DUMMY(void, SBCommandReturnObject, SetImmediateOutputFile,
- (FILE *), fh);
+ LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
+ (FILE *), fh);
SetImmediateOutputFile(fh, false);
}
void SBCommandReturnObject::SetImmediateErrorFile(FILE *fh) {
- LLDB_RECORD_DUMMY(void, SBCommandReturnObject, SetImmediateErrorFile,
- (FILE *), fh);
+ LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
+ (FILE *), fh);
SetImmediateErrorFile(fh, false);
}
void SBCommandReturnObject::SetImmediateOutputFile(FILE *fh,
bool transfer_ownership) {
- LLDB_RECORD_DUMMY(void, SBCommandReturnObject, SetImmediateOutputFile,
- (FILE *, bool), fh, transfer_ownership);
+ LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
+ (FILE *, bool), fh, transfer_ownership);
FileSP file = std::make_shared<NativeFile>(fh, transfer_ownership);
ref().SetImmediateOutputFile(file);
}
void SBCommandReturnObject::SetImmediateErrorFile(FILE *fh,
bool transfer_ownership) {
- LLDB_RECORD_DUMMY(void, SBCommandReturnObject, SetImmediateErrorFile,
- (FILE *, bool), fh, transfer_ownership);
+ LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
+ (FILE *, bool), fh, transfer_ownership);
FileSP file = std::make_shared<NativeFile>(fh, transfer_ownership);
ref().SetImmediateErrorFile(file);
}
diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp
index e451e74675db..79a95c9dad62 100644
--- a/lldb/source/API/SBCommunication.cpp
+++ b/lldb/source/API/SBCommunication.cpp
@@ -107,9 +107,9 @@ bool SBCommunication::IsConnected() const {
size_t SBCommunication::Read(void *dst, size_t dst_len, uint32_t timeout_usec,
ConnectionStatus &status) {
- LLDB_RECORD_DUMMY(size_t, SBCommunication, Read,
- (void *, size_t, uint32_t, lldb::ConnectionStatus &), dst,
- dst_len, timeout_usec, status);
+ LLDB_RECORD_METHOD(size_t, SBCommunication, Read,
+ (void *, size_t, uint32_t, lldb::ConnectionStatus &), dst,
+ dst_len, timeout_usec, status);
size_t bytes_read = 0;
Timeout<std::micro> timeout = timeout_usec == UINT32_MAX
@@ -125,9 +125,9 @@ size_t SBCommunication::Read(void *dst, size_t dst_len, uint32_t timeout_usec,
size_t SBCommunication::Write(const void *src, size_t src_len,
ConnectionStatus &status) {
- LLDB_RECORD_DUMMY(size_t, SBCommunication, Write,
- (const void *, size_t, lldb::ConnectionStatus &), src,
- src_len, status);
+ LLDB_RECORD_METHOD(size_t, SBCommunication, Write,
+ (const void *, size_t, lldb::ConnectionStatus &), src,
+ src_len, status);
size_t bytes_written = 0;
if (m_opaque)
@@ -158,9 +158,9 @@ bool SBCommunication::ReadThreadIsRunning() {
bool SBCommunication::SetReadThreadBytesReceivedCallback(
ReadThreadBytesReceived callback, void *callback_baton) {
- LLDB_RECORD_DUMMY(bool, SBCommunication, SetReadThreadBytesReceivedCallback,
- (lldb::SBCommunication::ReadThreadBytesReceived, void *),
- callback, callback_baton);
+ LLDB_RECORD_METHOD(bool, SBCommunication, SetReadThreadBytesReceivedCallback,
+ (lldb::SBCommunication::ReadThreadBytesReceived, void *),
+ callback, callback_baton);
bool result = false;
if (m_opaque) {
diff --git a/lldb/source/API/SBData.cpp b/lldb/source/API/SBData.cpp
index ba33995d7acd..e58f032a4f9c 100644
--- a/lldb/source/API/SBData.cpp
+++ b/lldb/source/API/SBData.cpp
@@ -342,9 +342,9 @@ bool SBData::GetDescription(lldb::SBStream &description,
size_t SBData::ReadRawData(lldb::SBError &error, lldb::offset_t offset,
void *buf, size_t size) {
- LLDB_RECORD_DUMMY(size_t, SBData, ReadRawData,
- (lldb::SBError &, lldb::offset_t, void *, size_t), error,
- offset, buf, size);
+ LLDB_RECORD_METHOD(size_t, SBData, ReadRawData,
+ (lldb::SBError &, lldb::offset_t, void *, size_t), error,
+ offset, buf, size);
void *ok = nullptr;
if (!m_opaque_sp.get()) {
@@ -360,7 +360,7 @@ size_t SBData::ReadRawData(lldb::SBError &error, lldb::offset_t offset,
void SBData::SetData(lldb::SBError &error, const void *buf, size_t size,
lldb::ByteOrder endian, uint8_t addr_size) {
- LLDB_RECORD_DUMMY(
+ LLDB_RECORD_METHOD(
void, SBData, SetData,
(lldb::SBError &, const void *, size_t, lldb::ByteOrder, uint8_t), error,
buf, size, endian, addr_size);
@@ -377,10 +377,10 @@ void SBData::SetData(lldb::SBError &error, const void *buf, size_t size,
void SBData::SetDataWithOwnership(lldb::SBError &error, const void *buf,
size_t size, lldb::ByteOrder endian,
uint8_t addr_size) {
- LLDB_RECORD_DUMMY(
+ LLDB_RECORD_METHOD(
void, SBData, SetData,
(lldb::SBError &, const void *, size_t, lldb::ByteOrder, uint8_t, bool),
- error, buf, size, endian, addr_size, copy);
+ error, buf, size, endian, addr_size);
lldb::DataBufferSP buffer_sp = std::make_shared<DataBufferHeap>(buf, size);
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index be2d31f8f527..aa7d4805cf14 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -105,7 +105,7 @@ SBError SBInputReader::Initialize(
unsigned long),
void *a, lldb::InputReaderGranularity b, char const *c, char const *d,
bool e) {
- LLDB_RECORD_DUMMY(
+ LLDB_RECORD_METHOD(
lldb::SBError, SBInputReader, Initialize,
(lldb::SBDebugger &,
unsigned long (*)(void *, lldb::SBInputReader *, lldb::InputReaderAction,
@@ -233,9 +233,9 @@ SBDebugger SBDebugger::Create(bool source_init_files,
lldb::LogOutputCallback callback, void *baton)
{
- LLDB_RECORD_DUMMY(lldb::SBDebugger, SBDebugger, Create,
- (bool, lldb::LogOutputCallback, void *), source_init_files,
- callback, baton);
+ LLDB_RECORD_STATIC_METHOD(lldb::SBDebugger, SBDebugger, Create,
+ (bool, lldb::LogOutputCallback, void *),
+ source_init_files, callback, baton);
SBDebugger debugger;
@@ -481,14 +481,14 @@ SBFile SBDebugger::GetErrorFile() {
}
void SBDebugger::SaveInputTerminalState() {
- LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, SaveInputTerminalState);
+ LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, SaveInputTerminalState);
if (m_opaque_sp)
m_opaque_sp->SaveInputTerminalState();
}
void SBDebugger::RestoreInputTerminalState() {
- LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, RestoreInputTerminalState);
+ LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, RestoreInputTerminalState);
if (m_opaque_sp)
m_opaque_sp->RestoreInputTerminalState();
@@ -1169,15 +1169,15 @@ SBStructuredData SBDebugger::GetAvailablePlatformInfoAtIndex(uint32_t idx) {
}
void SBDebugger::DispatchInput(void *baton, const void *data, size_t data_len) {
- LLDB_RECORD_DUMMY(void, SBDebugger, DispatchInput,
- (void *, const void *, size_t), baton, data, data_len);
+ LLDB_RECORD_METHOD(void, SBDebugger, DispatchInput,
+ (void *, const void *, size_t), baton, data, data_len);
DispatchInput(data, data_len);
}
void SBDebugger::DispatchInput(const void *data, size_t data_len) {
- LLDB_RECORD_DUMMY(void, SBDebugger, DispatchInput, (const void *, size_t),
- data, data_len);
+ LLDB_RECORD_METHOD(void, SBDebugger, DispatchInput, (const void *, size_t),
+ data, data_len);
// Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
//
@@ -1194,7 +1194,7 @@ void SBDebugger::DispatchInput(const void *data, size_t data_len) {
}
void SBDebugger::DispatchInputInterrupt() {
- LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, DispatchInputInterrupt);
+ LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, DispatchInputInterrupt);
if (m_opaque_sp)
m_opaque_sp->DispatchInputInterrupt();
@@ -1373,7 +1373,8 @@ uint32_t SBDebugger::GetTerminalWidth() const {
}
void SBDebugger::SetTerminalWidth(uint32_t term_width) {
- LLDB_RECORD_DUMMY(void, SBDebugger, SetTerminalWidth, (uint32_t), term_width);
+ LLDB_RECORD_METHOD(void, SBDebugger, SetTerminalWidth, (uint32_t),
+ term_width);
if (m_opaque_sp)
m_opaque_sp->SetTerminalWidth(term_width);
@@ -1702,8 +1703,8 @@ bool SBDebugger::EnableLog(const char *channel, const char **categories) {
void SBDebugger::SetLoggingCallback(lldb::LogOutputCallback log_callback,
void *baton) {
- LLDB_RECORD_DUMMY(void, SBDebugger, SetLoggingCallback,
- (lldb::LogOutputCallback, void *), log_callback, baton);
+ LLDB_RECORD_METHOD(void, SBDebugger, SetLoggingCallback,
+ (lldb::LogOutputCallback, void *), log_callback, baton);
if (m_opaque_sp) {
return m_opaque_sp->SetLoggingCallback(log_callback, baton);
diff --git a/lldb/source/API/SBExpressionOptions.cpp b/lldb/source/API/SBExpressionOptions.cpp
index 3fe861a6124b..6dfff7ee4603 100644
--- a/lldb/source/API/SBExpressionOptions.cpp
+++ b/lldb/source/API/SBExpressionOptions.cpp
@@ -177,8 +177,8 @@ void SBExpressionOptions::SetLanguage(lldb::LanguageType language) {
void SBExpressionOptions::SetCancelCallback(
lldb::ExpressionCancelCallback callback, void *baton) {
- LLDB_RECORD_DUMMY(void, SBExpressionOptions, SetCancelCallback,
- (lldb::ExpressionCancelCallback, void *), callback, baton);
+ LLDB_RECORD_METHOD(void, SBExpressionOptions, SetCancelCallback,
+ (lldb::ExpressionCancelCallback, void *), callback, baton);
m_opaque_up->SetCancelCallback(callback, baton);
}
diff --git a/lldb/source/API/SBHostOS.cpp b/lldb/source/API/SBHostOS.cpp
index c8703c1aa3ea..5bcb83d95ae7 100644
--- a/lldb/source/API/SBHostOS.cpp
+++ b/lldb/source/API/SBHostOS.cpp
@@ -104,9 +104,9 @@ SBFileSpec SBHostOS::GetUserHomeDirectory() {
lldb::thread_t SBHostOS::ThreadCreate(const char *name,
lldb::thread_func_t thread_function,
void *thread_arg, SBError *error_ptr) {
- LLDB_RECORD_DUMMY(lldb::thread_t, SBHostOS, ThreadCreate,
- (lldb::thread_func_t, void *, SBError *), name,
- thread_function, thread_arg, error_ptr);
+ LLDB_RECORD_STATIC_METHOD(lldb::thread_t, SBHostOS, ThreadCreate,
+ (lldb::thread_func_t, void *, SBError *), name,
+ thread_function, thread_arg, error_ptr);
llvm::Expected<HostThread> thread =
ThreadLauncher::LaunchThread(name, thread_function, thread_arg);
if (!thread) {
@@ -126,7 +126,7 @@ void SBHostOS::ThreadCreated(const char *name) {
}
bool SBHostOS::ThreadCancel(lldb::thread_t thread, SBError *error_ptr) {
- LLDB_RECORD_DUMMY(bool, SBHostOS, ThreadCancel,
+ LLDB_RECORD_STATIC_METHOD(bool, SBHostOS, ThreadCancel,
(lldb::thread_t, lldb::SBError *), thread,
error_ptr);
@@ -140,7 +140,7 @@ bool SBHostOS::ThreadCancel(lldb::thread_t thread, SBError *error_ptr) {
}
bool SBHostOS::ThreadDetach(lldb::thread_t thread, SBError *error_ptr) {
- LLDB_RECORD_DUMMY(bool, SBHostOS, ThreadDetach,
+ LLDB_RECORD_STATIC_METHOD(bool, SBHostOS, ThreadDetach,
(lldb::thread_t, lldb::SBError *), thread,
error_ptr);
@@ -160,7 +160,7 @@ bool SBHostOS::ThreadDetach(lldb::thread_t thread, SBError *error_ptr) {
bool SBHostOS::ThreadJoin(lldb::thread_t thread, lldb::thread_result_t *result,
SBError *error_ptr) {
- LLDB_RECORD_DUMMY(
+ LLDB_RECORD_STATIC_METHOD(
bool, SBHostOS, ThreadJoin,
(lldb::thread_t, lldb::thread_result_t *, lldb::SBError *), thread,
result, error_ptr);
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index eec308669e55..d598e483028d 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -842,9 +842,9 @@ const char *SBProcess::GetBroadcasterClass() {
size_t SBProcess::ReadMemory(addr_t addr, void *dst, size_t dst_len,
SBError &sb_error) {
- LLDB_RECORD_DUMMY(size_t, SBProcess, ReadMemory,
- (lldb::addr_t, void *, size_t, lldb::SBError &), addr, dst,
- dst_len, sb_error);
+ LLDB_RECORD_METHOD(size_t, SBProcess, ReadMemory,
+ (lldb::addr_t, void *, size_t, lldb::SBError &), addr, dst,
+ dst_len, sb_error);
size_t bytes_read = 0;
@@ -869,9 +869,9 @@ size_t SBProcess::ReadMemory(addr_t addr, void *dst, size_t dst_len,
size_t SBProcess::ReadCStringFromMemory(addr_t addr, void *buf, size_t size,
lldb::SBError &sb_error) {
- LLDB_RECORD_DUMMY(size_t, SBProcess, ReadCStringFromMemory,
- (lldb::addr_t, void *, size_t, lldb::SBError &), addr, buf,
- size, sb_error);
+ LLDB_RECORD_METHOD(size_t, SBProcess, ReadCStringFromMemory,
+ (lldb::addr_t, void *, size_t, lldb::SBError &), addr, buf,
+ size, sb_error);
size_t bytes_read = 0;
ProcessSP process_sp(GetSP());
@@ -939,9 +939,9 @@ lldb::addr_t SBProcess::ReadPointerFromMemory(addr_t addr,
size_t SBProcess::WriteMemory(addr_t addr, const void *src, size_t src_len,
SBError &sb_error) {
- LLDB_RECORD_DUMMY(size_t, SBProcess, WriteMemory,
- (lldb::addr_t, const void *, size_t, lldb::SBError &), addr,
- src, src_len, sb_error);
+ LLDB_RECORD_METHOD(size_t, SBProcess, WriteMemory,
+ (lldb::addr_t, const void *, size_t, lldb::SBError &),
+ addr, src, src_len, sb_error);
size_t bytes_written = 0;
diff --git a/lldb/source/API/SBTypeSummary.cpp b/lldb/source/API/SBTypeSummary.cpp
index 8fbb47302f68..af0888078d8f 100644
--- a/lldb/source/API/SBTypeSummary.cpp
+++ b/lldb/source/API/SBTypeSummary.cpp
@@ -153,7 +153,7 @@ SBTypeSummary SBTypeSummary::CreateWithScriptCode(const char *data,
SBTypeSummary SBTypeSummary::CreateWithCallback(FormatCallback cb,
uint32_t options,
const char *description) {
- LLDB_RECORD_DUMMY(
+ LLDB_RECORD_STATIC_METHOD(
lldb::SBTypeSummary, SBTypeSummary, CreateWithCallback,
(lldb::SBTypeSummary::FormatCallback, uint32_t, const char *), cb,
options, description);
More information about the lldb-commits
mailing list