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

Tab completion breaks #325

Open
ChenRuiwei opened this issue Jan 3, 2025 · 10 comments
Open

Tab completion breaks #325

ChenRuiwei opened this issue Jan 3, 2025 · 10 comments

Comments

@ChenRuiwei
Copy link

ChenRuiwei commented Jan 3, 2025

This plugin is amazing; I can't use GDB without it anymore.

However, I noticed that the Tab key autocompletion fails and inserts an actual tab instead after the dashboard showes up.

I’d be happy to provide more detailed information to help resolve this issue.

2025-01-03.18-05-43.mp4

I use the latest gdb-dashboard config file and only add these two lines at the bottom

set auto-load safe-path /
set confirm off

This is my gdb version below

❯ gdb --version
GNU gdb (GDB) 15.2
Copyright (C) 2024 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.

❯ gdb --configuration
This GDB was configured as follows:
   configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --with-expat
             --with-gdb-datadir=/usr/share/gdb (relocatable)
             --with-jit-reader-dir=/usr/lib/gdb (relocatable)
             --without-libunwind-ia64
             --with-lzma
             --without-babeltrace
             --without-intel-pt
             --with-xxhash
             --with-python=/usr (relocatable)
             --with-python-libdir=/usr/lib (relocatable)
             --with-debuginfod
             --with-curses
             --with-guile
             --without-amd-dbgapi
             --enable-source-highlight
             --enable-threading
             --enable-tui
             --with-system-readline
             --with-separate-debug-dir=/usr/lib/debug (relocatable)
             --with-system-gdbinit=/etc/gdb/gdbinit

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)

#217

@cyrus-and
Copy link
Owner

Thanks!

However, I noticed that the Tab key autocompletion fails and inserts an actual tab instead after the dashboard showes up.

So this never worked, or something changed?

@cyrus-and
Copy link
Owner

I cannot reproduce it. What terminal are you using? Have you tried another one?

@ChenRuiwei
Copy link
Author

Thank you for taking the time to look into this!

Thanks!

However, I noticed that the Tab key autocompletion fails and inserts an actual tab instead after the dashboard showes up.

So this never worked, or something changed?

Autocompletion works perfectly fine before the dashboard appears. It also works as expected when I use the gdb --nx command, which ignores the .gdbinit file.

I cannot reproduce it. What terminal are you using? Have you tried another one?

I tested it in Tmux (with Kitty), Kitty, Alacritty, and Konsole, all exhibiting the same issue.

@cyrus-and
Copy link
Owner

Autocompletion works perfectly fine before the dashboard appears.

I mean, did it ever worked with the dashboard or is it just a recent issue?

@ChenRuiwei
Copy link
Author

Autocompletion works perfectly fine before the dashboard appears.

I mean, did it ever worked with the dashboard or is it just a recent issue?

I think it is a recent issue, roughly one or two months ago. It seems to have appeared after I reinstalled my system.

@ChenRuiwei
Copy link
Author

No, it's not related to the system reinstallation. It worked well in 2024-11-26 and it breaks later. Unfortunately, I can't recall the exact date.

@cyrus-and
Copy link
Owner

I see, it's not a change in the dashboard either...

@ChenRuiwei
Copy link
Author

Yeah, I suspect it might be an upstream issue. I'll test different GDB versions and follow up with the results.

@ChenRuiwei
Copy link
Author

It is indeed an upstream issue. I’m using Arch, and after downgrading GDB from version 15.2 to 14.2, the autocompletion works fine in the dashboard.

@ChenRuiwei
Copy link
Author

I found the same issue in pwndbg/pwndbg#2232, where they thoroughly identified the root cause. It seems that GDB is using deprecated Python 3.12 functions, which were removed in Python 3.13. As a result, GDB calls Python's readline module, causing the problem.

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

2 participants