I'm working on a project in c called tt and I keep running into various issues. I figured I could use a debugging tool to make the whole process a lot easier.
In my case I chose to go with valgrind as it's more modern and I have more experience with it.
However, there's a problem you'll encounter pretty quickly. It turns out this is because on arch, glibc is stripped and non-stripped glibc isn't provided. No worries, we'll just have to compile it ourselves.
First things first, we need to get our hands on glibc's PKGBUILD.
git clone https://github.com/archlinux/svntogit-packages.git cd svntogit-packages/trunk git checkout packages/glibc
git clone https://gitea.artixlinux.org/packagesG/glibc cd glibc/trunk
Then we need to modify the PKGBUILD to disable stripping and enable debug. which
is done by adding
debug !strip to
sed -i 's/options=(/options=(debug !strip /' PKGBUILD
Finally we compile the glibc and install the resulting package.
makepkg --skipchecksums doas pacman -U glibc*.tar.zst