[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8271356: Modify jdb to treat an empty command as a repeat of the previous command [v3]
From:       Chris Plummer <cjplummer () openjdk ! java ! net>
Date:       2021-08-31 19:04:30
Message-ID: UuUO9pBtHqOxDGhk70f_Ks32ePcksEqf2Z7CMAwe1ng=.40793bd5-3d7c-4614-b983-6270ab93bb01 () github ! com
[Download RAW message or body]

On Tue, 31 Aug 2021 00:36:51 GMT, Jakob Cornell \
<github.com+5642931+jakobcornell@openjdk.org> wrote:

> > This has been under discussion on and off for the past month or so on \
> > serviceability-dev, and I think a CSR request is required, so this may be a work \
> > in progress. 
> > Notes on the patch:
> > 
> > - The `list` command previously marked a line in each listing with `=>`.  In a \
> > bare `list` this is the next line up for execution.  Previously when requesting a \
> > specific location (e.g. `list 5`) the requested line would be marked.  With the \
> > patch applied, `list` will only ever mark the next line up for execution.  This \
> >                 is consistent with the behavior of GDB and PDB (at least).
> > - `EOF` is printed when the repeat setting is on and a bare `list` command \
> > follows a listing containing the last source line.  This feature is from PDB; \
> > it's a somewhat softer message than the one for an explicit `list` request that's \
> >                 out of range.
> > - I don't speak Chinese or Japanese, so I've omitted localizations for the new \
> > messages in those locales.  However, I updated the help text in both to include \
> > the new commands, with the descriptions left empty for now.
> 
> Jakob Cornell has refreshed the contents of this pull request, and previous commits \
> have been removed. The incremental views will show differences compared to the \
> previous content of the PR.

I think overall it looks good. Still need tests and still need to resolve the \
localization issues.

src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java line 458:

> 456:                     int repeat = Integer.parseInt(cmd);
> 457:                     String subcom = t.nextToken("");
> 458:                     for (int r = 0; r < repeat; r += 1) {

Not sure why you made this change. The previous version seems more readable.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5290


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic