Hi Greg, In my application code I am using the async mode and I have been following process_events.py, so hopefully I'm doing it correctly. This was just a simple test program to show the issue I was having.
Thanks for the suggestions, Ben > -----Original Message----- > From: Greg Clayton [mailto:[email protected]] > Sent: Wednesday, June 26, 2013 5:49 PM > To: Langmuir, Ben > Cc: Malea, Daniel; [email protected] > Subject: Re: [lldb-dev] run after process stop using python API > > I would really suggest using the async API. To see how to use the actual API > to control your target, checkout the following example: > > svn cat http://llvm.org/svn/llvm- > project/lldb/trunk/examples/python/process_events.py > > The example shows how to create a target and then debug it and us the API > to wait for process state changed events and allows you to then control the > process. > > The main problem with your example below is that: > > i.HandleCommand('r', res) > > "r" can take an arbitrary amount of time. It will return, but your process > might > be running. It might be stopped. You have no idea what your process is > doing. > > Using the API correctly to wait for events will give you much more accurate > control over your process, and this is why we made process_events.py. > > Greg Clayton > > On Jun 26, 2013, at 2:10 PM, "Langmuir, Ben" <[email protected]> > wrote: > > > How do I turn off the prompt setting? > > > > Also, continue isn't what I want - I really do want to re-run the program > from the start. > > > > Ben > > > > From: Malea, Daniel > > Sent: Wednesday, June 26, 2013 5:08 PM > > To: Langmuir, Ben; [email protected] > > Subject: Re: [lldb-dev] run after process stop using python API > > > > '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. > > > > > > Cheers, > > Dan > > > > From:<Langmuir>, Ben Langmuir <[email protected]> > > Date: Wednesday, 26 June, 2013 4:57 PM > > To: "[email protected]" <[email protected]> > > Subject: [lldb-dev] run after process stop using python API > > > > 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. > > > > i.HandleCommand('b main', res) > > i.HandleCommand('r', res) -> runs to breakpoint correctly > > i.HandleCommand('r', res) -> appears to hang > > > > 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. > > > > Ben > > _______________________________________________ > > lldb-dev mailing list > > [email protected] > > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev _______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
