[lldb-dev] run after process stop using python API

Enrico Granata egranata at apple.com
Wed Jun 26 14:14:30 PDT 2013


$ ./lldb /bin/ls
Current executable set to '/bin/ls' (x86_64).
(lldb) sett set auto-confirm true
(lldb) b malloc
Breakpoint 1: 2 locations.
(lldb) r
Process 48551 launched: '/bin/ls' (x86_64)
Process 48551 stopped
* thread #1: tid = 0x5edda, 0x00007fff906cd8f9 libsystem_malloc.dylib`malloc, stop reason = breakpoint 1.2
    frame #0: 0x00007fff906cd8f9 libsystem_malloc.dylib`malloc
libsystem_malloc.dylib`malloc:
-> 0x7fff906cd8f9:  pushq  %rbp
   0x7fff906cd8fa:  movq   %rsp, %rbp
   0x7fff906cd8fd:  pushq  %rbx
   0x7fff906cd8fe:  pushq  %rax
(lldb) r
Process 48554 launched: '/bin/ls' (x86_64)
Process 48554 stopped
* thread #1: tid = 0x5edf2, 0x00007fff906cd8f9 libsystem_malloc.dylib`malloc, stop reason = breakpoint 1.2
    frame #0: 0x00007fff906cd8f9 libsystem_malloc.dylib`malloc
libsystem_malloc.dylib`malloc:
-> 0x7fff906cd8f9:  pushq  %rbp
   0x7fff906cd8fa:  movq   %rsp, %rbp
   0x7fff906cd8fd:  pushq  %rbx
   0x7fff906cd8fe:  pushq  %rax

You want to set the auto-confirm lldb setting to true before you issue the second run

What exactly are you trying to achieve, if you can discuss it?

Enrico Granata
šŸ“© egranata@ļ£æ.com
ā˜Žļø 27683

On Jun 26, 2013, at 2:10 PM, Langmuir, Ben <ben.langmuir at intel.com> 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; lldb-dev at cs.uiuc.edu
> 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 <ben.langmuir at intel.com>
> Date: Wednesday, 26 June, 2013 4:57 PM
> To: "lldb-dev at cs.uiuc.edu" <lldb-dev at cs.uiuc.edu>
> 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
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130626/cd2117f9/attachment.html>


More information about the lldb-dev mailing list