Skip to content
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

Closed
pelya opened this issue Mar 14, 2021 · 4 comments
Closed

GDB is terribly slow when starting OpenTTD on Debian 10 #8864

pelya opened this issue Mar 14, 2021 · 4 comments

Comments

@pelya
Copy link

pelya commented Mar 14, 2021

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".

@frosch123
Copy link
Member

This has been the case since GDB 7. I think it's related to the python interface.

@pelya
Copy link
Author

pelya commented Mar 14, 2021 via email

@Milek7
Copy link
Contributor

Milek7 commented Mar 14, 2021

It starts reasonably fast for me.

[milek7@milek 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".

@pelya
Copy link
Author

pelya commented Mar 15, 2021 via email

@pelya pelya closed this as completed Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants