$ gdb krita
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from krita...
(No debugging symbols found in krita)
(gdb) r
Starting program: /snap/bin/krita
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffd10ee640 (LWP 5427)]
[New Thread 0x7fffd08ed640 (LWP 5428)]
[New Thread 0x7fffcbfff640 (LWP 5429)]
[New Thread 0x7fffcb7fe640 (LWP 5430)]
[New Thread 0x7fffcaffd640 (LWP 5431)]
[New Thread 0x7fffca7fc640 (LWP 5432)]
[Thread 0x7fffca7fc640 (LWP 5432) exited]
[Thread 0x7fffcaffd640 (LWP 5431) exited]
[Thread 0x7fffcb7fe640 (LWP 5430) exited]
[Thread 0x7fffcbfff640 (LWP 5429) exited]
[Thread 0x7fffd08ed640 (LWP 5428) exited]
[Thread 0x7fffd10ee640 (LWP 5427) exited]
process 5424 is executing new program: /snap/snapd/21184/usr/bin/snap
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffd10ee640 (LWP 5433)]
[New Thread 0x7fffd08ed640 (LWP 5434)]
[New Thread 0x7fffcbfff640 (LWP 5435)]
[New Thread 0x7fffcb7fe640 (LWP 5436)]
[New Thread 0x7fffcaffd640 (LWP 5437)]
[New Thread 0x7fffca7fc640 (LWP 5438)]
[New Thread 0x7fffc9ffb640 (LWP 5439)]
[Detaching after vfork from child process 5440]
[Thread 0x7fffc9ffb640 (LWP 5439) exited]
[Thread 0x7fffca7fc640 (LWP 5438) exited]
[Thread 0x7fffcaffd640 (LWP 5437) exited]
[Thread 0x7fffcbfff640 (LWP 5435) exited]
[Thread 0x7fffd08ed640 (LWP 5434) exited]
[Thread 0x7fffd10ee640 (LWP 5433) exited]
process 5424 is executing new program: /snap/snapd/21184/usr/lib/snapd/snap-confine
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
need to run as root or suid
[Inferior 1 (process 5424) exited with code 01]
(gdb)
Instead of the snap version, you could try the version from the repositories.
And which weird version of gdb is this?
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
If your issue happens when running Ubuntu, please ask in their forum for help.
(gdb) show version
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb)
If your issue happens when running Ubuntu, please ask in their forum for help.
they do not know