Skip to content

Commit

Permalink
Adds copytoGloabls support information
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Feb 20, 2023
1 parent 9460c91 commit 1f5b067
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
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

0 comments on commit 1f5b067

Please sign in to comment.