Hello all, I am interested in doing some work to improve the current state of JDB in the JDK. My initial idea is rather simple, and if we find it a good thing, I would be happy to upstream it.
I want to add readline support to JDB. Currently, any bash/EMACS shortcut, such as CTRL + W or CTRL + A/E, is read as a literal character. I know we can reuse the existing readline implementation from jshell, but in order to do that, it's necessary to create a dedicated module for JDB, rather than keeping its code within jdk.jdi. In short, my proposal is: -Create a new module at the root src named jdk.jdb, and move the code from jdk.jdi/share/classes/com/sun/tools/example/debug/tty/ to jdk.jdb/share -Update the imports to match the new location -Update any existing (broken) script -Update the src/jdk.internal.le/share/classes/module-info.java file to contain the newly added module, and start using readline in JDB. This would provide some of the groundwork needed to improve JDB in other areas, such as autocomplete for commands, classes, methods, etc. Let me know if this sounds reasonable or useful to others so we can discuss it further. Kind regards Klaus Klein
