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

Sane keyboard input not working in GDB when using the fbt tool #1787

Closed
Semptum opened this issue Sep 26, 2022 · 12 comments · Fixed by #2824
Closed

Sane keyboard input not working in GDB when using the fbt tool #1787

Semptum opened this issue Sep 26, 2022 · 12 comments · Fixed by #2824
Assignees
Labels
Bug Build System & Scripts fbt, scripts and toolchain-related

Comments

@Semptum
Copy link

Semptum commented Sep 26, 2022

Describe the bug.

When using ./fbt blackmagic, a gdb interface appears. However, pressing backspace graphically adds a space to the prompt (as long as there is text to erase). Functionnally the text is erased but not graphically.
Similar behavior arises as soon as the text is changed in any way such as pressing the left arrow and typing something as illustrated below.

blackmagic_backspace

Reproduction

  1. cd to the directory of the firmware
  2. Turn on gdb
  3. Type abcd
  4. Press Left
  5. Press backspace
  6. Hopefully abd will remain
  7. Exit gdb
  8. Execute ./fbt blackmagic
  9. Type abcd
  10. Press Left
  11. Press backspace
  12. The result is abcdd (with a space at the end)

Target

No response

Logs

No response

Anything else?

The system is Arch Linux with KDE. The Terminal emulator is Konsole but the problem persists in the virtual console and in XTerm. The shell is ZSH but the problem persists in SH and BASH.

I was advised to add "TERM" to the environment variables at line 15 of environ.scons but this did not help.

EDIT: The problem comes from the binary arm-none-eabi-gdb in the toolchain folder. The system version works fine. The shipped version has this problem.

@Semptum Semptum added the Bug label Sep 26, 2022
@hedger
Copy link
Member

hedger commented Sep 26, 2022

@drunkbatya we might need your help with that one.

@hedger hedger added the Build System & Scripts fbt, scripts and toolchain-related label Sep 26, 2022
@Semptum
Copy link
Author

Semptum commented Sep 26, 2022

OK, in case it helps, it appears to be basically an issue with ncurses. If I remove the ncurses library from the path that the scripts append, it works fine with the system ncurses.

@skotopes
Copy link
Member

skotopes commented Dec 1, 2022

@Semptum we've pushed couple updates, is your issue still there?

@Semptum
Copy link
Author

Semptum commented Dec 1, 2022

@Semptum we've pushed couple updates, is your issue still there?

Yup, just checked, the problem persists on the latest dev even though it pulled in newer versions of the tools

@Semptum
Copy link
Author

Semptum commented Dec 1, 2022

@Semptum we've pushed couple updates, is your issue still there?

Yup, just checked, the problem persists on the latest dev even though it pulled in newer versions of the tools.
If I remember correctly, the problem is with ncurses, using the system library it works fine

@skotopes
Copy link
Member

skotopes commented Dec 1, 2022

@hedger @drunkbatya your turn ;)

@skotopes
Copy link
Member

@Semptum we've pushed couple toolchain updates, do you still have this issue?

@Semptum
Copy link
Author

Semptum commented Mar 13, 2023

@Semptum we've pushed couple toolchain updates, do you still have this issue?

Yup, still there...

@drunkbatya
Copy link
Contributor

@Semptum we've pushed couple toolchain updates, do you still have this issue?

Yup, still there...

Ok, I'll look at this soon

@skotopes
Copy link
Member

@drunkbatya any updates?

@drunkbatya
Copy link
Contributor

@drunkbatya any updates?

Not yet, I'll look at this today.

@drunkbatya
Copy link
Contributor

drunkbatya commented Jul 1, 2023

@Semptum
Hey! I found a core of the problem, it was a missing libtinfo ncurses compiling dependency. I'm released the new toolchain with this fix. Can you test it?

git pull
git checkout drunkbatya/23-toolchain
./fbt blackmagic

@drunkbatya drunkbatya linked a pull request Jul 1, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build System & Scripts fbt, scripts and toolchain-related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants