Skip to content

[Reproducer] Don't instrument methods that get called from the signal… #66

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
merged 1 commit into from
Nov 1, 2019
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
2 changes: 2 additions & 0 deletions lldb/include/lldb/Utility/ReproducerInstrumentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ template <typename... Ts> inline std::string stringify_args(const Ts &... ts) {
#define LLDB_RECORD_DUMMY(Result, Class, Method, Signature, ...) \
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION, \
stringify_args(__VA_ARGS__));
#define LLDB_RECORD_DUMMY_NO_ARGS(Result, Class, Method) \
lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION);

namespace lldb_private {
namespace repro {
Expand Down
9 changes: 4 additions & 5 deletions lldb/source/API/SBDebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,14 @@ FILE *SBDebugger::GetErrorFileHandle() {
}

void SBDebugger::SaveInputTerminalState() {
LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, SaveInputTerminalState);
LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, SaveInputTerminalState);

if (m_opaque_sp)
m_opaque_sp->SaveInputTerminalState();
}

void SBDebugger::RestoreInputTerminalState() {
LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, RestoreInputTerminalState);
LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, RestoreInputTerminalState);

if (m_opaque_sp)
m_opaque_sp->RestoreInputTerminalState();
Expand Down Expand Up @@ -1033,7 +1033,7 @@ void SBDebugger::DispatchInput(const void *data, size_t data_len) {
}

void SBDebugger::DispatchInputInterrupt() {
LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, DispatchInputInterrupt);
LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, DispatchInputInterrupt);

if (m_opaque_sp)
m_opaque_sp->DispatchInputInterrupt();
Expand Down Expand Up @@ -1193,8 +1193,7 @@ uint32_t SBDebugger::GetTerminalWidth() const {
}

void SBDebugger::SetTerminalWidth(uint32_t term_width) {
LLDB_RECORD_METHOD(void, SBDebugger, SetTerminalWidth, (uint32_t),
term_width);
LLDB_RECORD_DUMMY(void, SBDebugger, SetTerminalWidth, (uint32_t), term_width);

if (m_opaque_sp)
m_opaque_sp->SetTerminalWidth(term_width);
Expand Down