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

List:       openjdk-serviceability-dev
Subject:    =?Windows-1252?Q?inspect_a_thread=92s_stack_?=
From:       Pietro Paolini <Pietro.Paolini () alfasystems ! com>
Date:       2018-04-06 16:13:49
Message-ID: 5D285FC05679A441ACF34A90905BFA92241A78A1 () GBEDBP01 ! chp ! co ! uk
[Download RAW message or body]

Hi all,

I apologise if this is not the right ML for it but  I couldn=92t find exact=
ly what I was looking for when Googling the problem. I am a bit new to the =
JDI world.

I would like to inspect the stack-frame of a specific  thread, I came acros=
s the StackFrame/ThreadReference classes but I couldn=92t find a way exampl=
es where their usage is shown
without connecting to the VM somehow, like a debugger would do.

Is it possible to

inspect a thread=92s stack =93locally=94  ? In my mind I could be able to h=
ave a function such as :

static void hook(Thread thread) {

thread.wait() // stop that thread

// inspect the frames of that thread doing any needed business with them
}

I=92d need this for diagnostic purposes of my application.

Thanks,
Pietro




Pietro Paolini
Consultant

Alfa
________________________________
e: pietro.paolini@alfasystems.com | w: alfasystems.com<https://www.alfasyst=
ems.com>
t: +44 (0) 20 7920-2643 | Moor Place, 1 Fore Street Avenue, London, EC2Y 9D=
T, GB
________________________________

The contents of this communication are not intended to be binding or consti=
tute any form of offer or acceptance or give rise to any legal obligations =
on behalf of the sender or Alfa. The views or opinions expressed represent =
those of the author and not necessarily those of Alfa. This email and any a=
ttachments are strictly confidential and are intended solely for use by the=
 individual or entity to whom it is addressed. If you are not the addressee=
 (or responsible for delivery of the message to the addressee) you may not =
copy, forward, disclose or use any part of the message or its attachments. =
At present the integrity of email across the internet cannot be guaranteed =
and messages sent via this medium are potentially at risk. All liability is=
 excluded to the extent permitted by law for any claims arising as a result=
 of the use of this medium to transmit information by or to Alfa or its aff=
iliates.

Alfa Financial Software Ltd
Reg. in England No: 0248 2325

[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I apologise if this is not the right ML for it but&nbsp; I \
couldn’t find exactly what I was looking for when Googling the problem. I am a bit \
new to the JDI world.<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I would like to inspect the stack-frame of a specific&nbsp; \
thread, I came across the StackFrame/ThreadReference classes but I couldn’t find a \
way examples where their usage is shown <o:p></o:p></p>
<p class="MsoNormal">without connecting to the VM somehow, like a debugger would \
do.<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Is it possible to <o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">inspect a thread’s stack “locally” &nbsp;? In my mind I could be \
able to have a function such as :<o:p></o:p></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">static void hook(Thread \
thread) {<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">thread.wait() // stop that thread<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">// inspect the frames of that thread doing any needed business \
with them<o:p></o:p></p> <p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I’d need this for diagnostic purposes of my \
application.<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Pietro<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<br>
<br>
<span style="font-size:15px; color:#000; font-family:Arial, Helvetica, sans-serif; \
line-height:20px;">Pietro Paolini</span><br> <span style="font-size:13px; color:#000; \
font-family:Arial, Helvetica, sans-serif; ">Consultant</span><br> <br>
<span style="font-size:36px; color:#2a265c; font-weight:bold; font-family: Helvetica, \
sans-serif;">Alfa</span><br> <hr style="color: #A8A8A8; font-family: Arial, \
Helvetica, ans-serif;background-color: #A8A8A8; height: 1px; border:0;"> <span \
style=" line-height:18px; color:#2a265c; font-family: Arial, Helvetica, sans-serif; \
font-size:12px;">e: pietro.paolini@alfasystems.com | w: <a \
                href="https://www.alfasystems.com">alfasystems.com</a><br>
t: &#43;44 (0) 20 7920-2643 | Moor Place, 1 Fore Street Avenue, London, EC2Y 9DT, GB \
</span> <hr style="color: #A8A8A8; background-color: #A8A8A8; height: 1px; \
border:0;"> <br>
<span style="font-family: Arial, Helvetica, sans-serif; font-size:9px; \
color:#949494">The contents of this communication are not intended to be binding or \
constitute any form of offer or acceptance or give rise to any legal obligations on \
behalf of the sender  or Alfa. The views or opinions expressed represent those of the \
author and not necessarily those of Alfa. This email and any attachments are strictly \
confidential and are intended solely for use by the individual or entity to whom it \
is addressed. If you are  not the addressee (or responsible for delivery of the \
message to the addressee) you may not copy, forward, disclose or use any part of the \
message or its attachments. At present the integrity of email across the internet \
cannot be guaranteed and messages sent  via this medium are potentially at risk. All \
liability is excluded to the extent permitted by law for any claims arising as a \
result of the use of this medium to transmit information by or to Alfa or its \
affiliates. <br>
<br>
Alfa Financial Software Ltd <br>
Reg. in England No: 0248 2325</span>
<p></p>
</body>
</html>



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

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