<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=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:"Andale Mono";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@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]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Just being able to re-run the target at any (reasonable) point. I’m working on a frontend for lldb using the python api, and I’m using the command interpreter
to deal with user input.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Ben<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Enrico Granata [mailto:egranata@apple.com]
<br>
<b>Sent:</b> Wednesday, June 26, 2013 5:15 PM<br>
<b>To:</b> Langmuir, Ben<br>
<b>Cc:</b> Malea, Daniel; lldb-dev@cs.uiuc.edu<br>
<b>Subject:</b> Re: [lldb-dev] run after process stop using python API<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">$ ./lldb /bin/ls<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">Current executable set to '/bin/ls' (x86_64).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><u><span style="font-family:"Andale Mono","serif";color:#29F914">(lldb) sett set auto-confirm true</span></u><span style="font-family:"Andale Mono","serif";color:#29F914"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">(lldb) b malloc<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">Breakpoint 1: 2 locations.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">(lldb) r<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">Process 48551 launched: '/bin/ls' (x86_64)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">Process 48551 stopped<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">* thread #1: tid = 0x5edda, 0x00007fff906cd8f9 libsystem_malloc.dylib`malloc, stop reason = breakpoint 1.2<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914"> frame #0: 0x00007fff906cd8f9 libsystem_malloc.dylib`malloc<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">libsystem_malloc.dylib`malloc:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">-> 0x7fff906cd8f9: pushq %rbp<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914"> 0x7fff906cd8fa: movq %rsp, %rbp<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914"> 0x7fff906cd8fd: pushq %rbx<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914"> 0x7fff906cd8fe: pushq %rax<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">(lldb) r<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">Process 48554 launched: '/bin/ls' (x86_64)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">Process 48554 stopped<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">* thread #1: tid = 0x5edf2, 0x00007fff906cd8f9 libsystem_malloc.dylib`malloc, stop reason = breakpoint 1.2<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914"> frame #0: 0x00007fff906cd8f9 libsystem_malloc.dylib`malloc<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">libsystem_malloc.dylib`malloc:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914">-> 0x7fff906cd8f9: pushq %rbp<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914"> 0x7fff906cd8fa: movq %rsp, %rbp<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914"> 0x7fff906cd8fd: pushq %rbx<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-family:"Andale Mono","serif";color:#29F914"> 0x7fff906cd8fe: pushq %rax<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">You want to set the auto-confirm lldb setting to true before you issue the second run<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">What exactly are you trying to achieve, if you can discuss it?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;color:black">Enrico Granata<br>
📩 <a href="mailto:egranata@.com">egranata@.com</a><br>
</span><span style="font-size:9.0pt;font-family:"MS Mincho";color:black">☎</span><span style="font-size:9.0pt;color:black">️ 27683</span><span style="color:black"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Jun 26, 2013, at 2:10 PM, Langmuir, Ben <<a href="mailto:ben.langmuir@intel.com">ben.langmuir@intel.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">How do I turn off the prompt setting?<br>
<br>
Also, continue isn’t what I want – I really do want to re-run the program from the start.</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Ben</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span></span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Malea,
Daniel<span class="apple-converted-space"> </span><br>
<b>Sent:</b><span class="apple-converted-space"> </span>Wednesday, June 26, 2013 5:08 PM<br>
<b>To:</b><span class="apple-converted-space"> </span>Langmuir, Ben;<span class="apple-converted-space"> </span><a href="mailto:lldb-dev@cs.uiuc.edu"><span style="color:purple">lldb-dev@cs.uiuc.edu</span></a><br>
<b>Subject:</b><span class="apple-converted-space"> </span>Re: [lldb-dev] run after process stop using python API</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">'run' is a GDB alias for process launch. If a process is already running, the command interpreter may be waiting for confirmation from the user that it's OK to restart the
process (unless you turned off the prompt setting beforehand)... You probably want to issue a "continue" command to restart the process.</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif""> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif""> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Cheers,</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif"">Dan</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif""> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:<span class="apple-converted-space"> </span></span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><Langmuir>, Ben Langmuir <<a href="mailto:ben.langmuir@intel.com"><span style="color:purple">ben.langmuir@intel.com</span></a>><br>
<b>Date:<span class="apple-converted-space"> </span></b>Wednesday, 26 June, 2013 4:57 PM<br>
<b>To:<span class="apple-converted-space"> </span></b>"<a href="mailto:lldb-dev@cs.uiuc.edu"><span style="color:purple">lldb-dev@cs.uiuc.edu</span></a>" <<a href="mailto:lldb-dev@cs.uiuc.edu"><span style="color:purple">lldb-dev@cs.uiuc.edu</span></a>><br>
<b>Subject:<span class="apple-converted-space"> </span></b>[lldb-dev] run after process stop using python API<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif""> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I’m trying to use the ‘run’ command from the python API when my process has stopped at a breakpoint, but it appears to hang. Script attached.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">i.HandleCommand('b main', res)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">i.HandleCommand('r', res) -> runs to breakpoint correctly<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">i.HandleCommand('r', res) -> appears to hang<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">This seems like a bug, but I thought I would ask in case the interpreter was waiting for some kind of input I wasn’t providing… I’m running on Linux, and haven’t had a chance
to try OS X yet.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Ben<o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu"><span style="color:purple">lldb-dev@cs.uiuc.edu</span></a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev"><span style="color:purple">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</span></a><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>