the default buildtype in meson.build seems to be "debugoptimized" but you can also specify an explicit "debug".
also you might want to delete the stripping routine, because symbols might be useful for you.
so in the end, IMHO, you can modify glib2.SlackBuild like this
Code:
--- ./glib2.SlackBuild.orig 2020-12-12 22:23:16.846030867 +0100
+++ ./glib2.SlackBuild 2020-12-26 23:43:40.675313486 +0100
@@ -96,7 +96,7 @@
--mandir=/usr/man \
--sysconfdir=/etc \
--localstatedir=/var \
- --buildtype=release \
+ --buildtype=debug \
-Dselinux=disabled \
-Dfam=true \
-Dman=true \
@@ -122,9 +122,6 @@
mv $PKG/etc/profile.d/libglib2.csh $PKG/etc/profile.d/libglib2.csh.new
mv $PKG/etc/profile.d/libglib2.sh $PKG/etc/profile.d/libglib2.sh.new
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-
# Compress and link manpages, if any:
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man