summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-07-29 16:41:30 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-07-29 16:41:30 +0000
commita8ea595509f33834091fb9e3234a373f83d709a8 (patch)
tree083004a39520082ad3caba6186c23d41ffb4ee6a /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parentcc0bc941d4ebd0275fe206d78f395822258e73bc (diff)
downloadbcm5719-llvm-a8ea595509f33834091fb9e3234a373f83d709a8.tar.gz
bcm5719-llvm-a8ea595509f33834091fb9e3234a373f83d709a8.zip
[lldb] Also include the array definition in Properties.inc
Right now our Properties.inc only generates the initializer for the options list but not the array declaration boilerplate around it. As the array definition is identical for all arrays, we might as well also let the Properties.inc generate it alongside the initializers. Unfortunately we cannot do the same for enums, as there's this magic ePropertyExperimental, which needs to come at the end to be interpreted correctly. Hopefully we can get rid of this in the future and do the same for the property enums. Differential revision: https://reviews.llvm.org/D65353 llvm-svn: 367238
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index ade1d84b16b..51670adc2a6 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -110,10 +110,8 @@ void DumpProcessGDBRemotePacketHistory(void *p, const char *path) {
namespace {
-static constexpr PropertyDefinition g_properties[] = {
#define LLDB_PROPERTIES_processgdbremote
#include "Properties.inc"
-};
enum {
#define LLDB_PROPERTIES_processgdbremote
@@ -128,7 +126,7 @@ public:
PluginProperties() : Properties() {
m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
- m_collection_sp->Initialize(g_properties);
+ m_collection_sp->Initialize(g_processgdbremote_properties);
}
~PluginProperties() override {}
@@ -136,7 +134,7 @@ public:
uint64_t GetPacketTimeout() {
const uint32_t idx = ePropertyPacketTimeout;
return m_collection_sp->GetPropertyAtIndexAsUInt64(
- nullptr, idx, g_properties[idx].default_uint_value);
+ nullptr, idx, g_processgdbremote_properties[idx].default_uint_value);
}
bool SetPacketTimeout(uint64_t timeout) {
@@ -152,7 +150,8 @@ public:
bool GetUseSVR4() const {
const uint32_t idx = ePropertyUseSVR4;
return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_properties[idx].default_uint_value != 0);
+ nullptr, idx,
+ g_processgdbremote_properties[idx].default_uint_value != 0);
}
};
@@ -4525,16 +4524,15 @@ bool ParseRegisters(XMLNode feature_node, GdbServerTargetInfo &target_info,
// information to the current process. It will call itself recursively
// for nested register definition files. It returns true if it was able
// to fetch and parse an xml file.
-bool ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(ArchSpec &arch_to_use,
- std::string xml_filename,
- uint32_t &cur_reg_num,
- uint32_t &reg_offset) {
+bool ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(
+ ArchSpec &arch_to_use, std::string xml_filename, uint32_t &cur_reg_num,
+ uint32_t &reg_offset) {
// request the target xml file
std::string raw;
lldb_private::Status lldberr;
- if (!m_gdb_comm.ReadExtFeature(ConstString("features"),
- ConstString(xml_filename.c_str()),
- raw, lldberr)) {
+ if (!m_gdb_comm.ReadExtFeature(ConstString("features"),
+ ConstString(xml_filename.c_str()), raw,
+ lldberr)) {
return false;
}
@@ -4636,8 +4634,8 @@ bool ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(ArchSpec &arch_to_u
}
for (const auto &include : target_info.includes) {
- GetGDBServerRegisterInfoXMLAndProcess(arch_to_use, include,
- cur_reg_num, reg_offset);
+ GetGDBServerRegisterInfoXMLAndProcess(arch_to_use, include, cur_reg_num,
+ reg_offset);
}
}
} else {
OpenPOWER on IntegriCloud