[Lldb-commits] [PATCH] D106564: [LLDB][GUI] Add Arch Field
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 26 14:22:44 PDT 2021
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGed5b4dbd3952: [LLDB][GUI] Add Arch Field (authored by OmarEmaraDev, committed by clayborg).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106564/new/
https://reviews.llvm.org/D106564
Files:
lldb/source/Core/IOHandlerCursesGUI.cpp
Index: lldb/source/Core/IOHandlerCursesGUI.cpp
===================================================================
--- lldb/source/Core/IOHandlerCursesGUI.cpp
+++ lldb/source/Core/IOHandlerCursesGUI.cpp
@@ -1374,6 +1374,25 @@
bool m_need_to_exist;
};
+class ArchFieldDelegate : public TextFieldDelegate {
+public:
+ ArchFieldDelegate(const char *label, const char *content, bool required)
+ : TextFieldDelegate(label, content, required) {}
+
+ void FieldDelegateExitCallback() override {
+ TextFieldDelegate::FieldDelegateExitCallback();
+ if (!IsSpecified())
+ return;
+
+ if (!GetArchSpec().IsValid())
+ SetError("Not a valid arch!");
+ }
+
+ const std::string &GetArchString() { return m_content; }
+
+ ArchSpec GetArchSpec() { return ArchSpec(GetArchString()); }
+};
+
class BooleanFieldDelegate : public FieldDelegate {
public:
BooleanFieldDelegate(const char *label, bool content)
@@ -1989,6 +2008,14 @@
return delegate;
}
+ ArchFieldDelegate *AddArchField(const char *label, const char *content,
+ bool required) {
+ ArchFieldDelegate *delegate =
+ new ArchFieldDelegate(label, content, required);
+ m_fields.push_back(FieldDelegateUP(delegate));
+ return delegate;
+ }
+
IntegerFieldDelegate *AddIntegerField(const char *label, int content,
bool required) {
IntegerFieldDelegate *delegate =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106564.361802.patch
Type: text/x-patch
Size: 1449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210726/75c12b3e/attachment.bin>
More information about the lldb-commits
mailing list