[lldb/Reproducers] Change the way we instrument void* arguments
The reproducer instrumentation cannot automatically serialize and
deserialize void* arguments. Currently we deal with this by explicitly
preventing these methods from being instrumented. This has the undesired
side effect of breaking replay when that method returns a value later
used by another SB API call.
The solution is to change our approach and instrument these methods.
Instead of using the DUMMY macro, we just make (de)serialization of the
void pointer a NOOP and always return a nullptr.
diff --git a/lldb/tools/lldb-instr/Instrument.cpp b/lldb/tools/lldb-instr/Instrument.cpp
index 9b29700..8ec0130 100644
--- a/lldb/tools/lldb-instr/Instrument.cpp
+++ b/lldb/tools/lldb-instr/Instrument.cpp
@@ -194,10 +194,9 @@
ParamTypes.push_back(T.getAsString(Policy));
ParamNames.push_back(P->getNameAsString());
- // Currently we don't support functions that have void pointers or
- // function pointers as an argument, in which case we insert a dummy
- // macro.
- ShouldInsertDummy |= T->isFunctionPointerType() || T->isVoidPointerType();
+ // Currently we don't support functions that have function pointers as an
+ // argument, in which case we insert a dummy macro.
+ ShouldInsertDummy |= T->isFunctionPointerType();
}
// Convert the two lists to string for the macros.