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 shell is broken on Windows #33

Closed
stephanosio opened this issue May 25, 2020 · 5 comments · Fixed by #47
Closed

GDB shell is broken on Windows #33

stephanosio opened this issue May 25, 2020 · 5 comments · Fixed by #47
Labels
bug Something isn't working priority: high High priority issue windows
Milestone

Comments

@stephanosio
Copy link
Member

The shell of the GNU Debugger (GDB) included in the Windows builds of zephyr-crosstool-ng is broken:

  • Basic command line input works, but
  • Backspace key does not work
  • Arrow keys do not work

NOTE:

  • This problem does not exist on the Windows build of GNU ARM Embedded.
  • The source of the problem seems to be related to ncurses usage (or rather lack of) in the GDB.
@stephanosio stephanosio added the bug Something isn't working label May 25, 2020
@stephanosio stephanosio added this to the 1.24.0.4 milestone May 25, 2020
@stephanosio

This comment has been minimized.

@stephanosio
Copy link
Member Author

stephanosio commented May 27, 2020

Note that the MinGW Canadian cross compiler build process involves the compilation of all the host library dependencies (including ncurses).

@stephanosio stephanosio added the priority: high High priority issue label May 28, 2020
@stephanosio
Copy link
Member Author

It turns out setting TERM=#win32con fixes the problem (without any code changes). Figure out what the hell is going on and make that default for the Windows builds.

@stephanosio
Copy link
Member Author

https://github.com/bminor/binutils-gdb/blob/f16f7b7c7447c44f4c6d23fd478c7dd767cdf642/readline/readline/terminal.c#L446-L447

GDB uses the readline library to implement the shell and the readline library was specifying the dumb terminal type when TERM environment variable is not set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high High priority issue windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant