New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDB is terribly slow when starting OpenTTD on Debian 10 #8864
Comments
This has been the case since GDB 7. I think it's related to the python interface. |
I've tried installing gdb-minimal Debian package, which provides GDB
without Python support, and unfortunately the result is the same. I've even
checked that gdb binary does not link to libpython3 using ldd.
I've also tried to install GDB 6 from Debian 5. It does not support modern
GCC debugging format, so I've recompiled OpenTTD with GCC option -gdwarf-2.
Unfortunately, even this did not help, because system libraries all use
unsupported debug format, so GDB 6 cannot even print stack trace or threads
list.
Seems like the only way forward is to install Debian 5 in chroot or Docker,
however GCC in Debian 5 does not support -std=c++17, so this is actually a
dead end.
…On Sun, Mar 14, 2021 at 11:24 PM frosch ***@***.***> wrote:
This has been the case since GDB 7. I think it's related to the python
interface.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8864 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABF5QHK4MMDF4CBAZVJPDLTDUSQTANCNFSM4ZFMEXOA>
.
|
It starts reasonably fast for me.
|
Thanks, GDB 10 works like a miracle, with no delay at all. I've downloaded
GDB 10.1 source archive from http://ftp.gnu.org/gnu/gdb/ then did
'configure', 'make', and 'make install'. I've first tried to install GDB 10
binary from Debian Testing, but it failed to install, because of a
different version of libc.
…On Mon, Mar 15, 2021 at 1:53 AM Milek7 ***@***.***> wrote:
It starts reasonably fast for me.
***@***.*** build]$ gdb -ex run ./openttd | ts
mar 15 00:51:54 GNU gdb (GDB) 10.1
mar 15 00:51:54 Copyright (C) 2020 Free Software Foundation, Inc.
mar 15 00:51:54 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
mar 15 00:51:54 This is free software: you are free to change and redistribute it.
mar 15 00:51:54 There is NO WARRANTY, to the extent permitted by law.
mar 15 00:51:54 Type "show copying" and "show warranty" for details.
mar 15 00:51:54 This GDB was configured as "x86_64-pc-linux-gnu".
mar 15 00:51:54 Type "show configuration" for configuration details.
mar 15 00:51:54 For bug reporting instructions, please see:
mar 15 00:51:54 <https://www.gnu.org/software/gdb/bugs/>.
mar 15 00:51:54 Find the GDB manual and other documentation resources online at:
mar 15 00:51:54 <http://www.gnu.org/software/gdb/documentation/>.
mar 15 00:51:54
mar 15 00:51:54 For help, type "help".
mar 15 00:51:54 Type "apropos word" to search for commands related to "word"...
mar 15 00:51:56 Reading symbols from ./openttd...
mar 15 00:51:56 Starting program: /home/milek7/OpenTTD/build/openttd
mar 15 00:51:56 [Thread debugging using libthread_db enabled]
mar 15 00:51:56 Using host libthread_db library "/usr/lib/libthread_db.so.1".
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8864 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABF5QHYP34AORXCI7HFF53TDVEATANCNFSM4ZFMEXOA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version of OpenTTD
1.11.0-beta2, 1.10.3, and other recent versions
Debian 10 x86_64
Expected result
GDB starts OpenTTD quickly
Actual result
GDB takes 2 minutes 20 seconds to start OpenTTD
Is there some special trick to debug OpenTTD on Linux without waiting 2 minutes each time?
Does anyone else have the same problem?
GDB starts other applications without trouble, for example GIMP
Steps to reproduce
Download and build OpenTTD, run it with GDB, no special steps
wget https://cdn.openttd.org/openttd-releases/1.11.0-beta2/openttd-1.11.0-beta2-source.tar.xz
tar xvf openttd-1.11.0-beta2-source.tar.xz
cd openttd-1.11.0-beta2
mkdir build
cd build
cmake ..
make -j8
gdb -ex run ./openttd
To print timestamps:
gdb -ex run ./openttd | ts
It does not matter if I prevent GDB from executing .gdbinit using 'gdb -n', the result is the same.
The output is:
Mar 14 22:55:38 For help, type "help".
Mar 14 22:55:38 Type "apropos word" to search for commands related to "word"...
Mar 14 22:55:44 Reading symbols from ./openttd...done.
Mar 14 22:55:44 Starting program: /home/pelya/caught/openttd-1.11.0-beta2/build/openttd
Mar 14 22:58:08 [Thread debugging using libthread_db enabled]
Mar 14 22:58:08 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
The text was updated successfully, but these errors were encountered: