Project overview
A part of Google Summer of Code 2024, this project aimed to improve the userland debugging
experience for Haiku app developers, boosting the process of building and porting complex
applications.
The first objective was to have a working build of a modern version of GDB running on Haiku
x86_64
- the most popular architecture with stable Haiku. Using some ideas from the incomplete
recipe
for GDB 8.1, I have ported GDB 15.1 to Haiku from the ground up.
Project status overview
Completed tasks
The goal of this phase was to stabilize GDB, making it suitable for debugging complex and
multi-threaded applications (including most Be API applications).
After clearing the first round of bug reports, the first revision of the GDB package is now online
on HaikuPorts.
When attempting to use the published package to work on Debugger, I found a second round of bugs,
resulting in the pending second revision of
the port. This version of GDB is now stable enough to attach to and debug a copy of itself.
Project status overview
Completed tasks
The GDB port is feature-complete. A recipe has been submitted to HaikuPorts.
This took a bit longer than expected due to complexities in building the full GDB compared to
gdbserver
- all of which will be covered in the technical details section
below. Subtle bugs revealed by invoking the debugger in different use cases delayed the project
even more.
Despite being off schedule, I believe delivering a fully-functional GDB along with comprehensive
documentation around it would benefit the community much more in the long run.
Project status overview
Despite being a bit silent on the blogs, the project is still alive and kicking.
Completed tasks
I have completed a port of the
gdbserver
component of GDB 14.
The port has the full capability of a regular gdbserver
port, including:
- Attaching to new and existing processes.
- Manipulating CPU and memory state.
- Reading loaded libraries and symbol information.
- Setting breakpoints.
- Receiving events about breakpoints, teams, threads, images, and syscalls.
Connected to a GDB frontend on a compatible ELF-based system, gdbserver
provides a nearly seamless
debugging experience. With the correct configurations, Haiku C/C++ applications can be built on
VSCode, deployed to Haiku, then debugged with the IDE’s UI through gdbserver
.
Introduction
Hello again! I am Trung Nguyen (a.k.a @trungnt2910). You might
have already known me as the maintainer of the
.NET 8 Port for Haiku since last year’s GSoC program.
I am delighted to be accepted into GSoC again! This year, under the guidance of
@waddlesplash - one of the experienced Haiku devs
that I admire the most, I will work on one of the core issues of software development on Haiku: the
debugging experience.
Project overview
This project, a part of Google Summer of Code 2023, aims to port the .NET Developer Platform - a
popular open-source framework - to Haiku, following various requests from the community to have a
way to build C# or run .NET applications on this OS.
The project picks up an incomplete port in 2022 by myself -
@trungnt2910 - and @jessicah and
brings essential components of the .NET platform (its runtime and SDK) to Haiku. It also provides
infrastructure to continuously build and distribute the Haiku version of .NET, and an additional
workload allowing developers to build Haiku-specific applications.
Project status overview
The long awaited stateful FD monitoring has finally been
implemented on Haiku, and there now is a partial implementation of kqueue
usable in libbsd
.
Therefore, Release
builds of .NET can now work properly (after some more hacks) and have been set
as the default in my custom dotnet-install.sh
script.
Due to some technical difficulties in parsing Doxygen documentation and converting it to the XML
format used in C#, I have delayed my effort to generate documentation for the Haiku API bindings.
Instead, I am going to resume my effort of bootstrapping .NET on Haiku, as mentioned in my
second report.
Project status overview
C# bindings for some parts of the Haiku API is now available, along with basic .NET SDK support for
building Haiku applications, in a .NET workload (more details below). The source code and install
instructions are currently in this GitHub repo.
.NET custom builds for Haiku are still regularly
updated to reflect the latest changes in both .NET and Haiku. Most recently, the datagram socket
hack has been removed as SOCK_DGRAM
support for Haiku has been merged.
Project status overview
During this period, I have been working to get the Release build of .NET SDK to work more stably.
I have identified some issues related to POSIX thread scheduling in Haiku in the process. Sadly,
I cannot deliver stable builds of the SDK at the moment because that depends on edge-triggered
file events.
As mentioned on my
forum thread, I have ported some
sample applications of popular C# frameworks such as GtkSharp or FNA. Some other apps are a bit
tricky since they rely on native components. I will not explore these ports as part of GSoC; it is
the HaikuPorts community’s job to port native libraries.
Project status overview
Completed tasks
The .NET SDK has been ported to Haiku after a few hacks. .NET on Haiku now has the ability to run
Roslyn and build a simple console application.
.NET latest builds for Haiku are being provided at
trungnt2910/dotnet-builds. You can follow the
instructions there to install and try out .NET.
Current plans
Before proceeding to the next step, I want to ensure the stability of the current SDK by
bootstrapping .NET on Haiku.