[all-commits] [llvm/llvm-project] 2f025b: [lldb/Reproducers] Implement custom replayers for ...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Wed Feb 5 20:00:08 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 2f025bb87c33a25e3a0d226cdb663f237ccd602e
https://github.com/llvm/llvm-project/commit/2f025bb87c33a25e3a0d226cdb663f237ccd602e
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2020-02-05 (Wed, 05 Feb 2020)
Changed paths:
M lldb/include/lldb/Utility/ReproducerInstrumentation.h
M lldb/source/API/SBDebugger.cpp
M lldb/source/API/SBFileSpec.cpp
M lldb/source/API/SBProcess.cpp
M lldb/source/API/SBStructuredData.cpp
M lldb/source/API/SBThread.cpp
Log Message:
-----------
[lldb/Reproducers] Implement custom replayers for (char *, size_t)
Some SB API methods returns strings through a char* and a length. This
is a problem for the deserializer, which considers a single type at a
time, and therefore cannot know how many bytes to allocate for the
character buffer.
We can solve this problem by implementing a custom replayer, which
ignores the passed-in char* and allocates a buffer of the correct size
itself, before invoking the original API method or function.
This patch adds three new macros to register a custom replayer for
methods that take a char* and a size_t. It supports arbitrary return
values (some functions return a bool while others return a size_t).
More information about the All-commits
mailing list