Kulluk007
Kulluk007

Reputation: 972

LLDB not stopping with SIGINT (control-c)

I'm trying to use LLDB to debug a program on OSX and control-C is not working to stop the program. It seems to be in an infinite loop and I want to see where it is; hence I can't just use breakpoints. This used to work for me -- I used to be able to control-C to send SIGINT and LLDB respected it and stopped the program on this computer with this same toolchain. I see the ^C in the terminal but it's being ignored. I also tried to send the signal to the lldb process in two other ways:

  1. via the Activity Monitor's send signal to process feature
  2. via pkill -SIGINT lldb

However, that didn't work either. control-z DOES work to stop lldb, on the other hand but that's not what I need (which is to be able to inspect program state).

I tried this both with the built-in Terminal app as well as iTerm2 - but I'm seeing the same behavior on both.

Version info

lldb --version
lldb-1000.11.38.2
  Swift-4.2

I think this is the version of lldb installed with XCode. It's possible that an upgraded XCode (which I don't use directly) broke this.

Update: I'll add that variable names are not auto-completing for me in lldb either -- I'm pretty sure this also used to work. For example, if I type p and then start typing a variable name, it doesn't tab-complete. I'm adding this update in case it may be related.

Upvotes: 0

Views: 716

Answers (1)

Kulluk007
Kulluk007

Reputation: 972

See comment above -- it seems that this was a bug with lldb version 1000.11.38.2 when using a command script that contained run in it. Upgrading and/or not using a command script with run allows the program to be interrupted.

Upvotes: 2

Related Questions