Re: inspect a thread’s stack

2018-04-10 Thread Mario Torre
On Tue, Apr 10, 2018 at 9:26 AM, Pietro Paolini wrote: >> >> I think the conversation will shift a bit if you explain what you mean with: >> >> "// inspect the frames of that thread doing any needed business with them" >> >> What exactly do you have in mind? Do you want to change the stack in some

RE: inspect a thread’s stack

2018-04-10 Thread Pietro Paolini
> > I think the conversation will shift a bit if you explain what you mean with: > > "// inspect the frames of that thread doing any needed business with them" > > What exactly do you have in mind? Do you want to change the stack in some > way? I would like to inspect the variable's name/value

Re: inspect a thread’s stack

2018-04-09 Thread JC Beyler
I think the conversation will shift a bit if you explain what you mean with: "// inspect the frames of that thread doing any needed business with them" What exactly do you have in mind? Do you want to change the stack in some way? Because, depending on what you want, Andrew's comment on: ThreadM

RE: inspect a thread’s stack

2018-04-09 Thread Pietro Paolini
>Access to stacktraces with locals is demoed in this test >http://hg.openjdk.java.net/jdk/jdk/file/tip/test/jdk/java/lang/StackWalker/LocalsAndOperands.java Maybe I haven't read it well enough but isn't that accessible through https://docs.oracle.com/javase/9/docs/api/java/lang/StackWalker.html

RE: inspect a thread’s stack

2018-04-09 Thread Pietro Paolini
Hi Martin, >Hi Pietro >Not sure JDI is what you really want, but if you would like to play with it I >have some code here that uses the PID of the JVM to open a >connection to itself and among other things print stack frames with variables: >https://github.com/skarsaune/kantega.debug and some

Re: inspect a thread’s stack

2018-04-08 Thread Martin Buchholz
Access to stacktraces with locals is demoed in this test http://hg.openjdk.java.net/jdk/jdk/file/tip/test/jdk/java/lang/StackWalker/LocalsAndOperands.java but the functionality does not seem to be available (yet!) via a public API.

Re: inspect a thread’s stack

2018-04-07 Thread Andrew Haley
On 04/06/2018 05:13 PM, Pietro Paolini wrote: > Is it possible to > > inspect a thread’s stack “locally” ? Have you looked at ThreadMXBean.getThreadInfo(id).getStackTrace() ? -- Andrew Haley Java Platform Lead Engineer Red Hat UK Ltd. EAC8 43EB D3EF DB98 CC77 2FAD A5C

Re: inspect a thread’s stack

2018-04-06 Thread Martin Skarsaune
Hi Pietro Not sure JDI is what you really want, but if you would like to play with it I have some code here that uses the PID of the JVM to open a connection to itself and among other things print stack frames with variables: https://github.com/skarsaune/kantega.debug and some demo here: https://