From 3f35d73d0f27b217943eabafd989d1ed03f6a900 Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 9 Jun 2016 14:06:48 +0200 Subject: [PATCH] Remote debugging: now only shows host and remote-gdb-server in the option popover --- src/debug_clang.cc | 5 ++++- src/project.cc | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/debug_clang.cc b/src/debug_clang.cc index 5677aaf..026e50c 100644 --- a/src/debug_clang.cc +++ b/src/debug_clang.cc @@ -102,6 +102,8 @@ void Debug::Clang::start(const std::string &command, const boost::filesystem::pa lldb::SBError error; if(!plugin.empty() && plugin!="host") { + //TODO: support other plugins as well + //Plugin names for SBTarget::ConnectRemote does not seem to correspond to the ones from running "platform list" in lldb process = std::unique_ptr(new lldb::SBProcess(target.ConnectRemote(*listener, url.c_str(), "gdb-remote", error))); if(error.Fail()) { Terminal::get().async_print(std::string("Error (debug): ")+error.GetCString()+'\n', true); @@ -528,7 +530,8 @@ std::vector Debug::Clang::get_platform_list() { } std::string line; while(std::getline(stream, line)) { - if(line.find("host")==0 || line.find("remote-")==0) { + //TODO: support other plugins as well + if(line.find("host")==0 || line.find("remote-gdb-server")==0) { size_t pos; if((pos=line.find(": "))!=std::string::npos) { line.replace(pos, 2, "\n"); diff --git a/src/project.cc b/src/project.cc index 2e2d822..a0c7aa5 100644 --- a/src/project.cc +++ b/src/project.cc @@ -169,6 +169,7 @@ Project::Clang::DebugOptionsPopover::DebugOptionsPopover() : Gtk::Popover() { }); url.set_placeholder_text("URL"); + url.set_text("connect://host:port"); cross_compiling_vbox.pack_start(platform_list, true, true); cross_compiling_vbox.pack_end(url, true, true);