gdb is horribly chatty and annoying in TW - adding config files helps
All, Devs, I guess this option is supposed to be helpful, but gdb in TW chatty to the point of being annoying compiled with: --with-debuginfod (and I'm not sure which other options impact the amount of text shown at startup) This throws and huge amount of text into the terminal and totally scrambles kcrash backtraces until the debuginfo file is installed. For example, helping a user on SO with the cs50 tideman problem, starting gdb on TW results in: $ gdb -args ./tideman-fmt Alice Bob Charlie GNU gdb (GDB; openSUSE Tumbleweed) 14.2 Copyright (C) 2023 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-suse-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://bugs.opensuse.org/>. 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 ./tideman-fmt... (gdb) break main Breakpoint 1 at 0x4011b6: file tideman-fmt.c, line 95. (gdb) run Starting program: /home/david/dev/src-c/tmp/debug/cs50/tideman/tideman-fmt Alice Bob Charlie This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.opensuse.org/> Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. Downloading separate debug info for /lib64/ld-linux-x86-64.so.2 Downloading separate debug info for system-supplied DSO at 0x7ffff7fc4000 Missing separate debuginfos, use: zypper install glibc-debuginfo-2.40-1.1.x86_64 Downloading separate debug info for /lib64/libc.so.6 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, main (argc=4, argv=0x7fffffffd888) at tideman-fmt.c:95 (gdb) Holy cow, and that is to just get started. That's annoying. But there are a couple of settings that can tame this down that should be considered for defaults, e.g. $ cat /etc/gdbinit set debuginfod enabled off and $ cat ~/.config/gdb/gdbearlyinit set startup-quietly on Now gdb behaves on startup and is nicely quiet: $ gdb -args ./test FOObar Reading symbols from ./test... (gdb) That's more like it. Personally I preferred when it just suggested the needed debuginfo file. That didn't require any addition of config files to quite it down. -- David C. Rankin, J.D.,P.E.
participants (1)
-
David C. Rankin