Skip to content

[GSoC 2025] Setup: Debugger Headers & Out-of-Process Kernel #365

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kr-2003
Copy link
Contributor

@kr-2003 kr-2003 commented Jul 8, 2025

Description

GSoC 2025: Implementing debugger support for xeus-cpp

This PR sets up debugger kernels that will use Out-Of-Process execution via CppInterOp. Also added basic header files required for debugger.

Type of change

  • New feature

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.78%. Comparing base (7a3a24b) to head (4b284a2).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #365   +/-   ##
=======================================
  Coverage   81.78%   81.78%           
=======================================
  Files          20       20           
  Lines         950      950           
  Branches       87       87           
=======================================
  Hits          777      777           
  Misses        173      173           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 10 out of 18. Check the log or trigger a new build to see more.

************************************************************************************/

#ifndef XEUS_CPP_DEBUGGER_HPP
#define XEUS_CPP_DEBUGGER_HPP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: header guard does not follow preferred style [llvm-header-guard]

Suggested change
#define XEUS_CPP_DEBUGGER_HPP
#ifndef XEUS_CPP_XDEBUGGER_HPP
#define XEUS_CPP_XDEBUGGER_HPP


#include <map>
#include <mutex>
#include <set>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: included header mutex is not used directly [misc-include-cleaner]

Suggested change
#include <set>
#include <set>

#include <map>
#include <mutex>
#include <set>
#include <string>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: included header set is not used directly [misc-include-cleaner]

Suggested change
#include <string>
#include <string>

#include <string>

#include "nlohmann/json.hpp"
#include "xeus-cpp/xinterpreter.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: included header json.hpp is not used directly [misc-include-cleaner]

Suggested change
#include "xeus-cpp/xinterpreter.hpp"
#include "xeus-cpp/xinterpreter.hpp"

{
class xdebuglldb_client;

class XEUS_CPP_API debugger : public xeus::xdebugger_base
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: class 'debugger' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]

    class XEUS_CPP_API debugger : public xeus::xdebugger_base
                       ^

using base_type = xeus::xdebugger_base;

debugger(
xeus::xcontext& context,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "xeus::xcontext" is directly included [misc-include-cleaner]

include/xeus-cpp/xdebugger.hpp:11:

- #ifdef __GNUC__
+ #include <xeus/xeus_context.hpp>
+ #ifdef __GNUC__


debugger(
xeus::xcontext& context,
const xeus::xconfiguration& config,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "xeus::xconfiguration" is directly included [misc-include-cleaner]

include/xeus-cpp/xdebugger.hpp:11:

- #ifdef __GNUC__
+ #include <xeus/xkernel_configuration.hpp>
+ #ifdef __GNUC__

const xeus::xconfiguration& config,
const std::string& user_name,
const std::string& session_id,
const nl::json& debugger_config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "nlohmann::json" is directly included [misc-include-cleaner]

include/xeus-cpp/xdebugger.hpp:11:

- #ifdef __GNUC__
+ #include <nlohmann/json_fwd.hpp>
+ #ifdef __GNUC__

const nl::json& debugger_config
);

virtual ~debugger();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions]

Suggested change
virtual ~debugger();
~debugger() override;

bool start() override;
void stop() override;
xeus::xdebugger_info get_debugger_info() const override;
virtual std::string get_cell_temporary_file(const std::string& code) const override;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'virtual' is redundant since the function is already declared 'override' [cppcoreguidelines-explicit-virtual-functions]

Suggested change
virtual std::string get_cell_temporary_file(const std::string& code) const override;
std::string get_cell_temporary_file(const std::string& code) const override;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants