<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hey Sean,<br>
<br>
Yeah, it's a nice feature - even if it only works with basic types
as you noticed. I'll look to fix up the concerns you've identified.
We're working on a few other hexagon-related patches to put into
review, so I'll add this one to the list. We'll add you as a
reviewer when it happens - thanks!<br>
<br>
Colin<br>
<br>
<div class="moz-cite-prefix">On 31/03/2015 16:02, Sean Callanan
wrote:<br>
</div>
<blockquote
cite="mid:C37321D1-ED74-4BFB-87D2-FFA32AB6DE04@apple.com"
type="cite">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div>Colin,</div>
<div><br>
</div>
<div>looking at that patch, it looks like it has some great ideas!</div>
<div><br>
</div>
<div>I have a few concerns:</div>
<div><br>
</div>
<div> (a) it looks like it is not 64-bit clean, it assumes that
everything it works with is 4 bytes wide;</div>
<div> (b) it's got some assertions where I'd prefer proper error
handling;</div>
<div> (c) it relies on the PrepareTrivialCall infrastructure
which only handles simple argument types; and</div>
<div> (d) while it tries hard to ensure that strings are exported
into the target's memory, it doesn't have any provisions for
moving other data that the expression allocated.</div>
<div><br>
</div>
<div>While I'd defer to Jim Ingham for comment on the thread plan
aspect, I think the interpreter side looks like it has
potential. Also that part might still apply. I'm fine with
ironing out (c) and (d) in tree, working with the LLVM folks to
get better solutions, but (a) and (b) and a style nit here and
there would currently block integration from my point of view.
Hopefully you agree that those are the easy bits to fix.</div>
<div><br>
</div>
<div>If you can resurrect this patch against recent ToT, I'm happy
to be a reviewer.</div>
<div><br>
</div>
<div>Sean</div>
<div><br>
Sent from my iPad</div>
<div><br>
On Mar 31, 2015, at 4:41 AM, Colin Riley <<a
moz-do-not-send="true" href="mailto:colin@codeplay.com">colin@codeplay.com</a>>
wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<meta content="text/html; charset=UTF-8"
http-equiv="Content-Type">
Hi Bhushan<br>
<br>
We ran into this problem whilst doing the Hexagon DSP support
in LLDB. <br>
<br>
This review was up (<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://reviews.llvm.org/D4672">http://reviews.llvm.org/D4672</a>)
but is now stale without reviewers. Basically we added the
ability to the IR interpreter to call functions on the target
using a threadplan which manipulated the stack and registers
to call functions and capture any return values, which works
well on bare metal without ability to jit.<br>
<br>
Maybe the patches can be of help to you. I doubt they would
apply cleanly now given the length of time since it was
uploaded. It's a valuable feature, but priorities on the list
were elsewhere :)<br>
<br>
Colin<br>
<br>
<br>
<div class="moz-cite-prefix">On 31/03/2015 12:30, Bhushan
Attarde wrote:<br>
</div>
<blockquote
cite="mid:9D3E5517712EFA419C6B9C50EDC1282C6E67518C@PUMAIL01.pu.imgtec.org"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@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:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
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";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We are debugging a baremetal
application using LLDB which is connected to a remote
target (supporting GDB remote protocol). <o:p></o:p></p>
<p class="MsoNormal">We are able to execute expressions
involving global and frame variables such as:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-family:"Courier New"">(lldb)
expr var+4<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However, LLDB is unable to execute
expressions involving function calls.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-family:"Courier New"">(lldb)
expr (int) bar(1,2)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family:"Courier New"">error:
Can't run the expression locally: Interpreter doesn't
handle one of the expression's opcodes<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Function bar is defined as <span
style="font-family:"Courier New""> int
bar(int, int).</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The expression execution_policy is
set to <span style="font-family:"Courier
New""> eExecutionPolicyNever</span> as <span
style="font-family:"Courier New"">CanJIT()</span>
returns false for baremetal applications.<o:p></o:p></p>
<p class="MsoNormal">This is because JIT is disabled for
static dynamic loader targets.<o:p></o:p></p>
<p class="MsoNormal">The<span
style="font-family:"Courier New"">
IRInterpreter::CanInterpret</span> returns false as it
fails to interpret call instruction (call to 'bar' is
not an intrinsic). <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Could you please help us on this?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-Regards<o:p></o:p></p>
<p class="MsoNormal">Bhushan<o:p></o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
lldb-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
- Colin Riley
Games Technology Director
Codeplay Software Ltd
45 York Place, Edinburgh, EH1 3HP
Tel: 0131 466 0503
Fax: 0131 557 6600
Website: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.codeplay.com">http://www.codeplay.com</a>
Twitter: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://twitter.com/codeplaysoft">https://twitter.com/codeplaysoft</a>
This email and any attachments may contain confidential and /or privileged information and is for use by the addressee only. If you are not the intended recipient, please notify Codeplay Software Ltd immediately and delete the message from your computer. You may not copy or forward it,or use or disclose its contents to any other person. Any views or other information in this message which do not relate to our business are not authorized by Codeplay software Ltd, nor does this message form part of any contract unless so stated.
As internet communications are capable of data corruption Codeplay Software Ltd does not accept any responsibility for any changes made to this message after it was sent. Please note that Codeplay Software Ltd does not accept any liability or responsibility for viruses and it is your responsibility to scan any attachments.
Company registered in England and Wales, number: 04567874
Registered office: 81 Linkfield Street, Redhill RH1 6BY </pre>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>lldb-dev mailing list</span><br>
<span><a moz-do-not-send="true"
href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a></span><br>
<span><a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a></span><br>
</div>
</blockquote>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
- Colin Riley
Games Technology Director
Codeplay Software Ltd
45 York Place, Edinburgh, EH1 3HP
Tel: 0131 466 0503
Fax: 0131 557 6600
Website: <a class="moz-txt-link-freetext" href="http://www.codeplay.com">http://www.codeplay.com</a>
Twitter: <a class="moz-txt-link-freetext" href="https://twitter.com/codeplaysoft">https://twitter.com/codeplaysoft</a>
This email and any attachments may contain confidential and /or privileged information and is for use by the addressee only. If you are not the intended recipient, please notify Codeplay Software Ltd immediately and delete the message from your computer. You may not copy or forward it,or use or disclose its contents to any other person. Any views or other information in this message which do not relate to our business are not authorized by Codeplay software Ltd, nor does this message form part of any contract unless so stated.
As internet communications are capable of data corruption Codeplay Software Ltd does not accept any responsibility for any changes made to this message after it was sent. Please note that Codeplay Software Ltd does not accept any liability or responsibility for viruses and it is your responsibility to scan any attachments.
Company registered in England and Wales, number: 04567874
Registered office: 81 Linkfield Street, Redhill RH1 6BY </pre>
</body>
</html>