<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - stop-hook doesn't work when user make ctrl-c interrupt"
   href="https://bugs.llvm.org/show_bug.cgi?id=44760">44760</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>stop-hook doesn't work when user make ctrl-c interrupt
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>slei.casper@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>lldb doesn't consider stop-hook when user make ctrl-c interrupt.
step to reproduce:
1. write the following content to /tmp/a.py
```
def __lldb_init_module(debugger, internal_dict):
    debugger.HandleCommand('target stop-hook add --one-liner "register read
rax"')
```
2. debug any program with the following lldb command
(lldb) target create "./a.out"
Current executable set to './a.out' (x86_64).
(lldb) command script import "/tmp/a.py"
Stop hook #1 added.
(lldb) r
     rax = 0x0000000000000000

Process 9563 launched: '/tmp/a.out' (x86_64)
Process 9563 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00007fff6b9babba libsystem_kernel.dylib`__semwait_signal + 10
libsystem_kernel.dylib`__semwait_signal:
->  0x7fff6b9babba <+10>: jae    0x7fff6b9babc4            ; <+20>
    0x7fff6b9babbc <+12>: movq   %rax, %rdi
    0x7fff6b9babbf <+15>: jmp    0x7fff6b9b968d            ; cerror
    0x7fff6b9babc4 <+20>: retq
Target 0: (a.out) stopped.



expected: after user make ctrl-c interrupt, lldb should print rax register, but
lldb doesn't print it.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>