Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds copyToGlobals support information #12

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions include/xeus-zmq/xdebugger_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,23 @@ namespace xeus
std::string m_tmp_file_suffix;
bool m_rich_rendering;
std::vector<std::string> m_exception_paths;
bool m_copy_to_globals;

xdebugger_info(std::size_t hash_seed,
const std::string& tmp_file_prefix,
const std::string& tmp_file_suffix,
bool rich_rendering = false,
std::vector<std::string> exception_paths = {});
std::vector<std::string> exception_paths = {},
bool copy_to_globals = false);

};

class XEUS_ZMQ_API xdebugger_base : public xdebugger
{
public:

virtual ~xdebugger_base() = default;

protected:

xdebugger_base(zmq::context_t& context);
Expand Down Expand Up @@ -105,7 +108,7 @@ namespace xeus

zmq::socket_t m_header_socket;
zmq::socket_t m_request_socket;

using request_handler_map_t = std::map<std::string, request_handler_t>;
request_handler_map_t m_started_handler;
request_handler_map_t m_request_handler;
Expand Down
11 changes: 7 additions & 4 deletions src/xdebugger_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ namespace xeus
const std::string& tmp_file_prefix,
const std::string& tmp_file_suffix,
bool rich_rendering,
std::vector<std::string> exception_paths)
std::vector<std::string> exception_paths,
bool copy_to_globals)
: m_hash_seed(hash_seed)
, m_tmp_file_prefix(tmp_file_prefix)
, m_tmp_file_suffix(tmp_file_suffix)
, m_rich_rendering(rich_rendering)
, m_exception_paths(exception_paths)
, m_copy_to_globals(copy_to_globals)
{
}

Expand Down Expand Up @@ -102,7 +104,8 @@ namespace xeus
{"breakpoints", breakpoint_list},
{"stoppedThreads", m_stopped_threads},
{"richRendering", info.m_rich_rendering},
{"exceptionPaths", info.m_exception_paths}
{"exceptionPaths", info.m_exception_paths},
{"copyToGlobals", info.m_copy_to_globals}
}}
};
return reply;
Expand Down Expand Up @@ -257,7 +260,7 @@ namespace xeus
{
m_event_handler[event] = handler;
}

void xdebugger_base::continued_event(const nl::json& message)
{
std::lock_guard<std::mutex> lock(m_stopped_mutex);
Expand Down Expand Up @@ -354,7 +357,7 @@ namespace xeus
}
else
{
reply =
reply =
{
{"command", "initialize"},
{"request_seq", message["seq"]},
Expand Down
Loading