File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed
Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -1166,5 +1166,18 @@ Ref<Metadata> LldbAdapter::GetProperty(const std::string &name)
11661166
11671167bool LldbAdapter::SetProperty (const std::string &name, const Ref<Metadata> &value)
11681168{
1169+ if (name == " current_platform" )
1170+ {
1171+ if (value->IsString ())
1172+ {
1173+ auto platform = value->GetString ();
1174+ if (!platform.empty ())
1175+ {
1176+ auto error = m_debugger.SetCurrentPlatform (platform.c_str ());
1177+ if (error.Success ())
1178+ return true ;
1179+ }
1180+ }
1181+ }
11691182 return false ;
11701183}
Original file line number Diff line number Diff line change @@ -1490,7 +1490,10 @@ Ref<Metadata> DebuggerController::GetAdapterProperty(const std::string& name)
14901490
14911491bool DebuggerController::SetAdapterProperty (const std::string& name, const BinaryNinja::Ref<BinaryNinja::Metadata>& value)
14921492{
1493- return true ;
1493+ if (!m_adapter)
1494+ return false ;
1495+
1496+ return m_adapter->SetProperty (name, value);
14941497}
14951498
14961499
Original file line number Diff line number Diff line change @@ -110,5 +110,10 @@ void DebugServerSettingsDialog::apply()
110110 data = new Metadata (port);
111111 m_controller->GetData ()->StoreMetadata (" debugger.remote_port" , data);
112112
113+ const auto platform = m_platformEntry->currentText ().toStdString ();
114+ data = new Metadata (platform);
115+ m_controller->SetAdapterProperty (" current_platform" , data);
116+ m_controller->GetData ()->StoreMetadata (" debugger.platform" , data);
117+
113118 accept ();
114119}
You can’t perform that action at this time.
0 commit comments