Hi Alan, thanks for the input.

The gdb behavior is context dependent and not clear to me that it's worth 
trying to add it to jdb.

Could you provide some more detail about the context upon which GDB's behavior 
depends?  And are you saying that my proposed changes aren't worth adding, or 
that it's not worth replicating the exact behavior of GDB?  In my opinion a 
straightforward approximation of GDB's behavior will be more convenient for 
users than the current behavior.

If it is added then I think Chris is right that is might have to be disabled by 
default as it could otherwise break existing scripts/tests with empty lines. 
One place for configuration ~/.jdbrc and it might be that it can only be 
enabled for interactive sessions.

Okay, so it sounds like rather than using a command line option you're 
suggesting we create new JDB commands (e.g. `repeat' and `norepeat') to 
enable/disable the feature, plus a check (`System.console() != null' perhaps?) 
that honors `repeat' only in an interactive session.  This sounds fine to me, 
although I suspect it becomes a lot more difficult to test this feature when it 
doesn't work in non-interactive sessions.

If usability is an issue then maybe it would be better to look at jshell  (the 
REPL that has been included since JDK 9). It makes us of jline so you get 
better input navigation, history navigation, and tab completion.  I suspect 
there is an interesting project there.

Thanks for this tip; line editing is also on my wishlist for JDB, so I would be 
interested in a jline integration.  However, based on the JBS discussion Chris 
seems to have sort of the opposite view; that a jline integration likely isn't 
worth the effort whereas command repetition may be.  I would be interested in 
both, since I think automatic repetition provides utility beyond line editing, 
and I would be willing to work on both, but I want to make sure I end up with a 
change that someone is willing to sponsor and review.

Jakob

Reply via email to