Backtraces support for Swift on Linux | GSoC'22

Hey @tomerd , @drexin , and everyone in the community.
I am Gaurav Gulati from India, a 3rd-year Computer Science student. I am interested in contributing to the "Backtraces support for Swift on Linux" GSoC-22 project.
I am proficient in C++ and have basic knowledge of swift. I have read about the backtrace mechanisms in C++ and also went through the mentioned libraries :

  1. backtrace_symbols
  2. libbacktrace
  3. backward-cpp
  4. swift-server/swift-backtrace

Along with this, I have also tested out how Swift currently produces a backtrace (using swift-server/swift-backtrace) when a process crashes on Linux(Ubuntu 20.0.5) (screenshot attached)

Can you please provide me with some resources to know more about the library mentioned in the project description, created by the Swift server workgroup, and on which private APIs it relies which in turn will help me to devise an efficient solution also some more resources so that I can get a better understanding of how the project should span and how I can contribute the most to it?
Thank you!

5 Likes

Hey @gauravgulati15,

great to hear that you are interested in this project.

The library calls a private runtime function to demangle the symbols (note the @_silgen_name): swift-backtrace/Demangle.swift at main · swift-server/swift-backtrace · GitHub

What resources in particular are you looking for?

3 Likes

Thanks, @drexin for the reply!
I wanted to know that, how the expected result of this project will be different from the current implementation, should it be similar to backward-cpp?
Should I work on top of the current implementation or start afresh following in the steps of backward-cpp?

The goal of the project is to create a solution for producing backtraces, that can be integrated into the runtime. Coming up with the exact design is part of the project. It‘s not just integrating some existing library like libbacktrace into the Swift runtime, but actually building the mechanisms.

1 Like