[Lldb-commits] [PATCH] D64112: Add plugin.process.gdb-remote.use-libraries-svr4 option
António Afonso via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 3 10:32:15 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL365059: Add plugin.process.gdb-remote.use-libraries-svr4 option (authored by aadsm, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D64112?vs=207652&id=207835#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64112/new/
https://reviews.llvm.org/D64112
Files:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -111,18 +111,40 @@
namespace {
static constexpr PropertyDefinition g_properties[] = {
- {"packet-timeout", OptionValue::eTypeUInt64, true, 5
+ {"packet-timeout",
+ OptionValue::eTypeUInt64,
+ true,
+ 5
#if defined(__has_feature)
#if __has_feature(address_sanitizer)
* 2
#endif
#endif
- , nullptr, {},
+ ,
+ nullptr,
+ {},
"Specify the default packet timeout in seconds."},
- {"target-definition-file", OptionValue::eTypeFileSpec, true, 0, nullptr, {},
- "The file that provides the description for remote target registers."}};
-
-enum { ePropertyPacketTimeout, ePropertyTargetDefinitionFile };
+ {"target-definition-file",
+ OptionValue::eTypeFileSpec,
+ true,
+ 0,
+ nullptr,
+ {},
+ "The file that provides the description for remote target registers."},
+ {"use-libraries-svr4",
+ OptionValue::eTypeBoolean,
+ true,
+ false,
+ nullptr,
+ {},
+ "If true, the libraries-svr4 feature will be used to get a hold of the "
+ "process's loaded modules."}};
+
+enum {
+ ePropertyPacketTimeout,
+ ePropertyTargetDefinitionFile,
+ ePropertyUseSVR4
+};
class PluginProperties : public Properties {
public:
@@ -152,6 +174,12 @@
const uint32_t idx = ePropertyTargetDefinitionFile;
return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx);
}
+
+ bool GetUseSVR4() const {
+ const uint32_t idx = ePropertyUseSVR4;
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(
+ nullptr, idx, g_properties[idx].default_uint_value != 0);
+ }
};
typedef std::shared_ptr<PluginProperties> ProcessKDPPropertiesSP;
@@ -4681,9 +4709,10 @@
log->Printf("ProcessGDBRemote::%s", __FUNCTION__);
GDBRemoteCommunicationClient &comm = m_gdb_comm;
+ bool can_use_svr4 = GetGlobalPluginProperties()->GetUseSVR4();
// check that we have extended feature read support
- if (comm.GetQXferLibrariesSVR4ReadSupported()) {
+ if (can_use_svr4 && comm.GetQXferLibrariesSVR4ReadSupported()) {
list.clear();
// request the loaded library list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64112.207835.patch
Type: text/x-patch
Size: 2383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190703/a6041d96/attachment-0001.bin>
More information about the lldb-commits
mailing list